Another NFA Example Fall 2004 COMP 335 1
- Slides: 55
Another NFA Example Fall 2004 COMP 335 1
Language accepted (redundant state) Fall 2004 COMP 335 2
Remarks: • The symbol never appears on the input tape • Simple automata: Fall 2004 COMP 335 3
• NFAs are interesting because we can express languages easier than DFAs NFA Fall 2004 DFA COMP 335 4
Formal Definition of NFAs Set of states, i. e. Input aphabet, i. e. Transition function Initial state Final states Fall 2004 COMP 335 5
Transition Function Fall 2004 COMP 335 6
Fall 2004 COMP 335 7
Fall 2004 COMP 335 8
Fall 2004 COMP 335 9
Extended Transition Function Fall 2004 COMP 335 10
Fall 2004 COMP 335 11
Fall 2004 COMP 335 12
Formally : there is a walk from with label Fall 2004 COMP 335 to 13
The Language of an NFA Fall 2004 COMP 335 14
Fall 2004 COMP 335 15
Fall 2004 COMP 335 16
Fall 2004 COMP 335 17
Fall 2004 COMP 335 18
Formally The language accepted by NFA is: where (final state) and there is some Fall 2004 COMP 335 19
Fall 2004 COMP 335 20
NFA accept Regular Languages Fall 2004 COMP 335 21
Equivalence of FA Definition: An FA is equivalent to FA if that is if both accept the same language. Fall 2004 COMP 335 22
Example of equivalent FA NFA DFA Fall 2004 COMP 335 23
We will prove: Languages accepted by NFA Regular Languages That is, NFA and DFA have the same computation power Fall 2004 COMP 335 Languages accepted by DFA 24
Step 1 Languages accepted by NFA Regular Languages Proof: Every DFA is trivially an NFA Any language accepted by a DFA is also accepted by an NFA Fall 2004 COMP 335 25
Step 2 Languages accepted by NFA Regular Languages Proof: Any NFA can be converted into an equivalent DFA Fall 2004 Any language accepted by an NFA is also accepted by a DFA COMP 335 26
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 27
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 28
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 29
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 30
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 31
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 32
Convert NFA to DFA NFA DFA Fall 2004 COMP 335 33
NFA to DFA: Remarks We are given an NFA We want to convert it into an equivalent DFA That is, Fall 2004 COMP 335 34
If the NFA has states Then the DFA has states in the powerset Fall 2004 COMP 335 35
Procedure NFA to DFA 1. Initial state of NFA: Initial state of DFA: Fall 2004 COMP 335 36
Example NFA DFA Fall 2004 COMP 335 37
Procedure NFA to DFA 2. For every DFA’s state Compute in the NFA Add the following transition to the DFA Fall 2004 COMP 335 38
Example NFA DFA Fall 2004 COMP 335 39
Procedure NFA to DFA Repeat step 2 for all symbols in the alphabet ∑, until no more transitions can be added. Fall 2004 COMP 335 40
Example NFA DFA Fall 2004 COMP 335 41
Procedure NFA to DFA 3. For any DFA state: If some is a final state in the NFA Then, is a final state in the DFA Fall 2004 COMP 335 42
Example NFA DFA Fall 2004 COMP 335 43
Take NFA Theorem Apply the procedure to obtain DFA Then, Fall 2004 and are equivalent: COMP 335 44
Proof AND Fall 2004 COMP 335 45
First we show: Take arbitrary string : We will prove: Fall 2004 COMP 335 46
Fall 2004 COMP 335 47
We will show that if Fall 2004 COMP 335 48
More generally, we will show that if in : (arbitrary string) Fall 2004 COMP 335 49
Proof by induction on The basis case: Fall 2004 COMP 335 50
Induction hypothesis: Fall 2004 COMP 335 51
Induction Step: Fall 2004 COMP 335 52
Induction Step: Fall 2004 COMP 335 53
Therefore if Fall 2004 COMP 335 54
We have shown: We also need to show: (proof is similar) Fall 2004 COMP 335 55
- Djistrika
- Csc 335
- Cpsc 335
- Cpsc 335
- Cmsc335
- Cmsc 335
- 30 tac 335
- 30 tac 335
- 30 tac 335
- Sim 335
- What is adoloscence
- Builder design pattern uml diagram
- Cpsc 335
- Harris burdick another place another time
- Nfa theory of computation
- Nfa to dfa subset construction method
- Pda vs nfa
- Contoh soal ekuivalensi dfa ke nfa
- Defination of nfa
- Nfa
- Nfa dfa
- Dfa vs nfa
- Nfa simulation
- Regular expressions
- Contoh kasus finite state automata
- Ekuivalen nfa ke dfa
- Finite automata
- Dari sebuah mesin nfa dapat dibuat mesin dfa yang
- Contoh soal nfa dan jawabannya
- Re to nfa
- Aq0q
- Dfa and nfa
- Text search in nfa
- Nfa
- A+b=b+a property
- Dfa state diagram generator
- Convert nfa to dfa
- Nfa to dfa subset construction method
- Dfa minimization
- Nfa to dfa conversion solved examples
- Convert nfa to dfa
- Nfa and ffa merge
- Non-deterministic finite automata
- Nfa vs dfa
- Regular expression to nfa
- An nfa’s transition function returns
- Ffa history timeline
- Nfa dengan e-move
- Regular expression to nfa
- Accepters
- Nfa to fa
- Nfa
- Nfa to fa
- Dfa and nfa
- Automata
- Nfa audit