































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
































2
The algorithm is called subset construction. In the transition table of an NFA, each entry is a set of states. In DFA, each entry is a single state
4
The DFA uses its state to keep track of all possible states the NFA can be in after reading each input symbol.
5
We will use the following operations. ε -closure(T) : set of NFA states reachable from some NFA state s in T on ε-transitions alone.
7
Before it sees the first input symbol, NFA can be in any of the state in the set ε -closure(s 0 ) , where s 0 is the start state of the NFA.
8
Suppose that exactly the states in set T are reachable from s 0 on a given sequence of input symbols.
10
Let a be the next input symbol. On seeing a , the NFA can move to any of the states in the set move(T,a).
11
When we allow for ε-transitions, NFA can be in any of the states in
after seeing a.
13
14
// initially, e-closure(s 0 ) is the only // state in D states S’ and it is // unmarked s 0 ’ = ε-closure( s 0 ) S’ = { s 0 ’ } (unmarked)
16
F’: for each DFA state S if S contains an NFA final state mark S as DFA final state
17
Subset Construction Example
NFA for ( a | b )abb*
0 ε^
ε
ε ε
ε
a
b
ε
ε
1
2 3
4 5
6 ε^7 a^ 8 b^ 9 b^ 10
19
A = {0,1,2,4,7}, these are exactly the states reachable from state 0 via ε-transition.
ε 0 ε^
ε
ε ε
ε
a
b ε
1
(^2 )
4 5
6 ε^7 a^ 8 b^ 9 b^ 10
ε
20
The input symbol alphabet here is { a , b }.
ε
0 ε^
ε
ε ε
ε
a
b ε
1
(^2 )
4 5
6 ε^7 a^ 8 b^ 9 b^ 10
ε