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.
Published byPhoebe Ponds
Modified over 6 years ago
1 Let’s Recapitulate
2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars
3 A standard representation of a regular language : A DFA that accepts A NFA that accepts A regular expression that generates A regular grammar that generates
4 When we say: “We are given a Regular Language “ We mean: Language in a standard representation
5 Elementary Questions about Regular Languages
6 Question: Given regular language how can we check if a string ?
7 Question: Given regular language how can we check if a string ? Answer: Take the DFA that accepts and check if is accepted
8 Question: Given regular language how can we check if is empty, finite, infinite ? Answer: Take the DFA that accepts Then check the DFA
9 If there is a walk from the start state to a final state then: is not empty If the walk contains a cycle then: is infinite Otherwise finite Otherwise empty
10 Question: Given regular languages and how can we check if ?
11 Question: Given regular languages and how can we check if ? Answer: take And find if
12 Question: Given language how can we check if is not a regular language ?
13 Question: Given language how can we check if is not a regular language ? Answer: The answer is not obvious We need the Pumping Lemma
14 The Pigeonhole Principle
15 4 pigeons 3 pigeonholes
16 A pigeonhole must have two pigeons
17........... pigeons pigeonholes
18 The Pigeonhole Principle........... pigeons pigeonholes There is a pigeonhole with at least 2 pigeons
19 The Pigeonhole Principle and DFAs
20 DFA with states
21 In walks of strings: no state is repeated
22 In walks of strings: a state is repeated
23 If the walk of string has length Then a state is repeated
24 If in a walk: transitions states Then: A state is repeated The pigeonhole principle:
25 In other words: transitions are pigeons states are pigeonholes
26 In general: A string has length number of states A state must be repeated in the walk......
27 The Pumping Lemma
28 Take an infinite regular language DFA that accepts states
29 Take string with There is a walk with label :.........
30 If string has lengthnumber of states Then, from the pigeonhole principle: A state is repeated in the walk......
32...... Observations : length number of states length
33 The string is accepted Observation:......
34 The string is accepted Observation:......
35 The string is accepted Observation:......
36 The string is accepted In General:......
37 In other words, we described: The Pumping Lemma
38 The Pumping Lemma: 1. Given a infinite regular language 2. There exists an integer 3. For any string with length 4. We can write 5. With and 6. Such that: string
39 Applications of the Pumping Lemma
40 Claim: The language is not regular Proof: Use the Pumping Lemma
41 Proof: Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma
42 Let be the integer in the Pumping Lemma Pick a string such that: length Example: pick
43 Write it must be that length From the Pumping Lemma Therefore:
44 From the Pumping Lemma: Thus:
45 Therefore, BUT: and CONTRADICTION!!!
46 Our assumption that is a regular language cannot be true CONCLUSION: is not a regular language Therefore:
47 Claim: The language is not regular Proof: Use the Pumping Lemma
48 Proof: Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma
49 Let be the integer in the Pumping Lemma Pick a string such that: length Example: pick
50 Write it must be that length From the Pumping Lemma Therefore:
51 From the Pumping Lemma: Thus:
52 Therefore, BUT: and CONTRADICTION!!!
53 Our assumption that is a regular language cannot be true CONCLUSION: is not a regular language Therefore:
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
1 A B C
Scenario: EOT/EOT-R/COT Resident admitted March 10th Admitted for PT and OT following knee replacement for patient with CHF, COPD, shortness of breath.
Simplifications of Context-Free Grammars
Variations of the Turing Machine
PDAs Accept Context-Free Languages
Angstrom Care 培苗社 Quadratic Equation II
AP STUDY SESSION 2.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Objectives: Generate and describe sequences. Vocabulary:
1 Special Angle Values. 2 Directions A slide will appear showing a trig function with a special angle. Say the value aloud before the computer can answer.
David Burdett May 11, 2004 Package Binding for WS CDL.
We need a common denominator to add these fractions.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
© 2021 SlidePlayer.com Inc. All rights reserved.