BY: ADMISSION.EDHOLE.COM MBA Admission in India
Dec 17, 2014
BY:ADMISSION.EDHOLE.COM
MBA Admission in India
TK PrasadPumping Lemma
2
Nonregularity Proofs
admission.edhole.com
Regular Languages: Grand UnificationGrand Unification
TK PrasadPumping Lemma
3
)()( RELRGL
)(
)()(
DFAsL
NFAsLsNFAL
)()( RELFAL
(Parallel Simulation) (Rabin and Scott’s work)
(Collapsing graphs; Structural Induction)(S. Kleene’s work)
)()( RGLFAL (Construction)(Solving linear equations)
admission.edhole.com
Role of various representations for Regular Languages
TK PrasadPumping Lemma
4Closure under complemention. (DFAs)Closure under union, concatenation, and
Kleene star. (NFA-s, Regular expression.) Consequence:
Closure under intersection by De Morgan’s Laws.
Relationship to context-free languages. (Regular Grammars.)
Ease of specification. (Regular expression.)
Building tokenizers/lexical analyzers. (DFAs)
admission.edhole.com
TK PrasadPumping Lemma
5
regular.not is }0|{Show ibaL ii
Consider pairs of strings:
......:'
......:'n
si
nsi
bbbbv
aaaau
jiFbaq
Fbaqji
M
iiM
if ),(
),(
0*
0*
If L were regular, then there exists a DFA MM accepting L with the following property:
jibaqbaq jiM
iiM if ),(),( 0
*0
* admission.edhole.com
TK PrasadPumping Lemma 6
jiaqaq jM
iM if ),(),( 0
*0
*
jibaqbaq ijM
iiM for ),(),( 0
*0
*
JUSTIFICATION: Otherwise, from the definition of DFA,
CLAIM:
which contradicts the earlier conclusion.
In order to satisfy
jiaqaq jM
iM if ),(),( 0
*0
*
the machine M must have a unique state for every i.Thus, M must have infiniteinfinite number of states, if Lis regular. This violates the definition of DFA.So, L must be non-regular.
admission.edhole.com
Using Closure Properties
TK PrasadPumping Lemma
7 Regular languages are closed under set-intersection.
Note that regularity is a property of a collection, and not a property of an individual string in the collection.
21
21
21
LL
LL
LLL
L1=bit strings with even parityL2=bit strings with number of 1’s divisible by 3L=bit strings with number of 1’s a multiple of 6
admission.edhole.com
TK PrasadPumping Lemma
8
If R is a regular language and C is context-free, then may not be regular.
Proof:
• Show that
is not regular. • Proof: If L were regular, ought to be
regular. However, is known to be non-regular. Hence, L cannot be regular.
CR
CCR
ibaC
baRii
}0|{
**
} in s'# in '# | *},{{ bsabaL
RL CRL
admission.edhole.com
Prelude to Pumping Lemma
TK PrasadPumping Lemma
9
Is 46551 divisible by 46?
Is 46554 divisible by 46?
Is 46552 divisible by 46?
Necessary vs sufficient condition
admission.edhole.com
Pumping Lemma for Regular Languages
TK PrasadPumping Lemma
10
It is a necessary condition. Every regular language satisfies it. If a language violates it, it is not regular.
RL => PL not PL => not RL
It is not a sufficient condition. Not every non-regular language violates it.
not RL =>? PL or not PL (no conclusion)
admission.edhole.com
Basic Idea:
TK PrasadPumping Lemma
11
q0
b a
a
a,b
bb
a
q2 q3
q1
)(MLababbaaab
3102312310 qqqqqqqqqqbaaabbaba
admission.edhole.com
TK PrasadPumping Lemma 12
3102312310 qqqqqqqqqqbaaabbaba
Note,
)(MLababbSo,
)(MLabaaab3102312310 qqqqqqqqqq
baaabbaba
)()()( :, MLaaababbabji ji admission.edhole.com
Fundamental Observation
TK PrasadPumping Lemma
13
Given a “sufficiently” long string, the states of a DFA must repeat in an accepting computation. These cycles can then be used to predict (generate) infinitely many other strings in (of) the language.
Pigeon-Hole Principle
admission.edhole.com
Pumping Lemma
TK PrasadPumping Lemma
14Let L be a regular language that is accepted by a DFA M with k states. Let z be any string in L with . Then z can be decomposed as uvw with
Lwuvi
vlength
kuvlength
i
:0
and ,0)(
,)(
kzlength )(
admission.edhole.com
TK PrasadPumping Lemma
15
For all sufficiently long strings (z) There exists non-null prefix (uv) and substring (v) For all repetitions of the
substring (v), we get strings in the
language.
)0 :(
0) || ( ) || (
)( :
|| :
Lwuvii
vkuv
suvwu,v,w
ksLs
i
admission.edhole.com
Proving non-regularity
TK PrasadPumping Lemma
16If there exists an arbitrarily long string
s L, and for each decomposition s = uvw, there exists an i such that , then L is non-regular.
)0 :(
0) || ( ) || (
)( :
|| :
Lwuvii
vkuv
suvwu,v,w
ksLs
i
Negation of the necessary condition:
Lwuvi
admission.edhole.com
APPLYING PUMPING LEMMA
TK PrasadPumping Lemma
17
Examples
admission.edhole.com
TK PrasadPumping Lemma
18
Proof by contradiction:Let be accepted by a k-state DFA.ChooseFor all prefixes of length show there exists such thati.e.,
regular.not is
}number primea is |{ paL pp
pLk nas n primea is where,
,kj ,ji p
jnij Laa j )(
number. compositea is )( jnij j
admission.edhole.com
TK PrasadPumping Lemma
19
Choose (For this specific problem happens to be
independent of j, but that need not always be the case.)
is non-regular because it violates the
necessary condition.
1ni j
ji
number! composite
)1(*
)1(
jn
nn*jjnnj*
pL
,...)( , 21211p
nnp
nn LaaLaa
admission.edhole.com
TK PrasadPumping Lemma
20
Proof : (For this example, choice of initial string is crucial.)
For this choice of s, the pumping lemma cannot generate a contradiction!
However, let instead.
}|{ mnbaL mnp
DFAof states ofnumber where nas n
1 nn bas
:String Pumped
:String Original1*
1
njnji
njnj
baa
baas
admission.edhole.com
TK PrasadPumping Lemma
21For
Thus, by pumping the substring containing a’s 0 times (effectively deleting it), the number of a’s can be made smaller than the number of b’s.
So, by pumping lemma, L is non-regular.
njn
jni
1
1 0
admission.edhole.com
TK PrasadPumping Lemma
22
Proof by contradiction: If is regular, then so is , the
complement of But which is known to be
non-regular. So, cannot be regular.
regular.not is
}number compositea is |{ caL cc
pc LLa cLa
cL .cL
cL
admission.edhole.com
Summary: Proof Techniques
TK PrasadPumping Lemma
23
Counter ExamplesConstructions/Simulations
Induction ProofsImpossibility Proofs
Proofs by ContradictionReduction Proofs : Closure Properties
admission.edhole.com