GATE Computer ScienceVery hardGATE CS (PYQ pattern)

Let L = { aⁿ : n ≥ 5 and n ≡ 1 (mod 3) }. How many states does the minimal DFA for the concatenation L·L have?

  1. A. 8
  2. B. 12
  3. C. 9
  4. D. 15

Correct answer: D. 15

The smallest member of L is a⁷ (5 and 6 are not ≡ 1 mod 3), so L·L = { aᵏ : k ≥ 14, k ≡ 2 (mod 3) }. Its DFA needs the chain of lengths 0…11 (k = 11 is ≡ 2 but too short) and then a 3-cycle 12, 13, 14 with 14 accepting: 12 + 3 = 15. Taking the smallest member as 5 (or 10 for L·L) gives the trap 12.

More Theory of Computation questions

Exams that ask this topic