Question

For Σ={a,b}\Sigma = \{a, b\}, let us consider the regular language L={x∣x=a2+3k or x=b10+12k,k≥0}L = \{ x \mid x = a^{2+3k} \text{ or } x = b^{10+12k}, k \ge 0\}. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for LL?

Choose one option
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 L=L1∪L2L = L_1 \cup L_2 where:

  • L1={a2+3k∣k≥0}={a2,a5,a8,a11,… }L_1 = \{a^{2 + 3k} \mid k \ge 0\} = \{a^2, a^5, a^8, a^{11}, \dots\}
  • L2={b10+12k∣k≥0}={b10,b22,b34,… }L_2 = \{b^{10 + 12k} \mid k \ge 0\} = \{b^{10}, b^{22}, b^{34}, \dots\}

According to the Pumping Lemma for regular languages, if pp is a valid pumping length, then for every string s∈Ls \in L with ∣s∣≥p|s| \ge p, ss can be written as s=uvws = uvw such that:

  1. ∣uv∣≤p|uv| \le p
  2. ∣v∣≥1|v| \ge 1
  3. uviw∈Luv^i w \in L for all i≥0i \ge 0.

Consider the string s=b10∈Ls = b^{10} \in L. Its length is ∣s∣=10|s| = 10.

  • If p≤10p \le 10, then ∣s∣≥p|s| \ge p, so ss must be pumpable.
  • By condition 1, ∣uv∣≤p≤10|uv| \le p \le 10, so v=bmv = b^m with 1≤m≤p≤101 \le m \le p \le 10.
  • Pumping with i=2i = 2 gives s′=uv2ws' = uv^2 w, whose length is ∣s′∣=10+m|s'| = 10 + m.
  • Since 1≤m≤p≤101 \le m \le p \le 10, the length of s′s' satisfies 11≤∣s′∣≤2011 \le |s'| \le 20.
  • But the valid lengths of strings of bb in LL are 10,22,34,…10, 22, 34, \dots. None of the integers between 1111 and 2020 is of the form 10+12k10 + 12k (the next valid length after 10 is 22).
  • Furthermore, s′s' consists purely of bb's, so it cannot belong to L1L_1.

Hence, s′∉Ls' \notin L, which contradicts the pumping lemma! Therefore, no value p≤10p \le 10 can be a valid pumping length. This immediately rules out 3, 5, and 9.
Among the given options, only p=24p = 24 can be a valid pumping length (Option D).

Final answer

D

Common trap

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.