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
1 More Properties of Regular Languages
2 We have proven Regular languages are closed under: Union Concatenation Star operation Reverse
3 Namely, for regular languages and : Union Concatenation Star operation Reverse Regular Languages
4 We will prove Regular languages are closed under: Complement Intersection
5 Namely, for regular languages and : Complement Intersection Regular Languages
6 Complement Theorem: For regular language the complement is regular Proof: Take DFA that accepts and make nonfinal states final final states nonfinal Resulting DFA accepts
8 Intersection Theorem: For regular languages and the intersection is regular Proof:Apply DeMorgan’s Law:
10 Standard Representations of Regular Languages
11 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars
12 When we say: We are given a Regular Language We mean:Language is in a standard representation
13 Elementary Questions about Regular Languages
14 Membership Question Question:Given regular language and string how can we check if ? Answer:Take the DFA that accepts and check if is accepted
16 Given regular language how can we check if is empty: ? Take the DFA that accepts Check if there is a path from the initial state to a final state Question: Answer:
18 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:
19 DFA is infinite DFA is finite
20 Given regular languages and how can we check if ? Question: Find if Answer:
23 Non-regular languages
24 Regular languages Non-regular languages
25 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 !!!
26 The Pigeonhole Principle
27 pigeons pigeonholes
28 A pigeonhole must contain at least two pigeons
29........... pigeons pigeonholes
30 The Pigeonhole Principle........... pigeons pigeonholes There is a pigeonhole with at least 2 pigeons
31 The Pigeonhole Principle and DFAs
32 DFA with states
33 In walks of strings:no state is repeated
34 In walks of strings:a state is repeated
35 If the walk of string has length then a state is repeated
36 If in a walk of a string transitions states of DFA then a state is repeated Pigeonhole principle for any DFA:
37 In other words for a string : transitions are pigeons states are pigeonholes
38 In general: A string has length number of states A state must be repeated in the walk...... walk of
39 The Pumping Lemma
40 Take an infinite regular language DFA that accepts states
41 Take string with There is a walk with label :......... walk
42 If string has lengthnumber of states then, from the pigeonhole principle: a state is repeated in the walk...... walk
44...... Observations:length number of states length
45 The string is acceptedObservation:......
46 The string is accepted Observation:......
47 The string is accepted Observation:......
48 The string is accepted In General:......
49 In other words, we described: The Pumping Lemma !!!
50 The Pumping Lemma: Given a infinite regular language there exists an integer for any string with length we can write with and such that:
51 Applications of the Pumping Lemma
52 Theorem: The language is not regular Proof: Use the Pumping Lemma
53 Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma
54 Let be the integer in the Pumping Lemma Pick a string such that: length Example: pick
55 Write: it must be that: length From the Pumping Lemma Therefore:
56 From the Pumping Lemma: Thus: We have:
57 Therefore: BUT: CONTRADICTION!!!
58 Our assumption that is a regular language is not true Conclusion: is not a regular language Therefore:
59 Regular languages Non-regular languages
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Properties of Regular Languages
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.
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.
Fall 2006Costas Busch - RPI1 Regular Expressions.
1 Regular Expressions. 2 Regular expressions describe regular languages Example: describes the language.
Costas Busch - RPI1 Standard Representations of Regular Languages Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
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 2004COMP 3351 Single Final State for NFA. Fall 2004COMP 3352 Any NFA can be converted to an equivalent NFA with a single final state.
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.
1 NFAs accept the Regular Languages. 2 Equivalence of Machines Definition: Machine is equivalent to machine if.
Fall 2006Costas Busch - RPI1 Properties of Regular Languages.
© 2021 SlidePlayer.com Inc. All rights reserved.