Junaid Khan Department of Computer Science University of Peshawar Pakistan Presented by
Junaid Khan Department of Computer Science University of Peshawar Pakistan Presented by
Junaid Khan
Department of Computer Science University of
Peshawar Pakistan
[email protected]
Transition Graphs
a b b a,b
ba a
– b +
– +
baa 2 b
aa
b
abbaab 1 2
3 1 4
abb aa b
abbab crashes.
Transition Graphs
Many start states
1 1
–
a
a
b 2 b +
2– + –
3 aba 3 aba
–
– +
L= L = {}
–
+
abba –
baa
–
– + – +
Transition Graphs
All words ending in b: (a+b)*b
a,b a FA b
b
b – +
– +
a
transition graph:
Some words can fail, crash, and succeed: abab.
Transition Graphs
a,b
b
+
a
– a,b
b
a
+
aa b
b b b +
–
aa
Transition Graphs
Language EVEN-EVEN
a a +
–
a,
– a a +
b,
a* a*
(ba+a)* b+ +
+
Transition Graphs
Kleene Star Closure and Loops
b a,b
a,b a +
–
(a+b)*
(a+b) b* a +
–
Transition Graphs
Choosing Transitions
4 … b 4 …
abb ab
… 3 … 3
abb abb
5 … 5 …
Transition Graphs
Choices even with restriction of 1 letter per edge
8 … Machine is nondeterministic
a
… 7 b 9 …
b
8 …
1 … a
0
… 7 b 9 …
b 1
0
…