GATE CS 2024 Set 1 — Question 50

MSQ+2 / -0MediumDFA MinimizationFinite Automata & Regular LanguagesTheory of Computation

Theory of Computation → Finite Automata & Regular Languages → DFA Minimization

Last updated

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 0's in ww and n1(w)n_1(w) be the number of 1's in ww.
A 5-state DFA with states labeled 1 through 5. State 1 is the start state and the only final state. Transitions are: 1 on 0 to 2, 1 on 1 to 4; 2 on 0 to 3, 2 on 1 to 1; 3 on 0 to 2, 3 on 1 to 3; 4 on 0 to 1, 4 on 1 to 5; 5 on 0 to 5, 5 on 1 to 4.
A.
States 2 and 4 are distinguishable in MM
B.
States 3 and 4 are distinguishable in MM
C.
States 2 and 5 are distinguishable in MM
D.
Any string ww with n0(w)=n1(w)n_0(w) = n_1(w) is in L(M)

Correct answer

(B) States 3 and 4 are distinguishable in M; (C) States 2 and 5 are distinguishable in M

Solution

To identify the FALSE statement(s), we analyze the given DFA MM:
1. DFA Components:
  • States Q={1,2,3,4,5}Q = \{1, 2, 3, 4, 5\}
  • Start state q0=1q_0 = 1
  • Final states F={1}F = \{1\} (indicated by the double circle)
  • Transitions δ\delta:
  • δ(1,0)=2,δ(1,1)=4\delta(1, 0) = 2, \delta(1, 1) = 4
  • δ(2,0)=3,δ(2,1)=1\delta(2, 0) = 3, \delta(2, 1) = 1
  • δ(3,0)=2,δ(3,1)=3\delta(3, 0) = 2, \delta(3, 1) = 3
  • δ(4,0)=1,δ(4,1)=5\delta(4, 0) = 1, \delta(4, 1) = 5
  • δ(5,0)=5,δ(5,1)=4\delta(5, 0) = 5, \delta(5, 1) = 4
2. Evaluate Distinguishability:
Two states p,qp, q are distinguishable if there exists a string xx such that exactly one of δ(p,x),δ(q,x)\delta(p, x), \delta(q, x) is in FF.
  • (A) States 2 and 4: δ(2,1)=1F\delta(2, 1) = 1 \in F and δ(4,1)=5F\delta(4, 1) = 5 \notin F. Thus, 2 and 4 are distinguishable. Statement (A) is TRUE.
  • (B) States 3 and 4: δ(3,0)=2F\delta(3, 0) = 2 \notin F and δ(4,0)=1F\delta(4, 0) = 1 \in F. Thus, 3 and 4 are distinguishable. Statement (B) is TRUE.
  • (C) States 2 and 5: δ(2,1)=1F\delta(2, 1) = 1 \in F and δ(5,1)=4F\delta(5, 1) = 4 \notin F. Thus, 2 and 5 are distinguishable. Statement (C) is TRUE.
3. Evaluate Language Property (D):
  • Statement (D) claims that any string with an equal number of 0s and 1s is accepted.
  • Consider the string w=0011w = 0011. Here n0(w)=2n_0(w) = 2 and n1(w)=2n_1(w) = 2.
  • Trace ww in the DFA: 1020313131 \xrightarrow{0} 2 \xrightarrow{0} 3 \xrightarrow{1} 3 \xrightarrow{1} 3.
  • The final state reached is 3, which is not a final state (3F3 \notin F).
  • Since 0011L(M)0011 \notin L(M), statement (D) is FALSE.
Conclusion: Only statement (D) is false.

More questions on Finite Automata & Regular Languages

Practice GATE CS PYQs with adaptive difficulty

Timed practice, skill tracking, and AI explanations — free to start.

Start practicing free