1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
Chapter Three: Closure Properties for Regular Languages
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
1 Introduction to Computability Theory Discussion3: Uses of the Pumping Lemma Prof. Amos Israeli.
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 Lecture5: Context Free 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.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
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.
CS5371 Theory of Computation Lecture 6: Automata Theory IV (Regular Expression = NFA = DFA)
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Limitations.
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.
Fall 2004COMP 3351 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
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.
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Tutorial CSC3130 : Formal Languages and Automata Theory Haifeng Wan ( )
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Closure.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
CS355 - Theory of Computation Regular Expressions.
CS 203: Introduction to Formal Languages and Automata
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
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.
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.
Lecture #5 Advanced Computation Theory Finite Automata.
CSE 105 theory of computation
A Universal Turing Machine
Complexity and Computability Theory I
Formal Language & Automata Theory
Non-regular languages
Standard Representations of Regular Languages
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
Busch Complexity Lectures: Reductions
COSC 3340: Introduction to Theory of Computation
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
CSCI 2670 Introduction to Theory of Computing
Presentation transcript:

1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli

1.Motivate the Pumping Lemma. 2.Present and demonstrate the pumping concept. 3.Present and prove the Pumping Lemma. 4.Use the pumping lemma to prove that some languages are not regular. Lecture Outline 2

In this lecture we ask: Are all languages regular? The answer is negative. The simplest example is the language Try to think about this language. Introduction and Motivation 3

If we try to find a DFA that recognizes the language,, it seems that we need an infinite number of states, to “remember” how many a -s we saw so far. Note: This is not a proof! Perhaps a DFA recognizing B exists, but we are not clever enough to find it? Introduction and Motivation 4

The Pumping Lemma is the formal tool we use to prove that the language B (as well as many other languages) is not regular. Introduction and Motivation 5

Consider the following NFA, denoted by N : It accepts all words of the form. What is Pumping? 6

Consider now the word. Pumping means that the word can be divided into two parts: 1 and 10, such that for any, the word. We say that the word 110 can be pumped. For this is called down pumping. For this is called up pumping. What is Pumping? 7

A more general description would be: A word, can be pumped if and for each, it holds that. Note: the formal definition is a little more complex than this one. What is Pumping? 8

Let A be a regular language. There exists a number p such that for every, if then w may be divided into three parts, satisfying: 1.for each, it holds that Note: Without req. 2 the Theorem is trivial. The Pumping Lemma 9

In terms of the previous demonstration we have: For, we get:... Demonstration Continuation 10

Let D be a DFA recognizing A and let p be the number of states of D. If A has no words whose length is at least p, the theorem holds vacuously. Let be an arbitrary word such that. Denote the symbols of w by where. Proof of the Pumping Lemma 11

Assume that is the sequence of states that D goes through while computing with input w. For each,,. Since,. Since the sequence contains states and since the number of states of D is p, that there exist two indices, such that. Proof of the Pumping Lemma 12

Denote, and. Note: Under this definition and. By this definition, the computation of D on starting from, ends at. By this definition, the computation of D on, starting from, ends at which is an accepting state. Proof of the Pumping Lemma 13

The computation of D on starting from, ends at. Since, this computation starts and ends at the same state. Since it is a circular computation, it can repeat itself k times for any. In other words: for each,. Q.E.D. Proof of the Pumping Lemma 14

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:. 15

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

This is what we got so far: RL-s Ex: Discussion 17

1.Motivated the Pumping Lemma. 2.Presented and demonstrated the pumping concept. 3.Presented and proved the Pumping Lemma. 4.Used the pumping lemma to prove that some languages are not regular. Lecture Recap 18