GATE Computer ScienceHardGATE CS (PYQ pattern)
The regular expression ((aa + bb)(ab + ba)*)* is over Σ = {a, b}. How many states does the minimal complete DFA for its language have?
- A. 4
- B. 5
- C. 7
- D. 6
Correct answer: D. 6
Read the string in blocks of two: the language is all even-length strings that are empty or whose first 2-block is aa or bb (any later block, aa/bb or ab/ba, is allowed). States: start (accepting), after one symbol a, after one symbol b, inside-language even position (accepting), inside-language odd position, and dead (first block ab or ba). 6 states.
More Theory of Computation questions
- Exactly one of the following strings is NOT in the language of (a + ab)(b + ba). Which one?
- The regular expression a(bab)a is over Σ = {a, b}. How many states does the minimal complete DFA for its language have?
- 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?
- 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…