0% found this document useful (0 votes)
47 views

Pumping Lemma: - Applications of Pumping Lemma Applying It To Prove A Specific Language L Is Not Regular

This document summarizes the pumping lemma and provides examples of how to apply it correctly and incorrectly. It discusses: - The general template for proving a language is not regular using the pumping lemma. - How to correctly apply the pumping lemma by choosing a string x in the language, then showing that for any decomposition uvw, there exists a k such that uvkw is not in the language. - Examples of an incorrect proof, including bad choices of the string x and flawed arguments that do not consider all possible decompositions uvw. - Potential issues like choosing a string x that is too short or not actually being in the language. So in summary, it outlines the pumping lemma technique

Uploaded by

Sam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Pumping Lemma: - Applications of Pumping Lemma Applying It To Prove A Specific Language L Is Not Regular

This document summarizes the pumping lemma and provides examples of how to apply it correctly and incorrectly. It discusses: - The general template for proving a language is not regular using the pumping lemma. - How to correctly apply the pumping lemma by choosing a string x in the language, then showing that for any decomposition uvw, there exists a k such that uvkw is not in the language. - Examples of an incorrect proof, including bad choices of the string x and flawed arguments that do not consider all possible decompositions uvw. - Potential issues like choosing a string x that is too short or not actually being in the language. So in summary, it outlines the pumping lemma technique

Uploaded by

Sam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Module 27

• Applications of Pumping Lemma Pumping Lemma


– General proof template
• What is the same in every proof
• What changes in every proof Applying it to prove a specific
– Incorrect pumping lemma proofs language L is not regular
– Some rules of thumb

1 2

How we use the Pumping Lemma Showing L “does not pump”


• A language L satisfies the • A language L does not satisfy
• We choose a specific language L
pumping condition if: the pumping condition if:
– For example, {ajbj | j > 0} – there exists an integer n > 0 – for all integers n of sufficient
such that size
• We show that L does not satisfy the – for all strings x in L of length – there exists a string x in L of
pumping condition at least n
– there exist strings u, v, w such
length at least n such that
– for all strings u, v, w such that
• We conclude that L is not regular that
• x = uvw and
• x = uvw and
• |uv| <= n and
• |uv| <= n and • |v| >= 1
• |v| >= 1 and – There exists a k >= 0 such that
• For all k >= 0, uvkw is in L uvkw is not in L

3 4

Example Proof Example Proof Continued *


• A language L does not satisfy • Proof that L = {aibi | i>0} does not • Proof that L = {aibi | i>0} does not • uv0w = uw is not in L
the pumping condition if: satisfy the pumping condition satisfy the pumping condition – uv contains only a’s
– for all integers n of sufficient • Let n be the integer from the • Let n be the integer from the • why?
size pumping lemma pumping lemma
– uw = an-|v|bn
– there exists a string x in L of • Choose x = anbn • Choose x = anbn • Follows from previous line
length at least n such that
• Consider all strings u, v, w s.t. • Consider all strings u, v, w s.t. and uvw = x = anbn
– for all strings u, v, w such that • x = uvw and • x = uvw and
• x = uvw and
– uw contains fewer a’s than b’s
• |uv| <= n and • |uv| <= n and
• |uv| <= n and • why?
• |v| >= 1 • |v| >= 1
• |v| >= 1 – Therefore, uw is not in L
• Argue that uvkw is not in L for • Argue that uvkw is not in L for
– There exists a k >= 0 such that • Therefore L does not satisfy
some k >= 0 some k >= 0
uvkw is not in L
– Argument must apply to all – Argument must apply to all the pumping condition
possible u,v,w possible u,v,w
– Continued on next slide 5 – Continued on right 6

1
Alternate choice of k *
• Proof that L = {aibi | i>0} does not • uv2w = uvvw is not in L
satisfy the pumping condition – uv contains only a’s Pumping Lemma
• Let n be the integer from the • why?
pumping lemma – uvvw = an+|v|bn
• Choose x = anbn • follows from previous line
• Consider all strings u, v, w s.t.
and uvw = x = anbn Some bad applications of the
– uvvw contains more a’s than
• x = uvw and
b’s pumping lemma
• |uv| <= n and
• why?
• |v| >= 1
– Therefore, uvvw is not in L
• Argue that uvkw is not in L for
some k >= 0 • Therefore L does not satisfy
– Argument must apply to all the pumping condition
possible u,v,w
– Continued on right 7 8

Bad Pumping Lemma


First bad choice of x *
Applications
• A language L does not satisfy • Let n be the integer from the
• We now look at some examples of bad pumping lemma
the pumping condition if:
applications of the pumping lemma – Let n be the integer from the • Choose x = a10b10
pumping lemma – What is wrong with this choice of
• We work with the language EQUAL – there exists a string x in L of x?
consisting of the set of strings over {a,b} length at least n such that
– for all strings u, v, w such that
such that the number of a’s equals the • x = uvw and

number of b’s • |uv| <= n and


• |v| >= 1

• We focus first on bad choices of string x – There exists a k >= 0 such that
uvkw is not in L
• We then consider another flawed technique
9 10

Second bad choice of x * Third bad choice of x *


• A language L does not satisfy • Let n be the integer from the • A language L does not satisfy • Let n be the integer from the
the pumping condition if: pumping lemma the pumping condition if: pumping lemma
– Let n be the integer from the • Choose x = anb2n – Let n be the integer from the
pumping lemma pumping lemma
• Choose x = (ab)n
– What is wrong with this choice of
– there exists a string x in L of x? – there exists a string x in L of – What is wrong with this choice
length at least n such that length at least n such that of x?
– for all strings u, v, w such that – for all strings u, v, w such that • The problem is there is a choice
• x = uvw and • x = uvw and of u, v, w satisfying the three
• |uv| <= n and • |uv| <= n and conditions such that for all k
• |v| >= 1 • |v| >= 1
>=0, uvkw is in L
– There exists a k >= 0 such that – There exists a k >= 0 such that • What is an example of such a u,
uvkw is not in L uvkw is not in L v, w?

11 12

2
Find the flaw in this proof *
• A language L does not satisfy • Let n be the integer from the
the pumping condition if: pumping lemma Pumping Lemma
– Let n be the integer from the • Choose x = anbn
pumping lemma • Let u = a2, v =a, w = an-3bn
– there exists a string x in L of – |uv| = 3 <= n
length at least n such that
– |v| = 1 Two rules of thumb
– for all strings u, v, w such that
• Choose k = 2
• x = uvw and
• |uv| <= n and • Argue uv2w is not in EQUAL
• |v| >= 1 – uv2w = uvvw = a2aaan-3bn = an+1bn
– There exists a k >= 0 such that – There is one more a than b in uv2w
uvkw is not in L – Thus uv2w is not in L

13 14

Two Rules of Thumb * Summary


• Try to make the first n characters of x identical • We use the Pumping Lemma to prove a
– For EQUAL, choose x = anbn rather than (ab)n language is not regular
• Simplifies case analysis as v only contains a’s
– Note, does not work for all nonregular
• Try k=0 or k=2 languages, though
– k=0
• This reduces number of occurrences of that first character • Choosing a good string x is first key step
– k=2 • Choosing a good integer k is second key
• This increases number of occurrences of that first character
step
• Must apply argument to all legal u, v, w
15 16

You might also like