Download presentation
Presentation is loading. Please wait.
Published byEthan Earwood Modified over 10 years ago
1
Proof of the Pumping Theorem for Regular Languages Richard Beigel CIS Temple University
2
The Pumping Theorem for Regular Languages If L is regular then N z such that z L and |z| N u,v,w such that z = uvw, |uv| N, and |v| > 0 i [uv i w L]
3
Proof Assume L is regular Then there is a (standardized) DFR P that recognizes L (no EOF or NOOP) Let be N be the number of control states in P Let z L and |z| N Consider P’s accepting computation on input z Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N.
4
Proof Then there is a standardized DFR P that recognizes L (no EOF or NOOP) Let be N be the number of control states in P Let z L and |z| N Consider P’s accepting computation on input z Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N. By the pigeonhole principle q j =q k for some j<k
5
Proof Let be N be the number of control states in P Let z L and |z| N Consider P’s accepting computation on input z Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N. By the pigeonhole principle q j =q k for some j<k Let u be the string scanned between q 0 and q j
6
Proof Let z L and |z| N Consider P’s accepting computation on input z Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N. By the pigeonhole principle q j =q k for some j<k Let u be the string scanned between q 0 and q j Let v be the string scanned between q j and q k
7
Proof Consider P’s accepting computation on input z Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N. By the pigeonhole principle q j =q k for some j<k Let u be the string scanned between q 0 and q j Let v be the string scanned between q j and q k Let w be the string scanned between q k and q n
8
Proof Let q 0, q 1, …, q n be the sequence of control states in that computation. Then n N. By the pigeonhole principle q j =q k for some j<k Let u be the string scanned between q 0 and q j Let v be the string scanned between q j and q k Let w be the string scanned between q k and q n Then uvw = z, |uv| N, |v| 1, and P accepts uv i w for all i 0
9
Proof By the pigeonhole principle q j =q k for some j<k Let u be the string scanned between q 0 and q j Let v be the string scanned between q j and q k Let w be the string scanned between q k and q n Then uvw = z, |uv| N, |v| 1, and P accepts uv i w for all i 0 Therefore uv i w L for all i 0, completing the proof of the Pumping Theorem
10
Picture-proof that uv*w L q0q0 qjqj qnqn u v w q j = q k
11
Example: L = {a n 2 : n 0} Assume L is regular Let N be given by the Pumping Theorem Let z = a N 2 Let u, v, w be given by the Pumping Theorem Then v = a k where 0 < k N Let i = 2 Then uv i w = uv 2 w = uvvw = a N 2 + k Since N 2 < N 2 + k N 2 + N < N 2 + 2N + 1 = (N + 1) 2, N 2 + k is not a square, so uv i w = a N 2 + k L This contradicts the Pumping Theorem, so L is not regular
12
Example: L = {a m b n : m n} Assume L is regular Let N be given by the Pumping Theorem Let z = a N b N Let u, v, w be given by the Pumping Theorem Then v = a k where 0 < k N Let i = 2 Then uv i w = uvvw = a N+k b N Since k > 0, N+k > N, so uv i w = a N+k b N L This contradicts the Pumping Theorem, so L is not regular
13
Example: L = {a m b n : m n} Assume L is regular Let N be given by the Pumping Theorem Let z = a N b N Let u, v, w be given by the Pumping Theorem Then v = a k where 0 < k N Let i = 0 Then uv i w = uw = a N-k b N Since k > 0, N-k < N, so uv i w = a N-k b N L This contradicts the Pumping Theorem, so L is not regular
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.