Download - Toc(df avs nfa)avishek130650107020
![Page 1: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/1.jpg)
TOCTHEORY OF COMPUTATION
NON-DETERMINISTIC FINITE AUTOMATA V S DETERMINISTIC FINITE AUTOMATA NFA DFA
Prepared By :- Avishek Sarkar (130650107020)Yatish Dhanani (130650107002)Tej Dave (140650107007)
![Page 2: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/2.jpg)
NFA vs. DFA
NFAs can be constructed from DFAs using transitions:Called NFA-
Suppose M1 accepts L1, M2 accepts L2
Then an NFA can be constructed that accepts:
L1 U L2 (union)
L1L2 (concatenation)
L1* (Kleene star)
![Page 3: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/3.jpg)
Closure Properties of NFA-s
M1
M1
M
M2
M2
L(M1) U L(M2)
L(M1) L(M2)
L(M)*
![Page 4: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/4.jpg)
Deterministic vs nondeterministic
For every nondeterministic automata, there is an equivalent deterministic automata
Finite acceptors are equivalent if they both accept the same language
L(M1) = L(M2)
NFA to DFA Conversion
![Page 5: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/5.jpg)
NFA to DFA Conversion
-> In DFA, label resultant state as a set of states
{q1, q2, q3,…}For a set of |Q| states, there are exactly 2Q subsets
Finite number of states
![Page 6: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/6.jpg)
Removing Non-deterministic
• By simulating all moves of an NFA-λ in parallel using a DFA.
• λ-closure of a state is the set of states reachable using only the λ-transitions.
![Page 7: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/7.jpg)
NFA-λ
q1
p1
q2
p3
p2
a
λ
λ
λ
p4a
}5,4,3,2,1{),1( pppppaqt
p5λ
![Page 8: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/8.jpg)
λ – Closure
•Selected λ closures
q1: {q1,q2}
p1: {p1,p2,p3}
q2: {q2}
![Page 9: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/9.jpg)
• Given an NFA-λ M1, construct a DFA M2 such that L(M) = L(DM).• Observe that • A node of the DFA = Set of nodes of NFA-λ
• Transition of the DFA = Transition among set of nodes of NFA- λ
Equivalence Construction
![Page 10: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/10.jpg)
Start state of DFA =
Final/Accepting state of DFA = All subsets of states of NFA-λ
that contain an accepting state of the NFA-λ
})({- 0qclosure
Dead state of DFA =
Special States to Identify
![Page 11: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/11.jpg)
Example
q0
q1
q2
aa
a
b
λ
c
• Identify λ-closures• q0: {q0}
• q1: {q1}
• q2: {q1,q2}
![Page 12: Toc(df avs nfa)avishek130650107020](https://reader036.vdocuments.us/reader036/viewer/2022062400/58a05f841a28ab5c1c8b687b/html5/thumbnails/12.jpg)
THANK YOU..!!!