1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Pumping Lemma Problem: Solution:
Chapter Three: Closure Properties for Regular Languages
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
CS21 Decidability and Tractability
1 Introduction to Computability Theory Lecture14: Recap Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture7: The Pumping Lemma for Context Free Languages Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Discussion1: Non-Deterministic Finite Automatons Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
CS 310 – Fall 2006 Pacific University CS310 Pumping Lemma Sections:1.4 page 77 September 27, 2006.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
1 More Applications of the Pumping Lemma. 2 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we.
Courtesy Costas Busch - RPI1 Non-regular languages.
Context Free Pumping Lemma Zeph Grunschlag. Agenda Context Free Pumping Motivation Theorem Proof Proving non-Context Freeness Examples on slides Examples.
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Theory of Computing Lecture 22 MAS 714 Hartmut Klauck.
Prof. Busch - LSU1 Non-regular languages (Pumping Lemma)
Prof. Busch - LSU1 More Applications of the Pumping Lemma.
1 Non-regular languages. 2 Regular languages Non-regular languages.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
CS355 - Theory of Computation Regular Expressions.
Non-Context-Free Languages Section 2.3 CSC 4170 Theory of Computation.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Find as many examples as you can of w, x, y, z so that w is accepted by this DFA, w = x y z, y ≠ ε, | x y | ≤ 7, and x y n z is in L for all n ≥ 0.
Cs466(Prasad)L11PLEG1 Examples Applying Pumping Lemma.
Equivalence with FA * Any Regex can be converted to FA and vice versa, because: * Regex and FA are equivalent in their descriptive power ** Regular language.
Regular Languages Chapter 1 Giorgi Japaridze Theory of Computability.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
Lecture 8UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 8.
Complexity and Computability Theory I Lecture #12 Instructor: Rina Zviel-Girshin Lea Epstein.
CSE 105 theory of computation
A Universal Turing Machine
Complexity and Computability Theory I
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
PROPERTIES OF REGULAR LANGUAGES
Non-Context-Free Languages
Deterministic Finite Automata And Regular Languages Prof. Busch - LSU.
Introduction to Finite Automata
Elementary Questions about Regular Languages
Non-regular languages
Pumping Lemma September 29, 2006
CS21 Decidability and Tractability
More Applications of the Pumping Lemma
CHAPTER 1 Regular Languages
COSC 3340: Introduction to Theory of Computation
Presentation transcript:

1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli

The Pumping Lemma is our standard tool to prove a language is not regular. Remember: For any regular language L there exists a constant p such that every word, satisfying can be pumped. Meaning: Finding a single word and that cannot be pumped is sufficient to show that L is not regular. Using the Pumping Lemma 2

Since we do not know the value of p we use it as a parameter and look at words defined in terms of p, e.g.. Once w is selected we can try to pump it. On the down side: In order to show that w is not pumpable, every possible division of the form, where, and should be considered. Using the Pumping Lemma 3

Lemma: The language is not regular. Proof: Assume towards a contradiction that L is regular and let p be the pumping length of L. Let. By the Pumping Lemma there exists a division of w,, such that, and w can be pumped. This means that, where. Since we conclude Example:. 4

This however implies that in, the number of 0-s is smaller then the number of 1-s. It also means that for every, the number of 0-s in is larger then the number of 1-s. Both cases constitute a contradiction. Note: Each one of these cases is separately sufficient for the proof. Example: (Cont.) 5

Lemma: The language L is not regular, where. Proof: Assume towards a contradiction that L is regular and let p be the pumping length of L. At this point students are encouraged to look for a non pumpable member of L. The trick is to remember that a single non pumpable word is sufficient. Example2 6

Note: If the first p symbols of w include both 0-s and 1-s w can be pumped. Solution: Use the same word as in the previous example. Example2 (Cont.) 7

What about the language L is not regular, where. Can you find a non pumpable member of L ? No, This language is regular. An automaton recognizing the language is presented on the next slide. Example3 8

The Language_________________ Claim: This Automaton Recognizes L 9

Combinatorial Observation 1 First note that for any, the difference between the number of 01 substrings and the number 10 substrings is at least -1 and at most 1. The reason: if the string starts with 0 and the difference is 1, the string must end with 1. Any addition of 1 will not increase this difference and an addition of 0 will decrease it to 0. The analogous reasoning holds for strings starting with 0. 10

Combinatorial Observation 2 If the first bit of is 0 (1 respectively) then its last bit is also 0 (1 respectively). If the first bit of is 0 (1 respectively) then its last bit is 1 (0 respectively). The proof uses the first observation and it is carried out by induction on the length of w. Combinatorial observation 2 is used in the correctness proof of the DFA. 11

Proof Denote the automaton presented before by D. We would like to prove that D recognizes L. We will prove that computation of D on any word of L is ended either on, or, or. This however is not enough. We also have to prove that computation of D on any word not in L is completed either on or on. 12

Proof First note that the only word on which D, completes its computation at is. Since, and, this is OK. The rest of the proof is by induction on the length of w. 13

Induction Hypothesis a. Computation of any word, whose last bit is 0 ends at. b. Computation of any word, whose last bit is 1 ends at. c. Computation of any word, whose last bit is 1 ends at. d. Computation of any word, whose last bit is 0 ends at. 14

Proof (Cont.) Note that the word is accepted. Also note that computation on any word starting with 0 (1 resp.) goes to the upper (lower resp. branch of D. Induction Basis The reader can easily verify that computation with ( resp.) ends at ( resp.). 15

Proof (Cont.) Assume the induction hypothesis (Abrev. IH) holds for word such that. Note: It is not enough to assume correctness only for words in the language L. Consider a word such that. Assume that the first bit in w is 0 (The proof for words starting with 1 is analogous). Let denote the first n bits of w. 16

Consider the following cases: Case1: The last bit of is 0 In this case, by observation 2 we get. By IH(a) computation of D on ends at. If the last bit of w is 0 then and indeed the computation of D ends at. If the last bit of w is 1 then by observation 2, and indeed computation of D ends at. Proof (Cont.) 17

Consider the following cases: Case1: The last bit of is 1 In this case, by observation 2 we get. By IH(b) computation of D on ends at. If the last bit of w is 0 then and indeed the computation of D ends at. If the last bit of w is 1 then by observation 2, and indeed computation of D ends at. Proof (Cont.) 18