We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Modified over 6 years ago
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars
Costas Busch - RPI2 When we say: We are given a Regular Language We mean:Language is in a standard representation
Costas Busch - RPI3 Elementary Questions about Regular Languages
Costas Busch - RPI4 Membership Question Question:Given regular language and string how can we check if ? Answer:Take the DFA that accepts and check if is accepted
Costas Busch - RPI5 DFA
Costas Busch - RPI6 Given regular language how can we check if is empty: ? Take the DFA that accepts Check if there is any path from the initial state to a final state Question: Answer:
Costas Busch - RPI7 DFA
Costas Busch - RPI8 Given regular language how can we check if is finite? Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state Question: Answer:
Costas Busch - RPI9 DFA is infinite DFA is finite
Costas Busch - RPI10 Given regular languages and how can we check if ? Question: Find if Answer:
Costas Busch - RPI11 and
Costas Busch - RPI12 or
Costas Busch - RPI13 Non-regular languages
Costas Busch - RPI14 Regular languages Non-regular languages
Costas Busch - RPI15 How can we prove that a language is not regular? Prove that there is no DFA that accepts Problem: this is not easy to prove Solution: the Pumping Lemma !!!
Costas Busch - RPI16 The Pigeonhole Principle
Costas Busch - RPI17 pigeons pigeonholes
Costas Busch - RPI18 A pigeonhole must contain at least two pigeons
Costas Busch - RPI19........... pigeons pigeonholes
Costas Busch - RPI20 The Pigeonhole Principle........... pigeons pigeonholes There is a pigeonhole with at least 2 pigeons
Costas Busch - RPI21 The Pigeonhole Principle and DFAs
Costas Busch - RPI22 DFA with states
Costas Busch - RPI23 In walks of strings:no state is repeated
Costas Busch - RPI24 In walks of strings:a state is repeated
Costas Busch - RPI25 If string has length : Thus, a state must be repeated Then the transitions of string are more than the states of the DFA
Costas Busch - RPI26 In general, for any DFA: String has length number of states A state must be repeated in the walk of...... walk of Repeated state
Costas Busch - RPI27 In other words for a string : transitions are pigeons states are pigeonholes...... walk of Repeated state
Costas Busch - RPI28 The Pumping Lemma
Costas Busch - RPI29 Take an infinite regular language There exists a DFA that accepts states
Costas Busch - RPI30 Take string with There is a walk with label :......... walk
Costas Busch - RPI31 If string has length (number of states of DFA) then, from the pigeonhole principle: a state is repeated in the walk...... walk
Costas Busch - RPI32...... walk Let be the first state repeated in the walk of
Costas Busch - RPI33 Write......
Costas Busch - RPI34...... Observations:lengthnumber of states of DFA length
Costas Busch - RPI35 The string is accepted Observation:......
Costas Busch - RPI36 The string is accepted Observation:......
Costas Busch - RPI37 The string is accepted Observation:......
Costas Busch - RPI38 The string is accepted In General:......
Costas Busch - RPI39 In General:...... Language accepted by the DFA
Costas Busch - RPI40 In other words, we described: The Pumping Lemma !!!
Costas Busch - RPI41 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that:
Costas Busch - RPI42 Applications of the Pumping Lemma
Costas Busch - RPI43 Theorem: The language is not regular Proof: Use the Pumping Lemma
Costas Busch - RPI44 Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma
Costas Busch - RPI45 Let be the integer in the Pumping Lemma Pick a string such that: length We pick
Costas Busch - RPI46 it must be that length From the Pumping Lemma Write: Thus:
Costas Busch - RPI47 From the Pumping Lemma: Thus:
Costas Busch - RPI48 From the Pumping Lemma: Thus:
Costas Busch - RPI49 BUT: CONTRADICTION!!!
Costas Busch - RPI50 Our assumption that is a regular language is not true Conclusion: is not a regular language Therefore:
Costas Busch - RPI51 Regular languages Non-regular languages
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Fall 2006Costas Busch - RPI1 Non-regular languages (Pumping Lemma)
3.2 Pumping Lemma for Regular Languages Given a language L, how do we know whether it is regular or not? If we can construct an FA to accept the language.
CSCI 2670 Introduction to Theory of Computing September 13, 2005.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Mount Holyoke College 2 Nonregular languages? We now know: –Regular languages may be specified either.
Nonregular languages Sipser 1.4 (pages 77-82). CS 311 Fall Nonregular languages? We now know: –Regular languages may be specified either by regular.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Costas Busch - RPI1 Single Final State for NFAs. Costas Busch - RPI2 Any NFA can be converted to an equivalent NFA with a single final state.
Courtesy Costas Busch - RPI1 More Applications of the Pumping Lemma.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
Fall 2006Costas Busch - RPI1 Regular Expressions.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 More Properties of Regular Languages. 2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Recursively Enumerable and Recursive Languages
Courtesy Costas Busch - RPI1 The Pumping Lemma for Context-Free Languages.
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.
Fall 2003Costas Busch - RPI1 Decidable Problems of Regular Languages.
1 Single Final State for NFAs and DFAs. 2 Observation Any Finite Automaton (NFA or DFA) can be converted to an equivalent NFA with a single final state.
1 The Pumping Lemma for Context-Free Languages. 2 Take an infinite context-free language Example: Generates an infinite number of different strings.
© 2021 SlidePlayer.com Inc. All rights reserved.