# Proof of the Pumping Theorem for Regular Languages Richard Beigel CIS Temple University.

## Presentation on theme: "Proof of the Pumping Theorem for Regular Languages Richard Beigel CIS Temple University."— Presentation transcript:

Proof of the Pumping Theorem for Regular Languages Richard Beigel CIS Temple University

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]

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.

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

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

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

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

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

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

Picture-proof that uv*w  L q0q0 qjqj qnqn u v w q j = q k

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

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

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