Module 20. NFA’s with l -transitions NFA- l ’s Formal definition Simplifies construction LNFA- l Showing LNFA -l is a subset of LNFA (extra credit) and therefore a subset of LFSA. Defining NFA- l ’s. Change: l -transitions. We now allow an NFA M to change state without reading input
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
a,b
a,b
a
a
b
a
l
b
a
a
b
l
a,b
a,b
M accepts string x if one of the configurations reached is an accepting configuration
(q0, x) |-* (f, l),f e A
M rejects string x if all configurations reached are either not halting configurations or are rejecting configurations
L(M) or Y(M)
N(M)
LNFA-l
Language L is in language class LNFA-l iff
A2
NFA-l M
FSA M’
NFA
M1
NFA-l M
A2
FSA M’
A2’
A1
NFA-l M
FSA M’
Algorithm A2
NFA-l M
A2’
NFA M1
a
l
b
l
l
b
1
2
3
4
5
6
NFA-l M
A2’
NFA M1
b
b
b
a
l
b
l
l
b
1
2
3
4
5
6
1
2
3
4
5
6
NFA-d M1
NFA-l M
A2’
b
b
b
b
b
b
a
l
b
l
l
b
1
2
3
4
5
6
1
2
3
4
5
6
NFA-d M1
NFA-l M
A2’
b
a
b
b
a
b
b
b
b
a
l
b
l
l
b
1
2
3
4
5
6
1
2
3
4
5
6
a
l
b
l
l
b
1
2
3
4
5
6
NFA-d M1
NFA-l M
A2’
b
b
b
b
b
b
a
a
a
a
b
1
2
3
4
5
6
b
b
Input NFA-l M = (Q, S, q0, d, A)
Output NFA M1 = (Q1, S1, q1, d1, A1)
What is Q1?
Q1 = Q
In this case, Q1 = {1,2,3,4,5,6}
What is S1?
S1 = S
In this case, S1 = S = {a,b}
What is q1?
We always make q1 = q0
In this case q1 = 1
a
l
b
l
l
b
1
2
3
4
5
6
Input NFA-l M = (Q, S, q0, d, A)
Output NFA M1 = (Q1, S1, q1, d1, A1)
What is d1?
d1(q,a) = the set of states reachable from state q in M taking any number of l-transitions and exactly one transition on the character a
In this case
d1(1,a) = {}
d1(1,b) = {3,4,5}
What is A1?
A1 = A with one minor change
If an accepting state is reachable from q0 using only l-transitions, then we make q1 an element of A1
In this case, using only l-transitions, no accepting state is reachable from q0, so A1 = A
a
l
b
l
l
b
1
2
3
4
5
6
d1(q,a) = the set of states reachable from state q in M taking 0 or more l-transitions and exactly one transition on the character a
Break this down into three steps
First compute all states reachable from q using 0 or more l-transitions
We call this set of states L(q)
Next, compute all states reachable from any element of L(q) using the character a
We can denote these states as d(L(q),a)
Finally, compute all states reachable from states in d(L(q),a) using 0 or more l-transitions
We denote these states as L(d(L(q),a))
This is the desired answer
a
l
b
l
l
b
1
2
3
4
5
6
d1(1,b) = {3,4,5}
Compute L(1), all states reachable from state 1 using 0 or more l-transitions
L(1) = {1,2}
Compute d(L(q),b), all states reachable from any element L(1) of using the character b:
d(L(q),b) = d({1,2},b)
= d(1,b) U d(2,b)
= {} U {3} = {3}
Compute L(d(L(q),a)), all states reachable from states in d(L(q),a) using 0 or more l-transitions
L(d(L(q),a)) = L(3)
= {3,4,5}
a
l
b
l
l
b
1
2
3
4
5
6