GATE Computer ScienceModerateGATE CS (PYQ pattern)
The regular expression (a(ab)*b)* is over Σ = {a, b}. How many states does the minimal complete DFA for its language have?
- A. 4
- B. 5
- C. 6
- D. 3
Correct answer: A. 4
States: start/accept, inside a(…), expecting b after 'a' in (ab)*, and dead: enumeration gives 4.
More Theory of Computation questions
- 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…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b) = (ab) II. (ab)a =…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (ab) = ε + (a + b)b II. (aa +…