GATE | GATE-CS-2006 | Question 34

Consider the regular language L = (111 + 11111)*. The minimum number of states in any DFA accepting this languages is:
(A) 3
(B) 5
(C) 8
(D) 9


Answer: (D)

Explanation: The finite state automata is :

DFA

Explanation:

It is given that language L = (111 + 11111)*
Strings , that belongs in the language are
L = {null , 111 , 11111, 111111 , 11111111 , 111111111 , 1111111111 , ……. form string length 8 , (number of 1’s) , now we can can generate any length of string from length 3 and 5 (i.e. length 8 ,length 9, length 10 , length 11 ,…etc)}
L = {null , 111 , 11111, 111111 , 11111111 , 111111111* }
Strings in length , that belongs in the language
L = {0 ,3, 5, 6, 8, 9, 10, 11, …}
So, there are 5 states that are final states and 4 states that are non-final states
Therefore total number of states are 9 states .
hence option D is true.
This explanation has been contributed by Namita Singh.


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.