6.1 Pumping Lemma and Non-Regular Language Grammars

You might also like

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

Pumping lemma( for regular language)

By Solomon Getachew
Pumping lemma( for regular language)
Pumping Lemma is used to prove that the language is not
regular
It cannot be used to prove that a language is regular
The language must be infinite
Statement:
If A is a regular Language, then A has a Pumping Length ‘P’ such
that any string ‘S’ where |S| ≥ P maybe divided into 3 parts
S=xyz such that the following condition must be true:
1) xyiz A for every i ≥ 0
2) |y|>0
3) |xy|≤ P
Cont…
To prove that a language is not regular using pumping LEMM,
follow the below steps: (We prove using Contradiction)

Assume that A is regular


It has to have a pumping length(say P)
All string longer than P can be pumped |S| ≥P
Now find a string ‘S’ in A that |S| ≥p
Divide S into xyz
Show that xyiz  A for some i
Then consider all ways that S can be divided into xyz
Show that none of these can satisfy all the 3 pumping conditions
at the same time
S cannot be pumped== CONTRADICTION
Theorem: The language

L  {vv : v  *}
R
  {a, b}
is not regular

Proof: Use the Pumping Lemma


L  {vv : v  *}
R

Assume for contradiction


that L is a regular language

Since L is infinite
we can apply the Pumping Lemma
L  {vv : v  *}
R

Let p be the critical length for L

Pick a string w such that: w  L

and length | w |  p

We pick wa b b a
p p p p
From the Pumping Lemma:
we can write: w  a b b a  x y z
p p p p

with lengths: | x y |  p, | y | 1
p p p p

w  xyz  a...aa...a...ab...bb...ba...a
x y z

Thus: y  a , 1 k  p
k
x y za b b a
p p p p
y  a , 1 k  p
k

From the Pumping Lemma: xy z  L


i

i  0, 1, 2, ...

Thus: x y z  L
2
x y za b b a
p p p p
y  a , 1 k  p
k

From the Pumping Lemma: x y z  L


2

pk p p p
2
xy z = a...aa...aa...a...ab...bb...ba...a ∈ L
x y y z

pk
Thus: a
p
b b a p p
L
pk
a p
b b a p p
L k 1

BUT: L  {vv : v  *}


R

pk
a p
b b a p p
L

CONTRADICTION!!!
Classwork

Prove Weather the given language L is not


regular L  {a nb n : n  0}

You might also like