IAE Academy

GATE 2024 CS1 Q.50: solution and answer

GATE 2024 · CS1Q.50 · 2 marks · MSQ

Consider the 5-state DFA accepting the language shown below. For any string let be the number of 0's in and be the number of 1's in . Which of the following statements is/are FALSE?

GATE 2024 CS1 question 50: DFA with states 1, 2, 3, 4, 5.Tap to open full size
Figure from the GATE 2024 CS1 paper. It is part of the question.
Figure description

DFA with states 1, 2, 3, 4, 5. Start state is 1, which is also the only accepting state (double circle). Transitions: 1 -0-> 2; 1 -1-> 4; 2 -0-> 3; 2 -1-> 1; 3 -0-> 1; 3 -1-> 2; 4 -0-> 1; 4 -1-> 5; 5 -0-> 4; 5 -1-> 1.

  1. (A)

    States 2 and 4 are distinguishable in M

  2. (B)

    States 3 and 4 are distinguishable in M

  3. (C)

    States 2 and 5 are distinguishable in M

  4. (D)

    Any string w with n_0(w) = n_1(w) is in L(M)

Answer and solution

ANSWER

The false statements are (B) and (C).

Official answer: B, CSource: Official answer key, GATE 2024 CS1 (IISc Bengaluru)

  1. Read the transitions from the figure (start state 1, the only accepting state): ; ; ; ; .

  2. Let . Assign states 1, 2, 3 to and states 4, 5 to . Every transition then agrees: a 0 adds 1 to and a 1 subtracts 1. For example, gives ; gives ; gives ; gives ; gives ; gives . So .

  3. States with the same are equivalent. States 3 and 4 both have : and , and (both ). States 2 and 5 both have : and , and . The minimal DFA has 3 states.

  4. (A) States 2 () and 4 () differ: the string takes 2 to the accepting state 1, but takes 4 to the non-accepting state 5. They are distinguishable, so the statement is true.

  5. (B) States 3 and 4 are equivalent, so they are not distinguishable. The statement is FALSE.

  6. (C) States 2 and 5 are equivalent, so they are not distinguishable. The statement is FALSE.

  7. (D) If then , so ends in state 1 and is accepted. The statement is true.

  8. The FALSE statements are (B) and (C).

KEY IDEA

The DFA tracks using five states, but only three residues matter. States with the same residue are equivalent, and states with different residues are distinguishable.

WATCH OUT FOR

Treating the five states as five distinct classes and calling every pair distinguishable. Another slip is picking the true statements (A, D) when the question asks for the FALSE ones.

From the GATE 2024 CS1 paper. Every question of this paper · Download the full paper · All 18 Finite automata questions, with notes

More Finite automata questions