GATE | GATE CS Mock 2018 | Set 2 | Question 28

Consider the Deterministic Finite Automaton for input alphabets Σ = {a, b}
L =  \{ n_a(w) \mod 3 > n_b(w) \mod 3 \mid a > b \}
The number of final state(s) will be
(A) 2
(B) 1
(C) 3
(D) 6


Answer: (C)

Explanation: We have to Check for all the states where a > b. Say &Sigma = { 0, 1, 2 }
Therefore, final states will be = { 10, 20, 21 }
Number of final states will be 3.


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.