Skip to content
Official PYQ · 2019

GATE CS 2019 Q15 — Pumping Lemma

Explain with AI

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 \geq 0\}. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for LL ?

Choose one option
View worked solution

Answer: D

According to the Pumping Lemma for regular languages, if LL is regular, there exists a pumping length pp such that any string s∈Ls \in L with ∣s∣≥p|s| \ge p can be split into s=xyzs = xyz satisfying:

  1. ∣xy∣≤p|xy| \le p
  2. ∣y∣≥1|y| \ge 1
  3. xyiz∈Lxy^i z \in L for all i≥0i \ge 0

Let us analyze the given language L=L1∪L2L = L_1 \cup L_2, where L1={a2+3k∣k≥0}L_1 = \{a^{2+3k} \mid k \ge 0\} and L2={b10+12k∣k≥0}L_2 = \{b^{10+12k} \mid k \ge 0\}.

Testing options p=3,5,9p = 3, 5, 9:

Consider the string s=b10∈L2⊆Ls = b^{10} \in L_2 \subseteq L. Since ∣s∣=10≥p|s| = 10 \ge p for p∈{3,5,9}p \in \{3, 5, 9\}, we must be able to pump it. Let y=bmy = b^m where 1≤m≤p1 \le m \le p.

  • For i=0i = 0, the pumped string is xy0z=b10−mxy^0z = b^{10-m}.
  • Since 1≤m≤p<101 \le m \le p < 10, the length of xy0zxy^0z lies in the range [10−p,9][10-p, 9].
  • However, the minimum length of any string of bb's in LL is 1010. Thus, xy0z∉Lxy^0z \notin L.

Hence, 3,5,3, 5, and 99 cannot be pumping lengths.

Testing option p=24p = 24:

  • Case 1: For s=a2+3k∈L1s = a^{2+3k} \in L_1 with ∣s∣≥24|s| \ge 24, we can choose y=a3y = a^3 within the prefix of length 2424. Pumping yy changes the length by multiples of 33, keeping the pumped string in L1L_1.
  • Case 2: For s=b10+12k∈L2s = b^{10+12k} \in L_2 with ∣s∣≥24|s| \ge 24 (which implies ∣s∣≥34|s| \ge 34), we can choose y=b12y = b^{12} within the prefix of length 2424. Pumping yy changes the length by multiples of 1212, keeping the pumped string in L2L_2.

Thus, 2424 is a valid pumping length for LL.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Pumping Lemma questions