GATE Computer ScienceHardGATE CS (PYQ pattern)
Exactly one of the following strings is NOT in the language of (a + bb)*(b + aa)*. Which one?
- A. abbaa
- B. bbaba
- C. bbbaa
- D. aabbb
Correct answer: B. bbaba
In the first part b's come in pairs; in the second part a's come in pairs. bbaba: after bb·a (first part) the remaining ba has a single b, forcing the switch to the second part, which then needs aa — only a single a is left. abbaa = a·bb | aa; bbbaa = bb | b·aa; aabbb = a·a·bb | b.
More Theory of Computation questions
- 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…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b) = (ab) II. (ab)a =…