Академический Документы
Профессиональный Документы
Культура Документы
1
Proof CFL Satisfying the Pumping Lemma
We will prove why L satisfies the lemma. L1 is regular. We can prove this by the
fact that L1 can be expressed by a regular expression or the complement of L1 can be
recognized by an NFA shown below, because regular languages are closed under
complementation.
a,b
a,b
a
a
(ab)* + b(ab)* + (ab)*a + (ba)*
b
b
a,b
2
Proof CFL Satisfying the Pumping Lemma
We will first show that L is not regular. Suppose L is regular. According to the
properties of regular languages, since L1 is regular, L - L1 = L1 ∩ L2 must also be
regular. Since this language is infinite, it should satisfy the pumping lemma. Let n be
the constant of the pumping lemma, and choose a string z in L1 ∩ L2 whose length is
greater than n. Let z = uvw such that |uv| ≤ n and |v| ≥ 1.
Now, we pump z and make z’ = uvpj+1 w, where j = |v| and p = |z| is a prime number
according to the condition of L2 . Clearly, the length of z’ is |z’| = p + |v|× pj = p(1 +
j2 ), which is not a prime number. It follows that z’ ∉ L1 ∩ L2 . The language L1 ∩ L2
is not regular, implying that L is not regular.
3
Proof CFL Satisfying the Pumping Lemma
Now, we will prove that language L satisfies the pumping lemma. For the proof, we
must show that there exists a constant n such that for every string z ∈ L whose length
is greater than or equal to n, there exists strings u, v and w that satisfy the following
conditions.
(i) z = uvw (ii) |uv| ≤ n (iii) |v| ≥ 1
(iv) For all i ≥ 0, uviw ∈ L
Let z = c1c2c3x be a string in L, where ci ∈ {a, b}, x ∈ {a, b}*, |x| ≥ n - 3.
4
Proof CFL Satisfying the Pumping Lemma