GATE Computer ScienceHardGATE CS (PYQ pattern)
For the regular language L(r) with r = aaaa + a*b, the pumping lemma asks for a length p such that every w ∈ L with |w| ≥ p can be split w = xyz with |xy| ≤ p, |y| ≥ 1 and xyⁱz ∈ L for all i ≥ 0. What is the smallest such p?
- A. 8
- B. 9
- C. 6
- D. 5
Correct answer: D. 5
The minimal complete DFA has 8 states, so p = 8 always works, but the smallest valid p can be smaller: here a brute-force check over all strings gives 5. (A p is valid iff every sufficiently long member has a pumpable loop in its first p symbols.)
More Theory of Computation questions
- 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 +…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b) = (a + b) II. (a +…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (ba)b = b(ab) II. (a + b)ab =…