Question

Consider the 5-state DFA MM accepting the language L(M)⊂(0+1)∗L(M) \subset (0 + 1)^* shown below. For any string w∈(0+1)∗w \in (0 + 1)^* let n0(w)n_0(w) be the number of 00's in ww and n1(w)n_1(w) be the number of 11's in ww.

5-state DFA M with start and accepting state 1, upper branch states 2 and 3, and lower branch states 4 and 5.

Which of the following statements is/are FALSE?

Choose every correct option
Official answer and solution
Official answer
B and C
From
Official GATE 2024 answer key

Solution

Track (n0(w)−n1(w)) mod 3(n_0(w) - n_1(w)) \bmod 3 across the states of MM to find the equivalence classes of states.

Inspecting the transitions of DFA MM:

  • From State 1 (accepting): 0 →2\rightarrow 2, 1 →4\rightarrow 4
  • From States 2 and 5 (non-accepting): 0 →3\rightarrow 3 (from 2) or 44 (from 5), and 1 →1\rightarrow 1 (from both 2 and 5!)
  • From States 3 and 4 (non-accepting): 0 →1\rightarrow 1 (from both 3 and 4!), and 1 →2\rightarrow 2 (from 3) or 55 (from 4)

Notice that DFA MM tracks the value of (n0(w)−n1(w)) mod 3(n_0(w) - n_1(w)) \bmod 3:

  • State 1: (n0(w)−n1(w))≡0(mod3)(n_0(w) - n_1(w)) \equiv 0 \pmod 3
  • States {2, 5}: (n0(w)−n1(w))≡1(mod3)(n_0(w) - n_1(w)) \equiv 1 \pmod 3 - States 22 and 55 are equivalent (indistinguishable)!
  • States {3, 4}: (n0(w)−n1(w))≡2(mod3)(n_0(w) - n_1(w)) \equiv 2 \pmod 3 - States 33 and 44 are equivalent (indistinguishable)!

Therefore:

  • (A) is TRUE: States 2 and 4 are distinguishable (on input 1, state 2 transitions to accepting state 1 while state 4 transitions to non-accepting state 5).
  • (B) is FALSE: States 3 and 4 are equivalent (indistinguishable).
  • (C) is FALSE: States 2 and 5 are equivalent (indistinguishable).
  • (D) is TRUE: Any string ww with n0(w)=n1(w)n_0(w) = n_1(w) has n0(w)−n1(w)=0≡0(mod3)n_0(w) - n_1(w) = 0 \equiv 0 \pmod 3, so MM ends in accepting state 1.

Since the question asks which statements are FALSE, the correct choices are (B) and (C).

Final answer

Options (B), (C)

Common trap

Selecting the TRUE statements (A) and (D) by overlooking the word FALSE in the question stem.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
Question
50 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.