GATE / CS ARCHIVE

GATE CSE 2004 / QUESTION 86

Product automaton for counts modulo three and two

Theory of Computation · Finite Automata · Full GATE CSE 2004 paper

GATE 2004, Q86 2 marks · MCQ
Report issue

Finite Automata

Question 86, GATE 2004: A DFA has six states arranged as top row t0,t1,t2 and bottom row b0,b1,b2. Initial and sole accepting state is t0. On 1, each row cycles left-to-right: t0→t1→t2→t0 and b0→b1→b2→b0. On 0, each column toggles tj↔bj. Which condition on (#1,#0) describes the accepted strings?
Options:
(A) Divisible by 3 and 2 respectively
(B) Odd and even respectively
(C) Even and odd respectively
(D) Divisible by 2 and 3 respectively
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. Label each of the three columns by the count of ones modulo 3, from left to right 0,1,2; label upper and lower rows by the count of zeros modulo 2, 0 and 1. Each 1 edge advances one column cyclically without changing row, and each 0 edge toggles the row without changing column.

2. The initial upper-left state is the only accepting state. Hence acceptance requires #1≡0 mod3 and #0≡0 mod2, option A, including the empty string.

3. Teaching check: The two counters are independent: reading 1 changes the column but not the row, and reading 0 changes the row but not the column. Returning to t0 requires both modular counts to return to zero. The empty word is accepted because the start state is accepting.

Original paper, page 12