Pumming Lemma

hemantchetwani 320 views 33 slides Jul 20, 2018
Slide 1
Slide 1 of 33
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33

About This Presentation

It is algorithm related to subject Theory of Computing


Slide Content

ACTIVE LEARNING ASSIGNMENT FOR THE SUBJECT “Theory of computation” PUMPING LEMMA Guided By : - Rimi Gupta (Assistance prof.) Prepared By :- Hemant H. Chetwani (130410107010 TY CE-II)

Non-regular languages (Pumping Lemma)

Regular languages Non-regular languages

How can we prove that a language is not regular? Prove that there is no DFA or NFA or RE that accepts Difficulty: this is not easy to prove ( since there is an infinite number of them) Solution: use the Pumping Lemma !!!

The Pigeon hole Principle

pigeons pigeonholes

A pigeonhole must contain at least two pigeons

........... ........... pigeons pigeonholes

The Pigeonhole Principle ........... pigeons pigeonholes There is a pigeonhole with at least 2 pigeons

The Pigeon hole Principle and DFAs

Consider a DFA with states

Consider the walk of a “long’’ string: A state is repeated in the walk of (length at least 4)

Pigeons: Nests: (Automaton states) Are more than Walk of The state is repeated as a result of the pigeonhole principle (walk states) Repeated state

...... ...... Repeated state Walk of .... .... .... Arbitrary DFA If , by the pigeonhole principle, a state is repeated in the walk In General:

Walk of Pigeons: Nests: (Automaton states) Are more than (walk states) .... .... .... .... ....

The Pumping Lemma

Take an infinite regular language There exists a DFA that accepts states (contains an infinite number of strings)

(number of states of DFA) then, at least one state is repeated in the walk of ...... ...... Take string with Walk in DFA of Repeated state in DFA

Take to be the first state repeated .... There could be many states repeated .... .... Second occurrence First occurrence Unique states One dimensional projection of walk :

.... .... .... Second occurrence First occurrence One dimensional projection of walk : We can write

... ... In DFA: ... ... contains only first occurrence of

The string is accepted In General: ... ... ... Follow loop times ...

Therefore: Language accepted by the DFA ... ... ... ...

In other words, we described: The Pumping Lemma !!!

The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that: (critical length)

Applications of the Pumping Lemma

Suppose you want to prove that An infinite language is not regular 1. Assume the opposite: is regular 2. The pumping lemma should hold for 3. Use the pumping lemma to obtain a contradiction 4. Therefore, is not regular

Theorem: The language is not regular Proof: Use the Pumping Lemma Example of Pumping Lemma application Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma

with lengths From the Pumping Lemma: we can write Thus:

From the Pumping Lemma: Thus:

BUT: CONTRADICTION!!!

Our assumption that is a regular language is not true Conclusion: is not a regular language Therefore: