Deterministic PDAs DPDAs 1 Deterministic PDA DPDA Allowed
- Slides: 65
Deterministic PDAs - DPDAs 1
Deterministic PDA: DPDA Allowed transitions: (deterministic choices) 2
Allowed transitions: (deterministic choices) 3
Not allowed: (non deterministic choices) 4
DPDA example 5
Definition: A language is deterministic context-free if there exists some DPDA that accepts it Example: The language is deterministic context-free 6
Example of Non-DPDA (PDA) 7
Not allowed in DPDAs 8
PDAs Have More Power than DPDAs 9
It holds that: Deterministic Context-Free Languages (DPDA) Context-Free Languages PDAs Since every DPDA is also a PDA 10
We will actually show: Deterministic Context-Free Languages (DPDA) Context-Free Languages (PDA) We will show that there exists a context-free language which is not accepted by any DPDA 11
The language is: We will show: • is context-free • is not deterministic context-free 12
Language is context-free Context-free grammar for : 13
Theorem: The language is not deterministic context-free (there is no DPDA that accepts ) 14
Proof: Assume for contradiction that is deterministic context free Therefore: there is a DPDA that accepts 15
DPDA with accepts 16
DPDA with Such a path exists due to determinism 17
Fact 1: The language is not context-free Context-free languages Regular languages (we will prove this at a later class using pumping lemma for context-free languages) 18
Fact 2: The language is not context-free (we can prove this using pumping lemma for context-free languages) 19
We will construct a PDA that accepts: which is a contradiction! 20
DPDA Modify Replace with DPDA 21
A PDA that accepts Connect the final states of with the final states of 22
Since is accepted by a PDA it is context-free Contradiction! (since is not context-free) 23
Therefore: Is not deterministic context free There is no DPDA that accepts it End of Proof 24
Positive Properties of Context-Free languages 25
Union Context-free languages are closed under: Union is context free is context-free 26
Example Language Grammar Union 27
In general: For context-free languages with context-free grammars and start variables The grammar of the union has new start variable and additional production 28
Concatenation Context-free languages Concatenation are closed under: is context free is context-free 29
Example Language Grammar Concatenation 30
In general: For context-free languages with context-free grammars and start variables The grammar of the concatenation has new start variable and additional production 31
Star Operation Context-free languages Star-operation are closed under: is context free is context-free 32
Example Language Grammar Star Operation 33
In general: For context-free language with context-free grammar and start variable The grammar of the star operation has new start variable and additional production 34
Negative Properties of Context-Free Languages 35
Intersection Context-free languages intersection are not closed under: is context free not necessarily context-free 36
Example Context-free: Intersection NOT context-free 37
Complement Context-free languages complement are not closed under: is context free not necessarily context-free 38
Example Context-free: Complement NOT context-free 39
Intersection of Context-free languages and Regular Languages 40
The intersection of a context-free language and a regular language is a context-free language context free regular context-free 41
Machine NPDA for DFA for context-free regular Construct a new NPDA machine that accepts simulates in parallel and 42
NPDA DFA transition NPDA transition 43
NPDA DFA transition NPDA transition 44
NPDA DFA initial state NPDA Initial state 45
NPDA DFA final states NPDA final states 46
Example: context-free NPDA 47
regular DFA 48
context-free Automaton for: NPDA 49
In General: simulates in parallel accepts string and if and only if accepts string and accepts string 50
Therefore: is NPDA is context-free 51
Applications of Regular Closure 52
The intersection of a context-free language and a regular language is a context-free language context free regular Regular Closure context-free 53
An Application of Regular Closure Prove that: is context-free 54
We know: is context-free 55
We also know: is regular 56
context-free regular (regular closure) context-free is context-free 57
Another Application of Regular Closure Prove that: is not context-free 58
is context-free If (regular closure) Then context-free regular context-free Impossible!!! Therefore, is not context free 59
Decidable Properties of Context-Free Languages 60
Membership Question: for context-free grammar find if string Membership Algorithms: Parsers • Exhaustive search parser • CYK parsing algorithm 61
Empty Language Question: for context-free grammar find if Algorithm: 1. Remove useless variables 2. Check if start variable is useless 62
Infinite Language Question: for context-free grammar find if is infinite Algorithm: 1. Remove useless variables 2. Remove unit and productions 3. Create dependency graph for variables 4. If there is a loop in the dependency graph then the language is infinite 63
Example: Dependency graph Infinite language 64
65
- Pda vs dpda
- Pdas and cfgs are equivalent
- Pdas domains
- Rob haitani
- Pda
- Push down automata
- Selection rule for electronic transition
- Ry pa
- Discount allowed meaning
- The institution of encomienda allowed the
- Mexican mafia constitution
- Vat control account double entry
- Treble cash book
- Red shift and blue shift
- Objectives of irrigation water management
- Who should be allowed
- What allowed amphibians to flourish on land
- Allowed to
- Mixed mode assignment allowed in c and java
- Discount allowed in profit and loss account
- No coloreds
- Can you come to my party next saturday
- Discount allowed in income statement
- My first free summer by julia alvarez
- Turnitin colour codes purple
- Selection rule for electronic transition
- The astrolabe allowed sailors to
- Lettuce
- Teenagers should be allowed to read
- Be able to be allowed to
- Safety depth formula in ecdis
- Non-deterministic algorithm
- Non deterministic algorithm for sorting
- Deterministic operations research
- Deterministic definition
- Non-deterministic algorithm
- A deterministic turing machine is: *
- Deterministic finite state automata
- Deterministic game
- Deterministic games examples
- Max clique problem
- Deterministic attribution
- Non deterministic turing machine
- Deterministic and probabilistic inventory models
- Non-deterministic finite automata
- Deterministic
- Deterministic and stochastic inventory models
- Deterministic cross device tracking
- Deterministic seismic hazard analysis
- Deterministic and stochastic inventory models
- Statistical versus deterministic relationship
- Econometrics chapter 1
- Dfa ndfa
- Non-deterministic algorithm
- State yang merupakan non-deterministic ditandai dengan
- Moore to mealy conversion
- Non-deterministic algorithm
- Known vs unknown environment
- Social learning theory
- Deterministic finite automaton
- Gameplay
- Statistical versus deterministic relationships.
- Cfg to pda conversion example
- Automata
- Two stack pda examples
- Pda to cfg