Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Pumping Lemma (PL) for

Regular Languages
Theorem:
Let L be a regular language. Then there exists a constant ‘n’ (which
depends on L) such that for every string w in L such that |w| ≥ n, we can
break w into three strings, w=xyz, such that:

1. |y| > 0

2. |xy| ≤ n

3. For all k ≥ 0, the string xykz is also in L.


Let L be regular defined by an FA having ‘n’ states. Let w= a1,a2 ,a3 an and is in L.
|w| = n ≥ n. Let the start state be P1. Let w = xyz where x= a1,a2 ,a3 an-1 , y=an and z = s.

We can break w into three strings, w = xyz, such that −


•|y| > 0
•|xy| ≤ n
•For all k ≥ 0, the string xykz is also in L.
Example 1
• w = anbn, such that |w|=2n. ( if n=4 the w=aaaabbbb)
• Since 2n > n and L is regular it must satisfy Pumping lemma.
Example 2
• To prove that L={w|w is a palindrome on {a,b}*} is not regular. i.e.,
L={aabaa, aba, abbbba,…}
• ex string for palindrome: aaaaaaaaaabaaaaaaaaaa
Example 3
• To prove that L={ all strings of 1’s whose length is prime} is
not regular. i.e., L={12 ,13 , 15 , 17 , 111 , }
• Sol: Let L be regular. Let w = 1p
• where p is prime and | p| = n +2
• Let y = m.
• by PL xykz
• | xykz |= | xz | + | yk |

You might also like