I have to construct a minimal Deterministic Finite State Automaton(DFA) for a set :-
L = {1,2,2 2 ,2 3 ,2 4 ....,2 n } where numbers 1,2,2 2 ,2 3 ,2 4 ....,2 n written in binary and Input alphabet = {0,1} and 'n' is a non-negative integer.
I have constructed a minimal DFA as :-
Regular Expression(RegEx) for this DFA should be :- 10* because Language contains strings {1,10,100,1000,....}
Now, I am confused whether should I have to consider a unique representation for every string of the given set(Language) or not.
Here , string '1' has infinitely many representations like {1,01,001,0001,.....} Similarly, I can get many representations for every string of the set by appending zeros initially.
So, If I consider it then I am getting RegEx as 0*10*.
According to this RegEx, my equivalent minimal DFA will be :-
So, My question is : which DFA is correct according to the given description of the set which I have written initially. Should I have to mention that all strings should be started with '1' or every string has unique representation for the precise description of the language so that I can get the unique minimal DFA for the given set.
Please help!
我将使用第二个数字,因为它更灵活,如果您需要将数字存储在内存字段大于您的数字(位数)的情况下,则需要添加初始零以进行存储它。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.