International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
Avi Pumping Lemma for Regular Expression
Avinash Bansal
Assistant Professor (CSE), GNIT, Mullana, Ambala (Haryana), India
Fig. 1 shows the pictorial representation of pumping
lemma.
Abstract— In automata theory the pumping lemma
shows that for any regular expression (R.E) there exists a
constant ‘p’ such that any string(s) in R.E with length at
least ‘p’ can be split into three substrings, w = xyz, where
the middle portion ‘y’ must not be empty, such that the
strings xz, xyz, xyyz,... constructed by repeating ‘y’ an
arbitrary number of times are still in R.E. This process of
repetition is known as "Pumping Lemma” [1]. The above
pumping lemma does not showaccurately whether the R.E
is regular or not. In this paper we purposed an enhanced
version of pumping lemma called Avi Pumping Lemma for
regular expression. We apply some more constraints to
choose on‘y’ as well as on‘i’(where ‘i’ is the power of ‘y’
and ‘i’>= 0) in such a way that shows that the particular
expression is accepted by the DFA or not. That provides the
reasonable result for all regular expressions.
III. APPLICATION OF PUMPING LEMMA
The pumping lemma is often used to prove that a
particular language is non-regular; verification by
contradiction (of the language is either regular or not)
may consist of exhibiting a word in the language which
lacks theproperty outlined in the pumping lemma.
For example the language Lx = {anb2n | n >=1} over the
alphabet ∑ = {a, b} can be shown to be non-regular as
follows. Assume Lx is regular language. Let ‘w’, ‘x’, ‘y’,
‘z’, ‘p’, and ‘i’ be as stated in the pumping lemma above.
Let w in Lx be given by w = aabbbb (for n=2). By the
pumping lemma, there must be some decomposition
of‘w’ in to ‘x’, ‘y’, ‘z’ with |xy| <= p, |y| ≠ Such that
xyiz in Lx for every ‘i’>= 0. Using |xy| <= p, let x = a, y =
a (or y = ab, y = b) and z = bbbb. We now pump up ‘y’
with ‘i’ = 2, xy2z {a(a)2bbbb = aaabbbb}has not been
given exact double the instances of the letter ‘a’ anequal
tothe letter ‘b’, since we have added some instances of
awithout adding any instances of b. Therefore xy2z
(aaabbbb) is not in L [5]. Wehave reached a
contradiction. Therefore, the assumption thatL isregular
must be incorrect. Hence L is not regular. This is the
application of pumping lemma for regular expression. In
our purposed work we show that these are not the
sufficient condition for, to find that particular
expression/language is regular or not.
Keywords— Enhanced Pumping Lemma, Regular
Expression, DFA, State Diagram, Automata and Theory of
Computation.
I. INTRODUCTION TO FINITE AUTOMATA
In theory of computation, automata are defined by 5tuple language. These tuples are <Q, ∑, δ, q0, F>.Where:1. Q is the finite set of states.
2. ∑ is a finite set of terminal symbol.
3. δ is the transition function, having function, δ: Q × Σ
→ Q.
4. q0 is the start state having an initial arrow.
5. F is a set of final states out of Q [2].
II. PUMPING LEMMA
IV. PROOF BY INCONSISTENCY
Let L be the regular language having regular
expression R. Then there exit a string with length at least
‘p’ can be written as w = xyz (where ‘w’ € L). If |w| >= n
(where n is the number of states in respective DFA) then
there exist ‘w’ must satisfying the following condition:
1. | y | ≠ (Blank)
2. | xy | <= p (size of the string)
3. for all ‘i’ >= 0, xyiz € L [3,4]
This can be represented with the help of diagram
This can be represented with the help of diagram
having Fig.1.
The pumping lemma is often used to prove that, the
particular language is not regular [4]. This is the weak
part of the pumping lemma. We can solve this
inconsistency by understanding this concept with the help
of two cases. First case apply the constraint to choose on
‘y’ and second case apply the constraint to choose on ‘i’.
Case 1: We can understand this concept with the help of
an example (for to choose ‘y’).
Let we take a language La= {a*b* | where * is the
repetition of that element zero or more times} over the
alphabet ∑ = {a, b}. Then as per the pumping lemma we
make strings { , a, b, aa, ab, bb, aab, abb, aaa, bbb, abbb,
aabb, aaab, aaaa,bbbb …………}.
Now choose any string out of these let we choose
w(xyz) = aabb. Where x= a, y = ab and z = b.‘x’, ‘y’, ‘z’
values satisfy the pumping lemma condition. Now for the
third condition xyiz, assume i = 2,then a(ab)2b makes
aababb string which does not belongs to La.
y
x
q1
z
q..
qnqn
-
Initial State
Any Arbitrary State
Final State
Fig.1 Pumping Lemma
Proof by Inconsistency:
253
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, Volume 2, Issue 8, August 2012)
We know R.E, R= a*b* is a regular expression
because we create a DFA for that. DFA for R.E, R= a*b*
is given in Fig. 2 which shows that Q = {q1, q2}, ∑= (a,b)
and q0 = q1 (initial state) and F(set of final states) = {q1,
DFA for R.E, R= a*b* is
q2}.
V. AVI PUMPING LEMMA
This lemma gives us the reasonable result to prove
whether a language is regular or not. It says that
1) Choose the string for ‘y’, which is pumped or has
power.
a
b
As per case1 (La/R.E = a*b*) we choose the string
for‘y’ is either ‘a’ or ‘b’of any length because both
are individual pumped. We cannot choose ‘y’ = ab
as a string.
b
Similarly if any R.E= (01)* then ‘y’ has only any
q2
q1
length of 01 as a string because 01 is pumped in
combined.In this case we can’t choose either ‘y’ = 0
Initial State + Final State
Final State
or ‘y’ = 1.One more if any R.E = abb*ab then ‘y’
has only any length of ‘b’.
for a*b*
Expression
Lemma shows that this is Fig.2
not aDFA
regular
expression
but we make a DFA for that which accepts all string
2) ‘i’ must be chosen as per the value of n (which is
from R = a*b*.
Lemma shows that this is not a regular expression but
the power in the expression) or freely any value of
we make a DFA for that which accepts each and every
‘i’ (be ensure it should be free if it is not make it
string from R = a*b*. The general theory of computation
free).
says that if the DFA exit for an expression thenthat
As per case2 (Lb= an | n is even number andn>= 2)
expression must be a regular expression or having regular
value of ‘i’ is any even number, as per n in the
language and vice-versa means that if the
expression.
expression/language is regular than there must be a DFA
Similarly in L5 = {a2n | n >= 1}. In this case ‘i’ is
for that.
not free because power is 2n. So change the
Similarly language L1 = {anbm | n,m>= 0) } and L2=
language in other form then L5 = {(aa)n | n >= 1}
{a*b*c* | where * is the repetition of that element zero or
now ‘i’ is free and‘y’ is any length of ‘aa’ string.
more times}are also regular languages, where language
We can solve this by also taking ‘i’ as an even
n n
L3 = {a b | n >= 0) } is a non-regular language [5].
number.One more let L6 = {an | n is a prime
Case 2: Let us, we take one more example to understand
number}. In this case ‘i’ has only prime value.
this concept with the help of an example (for to choose
3) All other rules are same as the in previous Pumping
‘i’).
Lemma.
4) If a language is regular then xyiz € L.
Let we take another one language Lb= {an| n is an even
number and n>=2} over the alphabet ∑ = {a}. Then as
VI. CONCLUSION
per the pumping lemma we make strings {aa, aaaa,
aaaaaa, aaaaaa, ………}. Let w(xyz) = aaaa, where x =
Avi pumping lemma can be used to find whether the
aa, y = a and z = a.Now as per the third condition of
language is regular or non-regular.This lemma finds the
i
2
pumping lemma for xy z, assume i = 2,then aa(a) a
exact value for string ‘y’ and correct value for ‘i’. This
makes aaaaa (five times a) which does not belongs to Lb.
lemma perfectly shows that the particular expression is
means
non-regular
no DFA for that.itBut
DFA forit’sthearequired
language islanguage so there is no DFA
regular or not.
for that. But DFA for the required language is shown in
ACKNOWLEDGMENT
Fig. 3 which accepts all string of ‘a’ with even length.
I am grateful to the referees for some correction and
their suggestions regarding the presentation of the result.
a
q1
q2
a
q3
REFERENCES
a
Initial state
DFA shows
Any State
[1 ] PumpingLeemaAvailable:
http://en.wikipedia.org/wiki/Pumping_lemma.
[2 ] Automata
Theory
Available:
http://en.wikipedia.org/wiki/Automata_theory.
[3 ] John Hopcroft, Rajeev Motwani, and Jeffery D.Ullman,
Introductionto
Automata
Theory,
Language
and
Computation, Addison-Weskey, Reading,Massachusetts,
USA, 2001
[4 ] Shivani, RakeshKathuria, AMdhuGautam, Modified
Pumping Lemma, India, ICSE-2011
[5 ] John C. Martin, Introduction to Language and Theory of
Computation, McGraw-Hill Inc., 1991.
Final State
Fig.3 DFA for L= {an | n is an even number andn>=2}
This DFA shows that this language is a regular
language. Similarly language L4 = {a2n+1b | n >= 0}
andL5 = {a2n | n >= 1} are regular languages. But L6 =
{an | n is a prime number} is a non- regular language [5].
Diagram in Fig. 3 can also be used for L5 = {a2n | n >=
1}.
254
© Copyright 2026 Paperzz