GATE / CS ARCHIVE

GATE CSE 2019 / QUESTION 15

A valid pumping length for a union of residue classes

Theory of Computation · Regular Expressions & Languages · Full GATE CSE 2019 paper

GATE 2019, Q15 1 mark · MCQ
Report issue

Regular Expressions & Languages

Question 15, GATE 2019: Over {a,b}, L = {a^(2+3k) : k≥0} ∪ {b^(10+12k) : k≥0}. Which offered value can be a pumping length? Choices: A 3; B 5; C 9; D 24. The question asks for a valid length, not necessarily the smallest one.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Method: use the actual pumping-lemma conditions. For every word s with |s|≥p, find s=xyz with |xy|≤p, |y|≥1, and xyiz∈L for every integer i≥0.

1. Reject p=3, 5, or 9 using s=b10, which has length at least each candidate. Any nonempty y in such a decomposition consists only of b's and has length r with 1≤r≤p≤9.
2. Pumping up once more, i=2, produces length 10+r. For this all-b word to remain in L, r would have to be a multiple of 12. No r from 1 through 9 qualifies. Thus each of those three candidates fails.
3. Now take p=24. If s=am∈L and m≥24, set x=ε and y=a³. Pumping changes m by a multiple of 3, preserving m≡2 mod 3. Even at i=0, m−3≥21, and the permitted residue makes the remaining exponent an admitted nonnegative case.
4. If s=bm∈L and m≥24, set x=ε and y=b12. The first eligible such m is 34. Pumping changes m by multiples of 12; removing one block leaves at least 22, still an admitted length 10+12k.
5. Both constructions have nonempty y and |xy| equal to 3 or 12, at most 24. They therefore satisfy all requirements for every sufficiently long word in either branch.

Result: D, 24. A pumping length is an upper threshold at which suitable repetition is guaranteed; it does not have to equal a shortest accepted word or the least possible threshold.

Original paper, page 6 · Answer key