1 / 18

Introduction to Computability Theory

Introduction to Computability Theory. Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli. Using the Pumping Lemma. The Pumping Lemma is our standard tool to prove a language is not regular.

Download Presentation

Introduction to Computability Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Using the Pumping Lemma 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.

  3. Using the Pumping Lemma 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 ofthe form , where , and should be considered.

  4. Example: . 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

  5. Example: (Cont.) 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.

  6. Example2 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.

  7. Example2 (Cont.) 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.

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

  9. The Language_________________ Claim: This Automaton Recognizes L

  10. 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.

  11. 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.

  12. 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 .

  13. 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.

  14. 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 .

  15. 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.). The reader can easily verify that computation with ( resp.) ends at ( resp.).

  16. 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.

  17. Proof (Cont.) 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 .

  18. Proof (Cont.) 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 .

More Related