Question
For , let us consider the regular language . Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for ?
Official answer and solution
- Official answer
- D
- From
- Official GATE 2019 answer key
Solution
Apply the pumping lemma for regular languages to identify constraints on the pumping length p.
The language is where:
According to the Pumping Lemma for regular languages, if is a valid pumping length, then for every string with , can be written as such that:
- for all .
Consider the string . Its length is .
- If , then , so must be pumpable.
- By condition 1, , so with .
- Pumping with gives , whose length is .
- Since , the length of satisfies .
- But the valid lengths of strings of in are . None of the integers between and is of the form (the next valid length after 10 is 22).
- Furthermore, consists purely of 's, so it cannot belong to .
Hence, , which contradicts the pumping lemma! Therefore, no value can be a valid pumping length. This immediately rules out 3, 5, and 9.
Among the given options, only can be a valid pumping length (Option D).
D
Only checking L1 (strings of a) where gcd/period is 3, forgetting that L2 imposes a much larger minimum length constraint.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2019 Computer Science and Information Technology (CS)
- Question
- 25 of 65, printed as CS Q.15
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.