GATE Computer ScienceVery hardGATE CS (PYQ pattern)
The regular expression (a + b)*(ab + ba)(a + b) is over Σ = {a, b}. How many states does the minimal complete DFA for its language have?
- A. 8
- B. 6
- C. 9
- D. 5
Correct answer: C. 9
The language is: |w| ≥ 3 and the 3rd and 2nd symbols from the right differ. The future depends on the last two symbols; acceptance also needs the 3-window xyz to have x ≠ y. Classes: ε; last a with no pending pair (a, …aa); last b likewise; ab or …aab; ba or …bba; and the four accepting windows aba, abb, baa, bab. Total 9 (not the 8 of a plain 3-window).
More Theory of Computation questions
- Exactly one of the following strings is NOT in the language of (a + bb)(b + aa). Which one?
- The regular expression (a(ab)b) is over Σ = {a, b}. How many states does the minimal complete DFA for its language have?
- For the regular language L(r) with r = (aab + abb), the pumping lemma asks for a length p such that every w ∈ L with |w| ≥ p can be split…
- For the regular language L(r) with r = aaaa + ab, the pumping lemma asks for a length p such that every w ∈ L with |w| ≥ p can be split w…
- For the regular language L(r) with r = (ab + ba), the pumping lemma asks for a length p such that every w ∈ L with |w| ≥ p can be split w…
- For the regular language L(r) with r = aaa + bbbb (that is, a's of length ≥ 2 or b's of length ≥ 3), the pumping lemma asks for a length p…