Not quite, you draw the correct conclusion, but the reasoning is a bit off. The Pumping lemma states that for every regular language L
, there exists an integer p >= 1
where every string s
of length greater than or equal to p
can be written as s = xyz
where the following conditions hold:
y
is non-empty
- The length of xy ≤ p
- xyiz is in the language
L
for all i ≥ 0
Ваш первый шаг правильный, s = a 2 p действительно больше, чем p. Однако в лемме о перекачке говорится, что s можно разделить на s = xyz
, удовлетворяющий указанным выше условиям. Другими словами, существует разделение s как s = xyz
, но вы не можете выбрать, что такое деление, не зная, что оно должно удовлетворять приведенному выше три свойства.
In your case L
is the language consisting of just a's where the number of a's is a power of 2. Now taking s = a2p, we know that the next longest string in L
is (a2p)2. From there, if the first two conditions hold, it can be seen that the third condition certainly cannot hold for i = 2
, since a2p < xy2z < (a2p)2. (In plain english, the length of xy2z is between powers of two, so it is not in the language L
as it would have been if it were a regular language)