IAE Academy

GATE 2026 CS2 Q.47: solution and answer

GATE 2026 · CS2Q.47 · 2 marks · MSQ

Consider the following two finite automata and .

Which of the following statements is/are true?

GATE 2026 CS2 question 47: Two state diagrams over 0,1.Tap to open full size
Figure from the GATE 2026 CS2 paper. It is part of the question.
Figure description

Two state diagrams over 0,1. D1: five states. The start state q0 is also the only accepting state (double circle). Other states: a, b (both upper right, nearly collinear with q0), c (far upper right), d (lower right) and e (lower left, below q0). Transitions: q0 -0-> b; b -0-> a; a -0-> q0 (upper arc); a -1-> q0 (lower curve); b -1-> c; c -0-> q0 (large outer arc); q0 -1-> d; d -0-> e; e -1-> q0. D2: five states. The start state p0 is also the only accepting state. Other states: f (upper middle), g (upper right), h (middle right) and i (bottom). Transitions: p0 -0-> f; f -1-> g; g -1-> p0 (upper arc); p0 -1-> h; h -1-> g; h -0-> i; h -1-> i (curve); i -0-> p0. Every path from the start state back to it has length exactly 3.

  1. (A)

  2. (B)

    is a proper subset of

  3. (C)

  4. (D)

    consists of all strings in whose length is divisible by 3

Answer and solution

ANSWER

(C) and (D) are true; (A) and (B) are false.

Official answer: C, DSource: Official answer key, GATE 2026 CS2 (IIT Guwahati)

  1. In each automaton the start state is the only accepting state, and every walk that leaves it returns to it after exactly 3 transitions (the other states have no edges among themselves except along these 3-step loops). So , where is the set of labels of the length-3 loops through the start state.

  2. loops: gives ; the same path ending with the edge gives ; gives ; gives . So .

  3. loops: gives ; gives ; gives ; gives . So .

  4. and , so .

  5. (A) and (B) are false: but , and but . The languages are incomparable, so neither equality nor proper inclusion holds.

  6. (C) is true: a nonempty string in both languages has length with . Its first 3 symbols form a loop label, so they lie in and also in , which is impossible because . Only is common to both.

  7. (D) is true: , which is exactly the set of strings over whose length is divisible by 3.

KEY IDEA

When the start state is the only accepting state and every return loop has the same length, the language is the star of the set of loop labels. Here the two loop sets split into two disjoint halves.

WATCH OUT FOR

Assuming the two machines accept the same language because both have a single accepting start state and 3-step loops. The loop label sets differ, so the languages are incomparable. Another slip is to miss a loop label such as 001 or 110, which come from the two parallel edges into the last state.

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

More Finite automata questions