# 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 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_4.jpg", "name": "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.", "description": "Then n  N. By the pigeonhole principle q j =q k for some j

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 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_5.jpg", "name": "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.", "description": "Then n  N. By the pigeonhole principle q j =q k for some 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 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_6.jpg", "name": "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.", "description": "Then n  N. By the pigeonhole principle q j =q k for some j

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 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_7.jpg", "name": "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.", "description": "Then n  N. By the pigeonhole principle q j =q k for some j

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 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_8.jpg", "name": "Proof Let q 0, q 1, …, q n be the sequence of control states in that computation.", "description": "Then n  N. By the pigeonhole principle q j =q k for some j

Proof By the pigeonhole principle q j =q k for some j { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/11/3168208/slides/slide_9.jpg", "name": "Proof By the pigeonhole principle q j =q k for some j

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

Download ppt "Proof of the Pumping Theorem for Regular Languages Richard Beigel CIS Temple University."

Similar presentations