Standard Representations of Regular Languages DFAs NFAs Fall
- Slides: 82
Standard Representations of Regular Languages DFAs NFAs Fall 2004 Regular Grammars Regular Expressions COMP 335 1
When we say: We mean: Fall 2004 We are given a Regular Language is in a standard representation COMP 335 2
Elementary Questions about Regular Languages Fall 2004 COMP 335 3
Membership Question: Answer: Fall 2004 Given regular language and string how can we check if ? Take the DFA that accepts and check if is accepted COMP 335 4
DFA Fall 2004 COMP 335 5
Question: Answer: 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 Fall 2004 COMP 335 6
DFA Fall 2004 COMP 335 7
Question: Given regular language how can we check if is finite? Answer: Take the DFA that accepts Check if there is a walk with cycle from the initial state to a final state Fall 2004 COMP 335 8
DFA is infinite DFA is finite Fall 2004 COMP 335 9
Question: Given regular languages how can we check if Answer: Fall 2004 and ? Find if COMP 335 10
and Fall 2004 COMP 335 11
or Fall 2004 COMP 335 12
Non-regular languages Fall 2004 COMP 335 13
Non-regular languages Regular languages Fall 2004 COMP 335 14
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 !!! Fall 2004 COMP 335 15
The Pigeonhole Principle Fall 2004 COMP 335 16
pigeons pigeonholes Fall 2004 COMP 335 17
A pigeonhole must contain at least two pigeons Fall 2004 COMP 335 18
pigeons. . . pigeonholes. . . Fall 2004 COMP 335 19
The Pigeonhole Principle pigeons pigeonholes There is a pigeonhole with at least 2 pigeons . . . Fall 2004 COMP 335 20
The Pigeonhole Principle and DFAs Fall 2004 COMP 335 21
DFA with Fall 2004 COMP 335 states 22
no state is repeated In walks of strings: Fall 2004 COMP 335 23
a state is repeated In walks of strings: Fall 2004 COMP 335 24
If string has length : Then the transitions of string are more than the states of the DFA Thus, a state must be repeated Fall 2004 COMP 335 25
In general, for any DFA: String A state has length number of states must be repeated in the walk of. . . Fall 2004 . . . Repeated state COMP 335 26
In other words for a string : transitions are pigeons states are pigeonholes walk of. . . Fall 2004 . . . Repeated state COMP 335 27
The Pumping Lemma Fall 2004 COMP 335 28
Take an infinite regular language There exists a DFA that accepts states Fall 2004 COMP 335 29
Take string with There is a walk with label : . . Fall 2004 walk COMP 335 30
If string has length (number of states of DFA) then, from the pigeonhole principle: a state is repeated in the walk . . . Fall 2004 . . . walk COMP 335 31
Let be the first state repeated in the walk of . . . Fall 2004 . . . walk COMP 335 32
Write . . . Fall 2004 . . . COMP 335 33
Observations: number of states of DFA length . . . Fall 2004 . . . COMP 335 34
Observation: The string is accepted . . . Fall 2004 . . . COMP 335 35
Observation: The string is accepted . . . Fall 2004 . . . COMP 335 36
Observation: The string is accepted . . . Fall 2004 . . . COMP 335 37
In General: The string is accepted . . . Fall 2004 . . . COMP 335 38
In General: Language accepted by the DFA . . . Fall 2004 . . . COMP 335 39
In other words, we described: The Pumping Lemma !!! Fall 2004 COMP 335 40
The Pumping Lemma: • Given a infinite regular language • there exists an integer • for any string with length • we can write • with and • such that: Fall 2004 COMP 335 41
Applications of the Pumping Lemma Fall 2004 COMP 335 42
Theorem: The language is not regular. Proof: Fall 2004 Use the Pumping Lemma COMP 335 43
Assume that is a regular language Since is an infinite language, we can apply the Pumping Lemma Fall 2004 COMP 335 44
Let be the integer in the Pumping Lemma Pick a string such that: (1) and (2) length We pick: Fall 2004 COMP 335 45
Write: From the Pumping Lemma it must be that length Fall 2004 Thus: COMP 335 46
From the Pumping Lemma: Thus: Fall 2004 COMP 335 47
From the Pumping Lemma: Thus: Fall 2004 COMP 335 48
But: CONTRADICTION!!! Fall 2004 COMP 335 49
Therefore: Our assumption that is a regular language is not true Conclusion: Fall 2004 is not a regular language COMP 335 50
Non-regular languages Regular languages Fall 2004 COMP 335 51
More Applications of the Pumping Lemma Fall 2004 COMP 335 52
The Pumping Lemma: • Given a infinite regular language • there exists an integer • for any string with length • we can write • with and • such that: Fall 2004 COMP 335 53
Non-regular languages Regular languages Fall 2004 COMP 335 54
Theorem: The language is not regular Proof: Fall 2004 Use the Pumping Lemma COMP 335 55
Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma Fall 2004 COMP 335 56
Let be the integer in the Pumping Lemma Pick a string such that: and length We pick Fall 2004 COMP 335 57
Write From the Pumping Lemma it must be that length Thus: Fall 2004 COMP 335 58
From the Pumping Lemma: Thus: Fall 2004 COMP 335 59
From the Pumping Lemma: Thus: Fall 2004 COMP 335 60
BUT: CONTRADICTION!!! Fall 2004 COMP 335 61
Therefore: Our assumption that is a regular language is not true Conclusion: Fall 2004 is not a regular language COMP 335 62
Non-regular languages Regular languages Fall 2004 COMP 335 63
Theorem: The language is not regular Proof: Fall 2004 Use the Pumping Lemma COMP 335 64
Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma Fall 2004 COMP 335 65
Let be the integer in the Pumping Lemma Pick a string such that: and length We pick Fall 2004 COMP 335 66
Write From the Pumping Lemma it must be that length Thus: Fall 2004 COMP 335 67
From the Pumping Lemma: Thus: Fall 2004 COMP 335 68
From the Pumping Lemma: Thus: Fall 2004 COMP 335 69
BUT: CONTRADICTION!!! Fall 2004 COMP 335 70
Therefore: Our assumption that is a regular language is not true Conclusion: Fall 2004 is not a regular language COMP 335 71
Non-regular languages Regular languages Fall 2004 COMP 335 72
Theorem: The language is not regular Proof: Fall 2004 Use the Pumping Lemma COMP 335 73
Assume for contradiction that is a regular language Since is infinite we can apply the Pumping Lemma Fall 2004 COMP 335 74
Let be the integer in the Pumping Lemma Pick a string such that: length We pick Fall 2004 COMP 335 75
Write From the Pumping Lemma it must be that length Thus: Fall 2004 COMP 335 76
From the Pumping Lemma: Thus: Fall 2004 COMP 335 77
From the Pumping Lemma: Thus: Fall 2004 COMP 335 78
Since: There must exist Fall 2004 COMP 335 such that: 79
However: for any Fall 2004 COMP 335 80
BUT: CONTRADICTION!!! Fall 2004 COMP 335 81
Therefore: Our assumption that is a regular language is not true Conclusion: Fall 2004 is not a regular language COMP 335 82
- Nfas are ___ dfas.
- Which grammar generates regular language
- Dfas organizational chart
- Nih dfas
- Dfas fein
- Proof by contradiction
- Decision properties of regular languages
- Decision properties of regular languages
- Closure properties of regular languages
- Decision properties of regular languages
- Properties of regular languages
- Inverse homomorphism in regular languages
- Regular and irregular languages
- Pumping lemma non regular languages examples
- Decision properties of regular languages
- Osha ladders 1910
- Low slope
- Msha fall protection
- Time sequence pattern organizer examples
- Multiple representations of polar coordinates
- Multiple representations
- Efficient estimation of word representations invector space
- On single image scale-up using sparse-representations
- Mathematical literacy grade 11 maps and plans
- Efficient estimation of word representations
- Different types of maps in maths lit
- Gcse media studies nea 2021
- Functions and their representations
- Representations of three dimensional figures
- Distributed representations of words
- A day in pompeii vimeo
- 574 in expanded form
- Connecting representations
- Representations of a line
- Representations of functions as power series
- Isa written representations
- Maps plans and other representations of the physical world
- Nonlinguistic representation definition
- Economics
- Multiple representations
- Cultural representations and signifying practices
- C infinity v character table
- Floor plan grade 10 maths literacy
- Flowchart is a pictorial representation of
- Power dynamics of language
- Standard cost accounting
- Subjek dini kpm
- How to calculate error bars
- Formosan language
- Introduction to scripting languages
- Storage management in programming languages
- Languages canada
- Formal relational query languages
- If programming languages were cars
- Roman achievements that are still used today
- Boliang zhang
- Languages accepted by pda
- Language
- Uga romance languages
- Languages direct
- Love tank test
- Tandem language
- Programming languages
- Proto language
- Low level programming languages
- Formal language
- Transmission programming languages
- Total languages in india
- Languages for specific purposes
- Introduction to programming languages
- Express languages
- What was the mother tongue of the learned pundit
- Cornell programming languages
- Asian languages written
- Assembly languages list
- Bill maher npc
- Rcp hlsl
- Balto slavic languages
- Mainstream programming languages
- New zealand official languages english
- Are all languages equally complex
- Types of languages
- Imperative programming languages