GATE Computer ScienceHardGATE CS (PYQ pattern)
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 w = xyz with |xy| ≤ p, |y| ≥ 1 and xyⁱz ∈ L for all i ≥ 0. What is the smallest such p?
- A. 6
- B. 3
- C. 2
- D. 4
Correct answer: B. 3
p = 2 fails on w = aab: y must lie within the first two symbols, and removing a, aa or the second a leaves ab, b or ab — none of length divisible by 3. p = 3 works: every non-empty member starts with a complete block of length 3, so take x = ε and y = that block; pumping it keeps a concatenation of blocks.
More Theory of Computation questions
- 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 +…
- Consider these claims about regular expressions over {a, b} (each equation compares the two languages): I. (a + b) = (a + b) II. (a +…