Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CSI3104-W06
b a
a b
a,b
An FA: {baa} a,b The word a? The word baabb? The input fails, or the machine fails on the input. The input is rejected.
Dr. Nejib Zaguia CSI3104-W06 2
ba
a
b a,b a,b
+
aa, ab, bb
A transition graph that accepts the language {baa} What it seems to be a More Powerful Machine
CSI3104-W06
Two other equivalent Transition Graphs with fewer states baa baa
+ +
all else
a,b
a,b
The word a? The word baabb? The input crashes. The machine crashes. The input is rejected. (2 ways for an input to be rejected)
CSI3104-W06 4
a,b
a,b aa,bb
+
b|aa - accepted b|a|a - rejected 1 way to crash ba|a rejected The machine represents a language L. baa L? For all w, w L if there exists a path that arrives at a final state.
Dr. Nejib Zaguia CSI3104-W06 5
ba
ab
+
baa
A transition graph (TG) is the following 3 things: 1. a finite set of states, at least one of which is designated as the start state, and some (maybe none) of which are designated the final states (or accepting states) 2. an alphabet of input letters 3. a finite set of transitions that show how to go to a new state, for some pairs of state and substrings of letters (or ). (One pair can have 0, 1, or more next-states.)
Dr. Nejib Zaguia CSI3104-W06 7
A successful path is a series of edges beginning at some start state and ending at a final state. The concatenation of all the substrings that label the edges in the path is a word accepted by this machine. The set of words accepted is the language of the transition graph.
CSI3104-W06
Example:
1
abb
L aa
4 +
b
2 3 1 4
abbaab
abb
aa
abbab crashes.
Dr. Nejib Zaguia CSI3104-W06 9
a b aba
+
1 2
a b aba
+
L L
These two machines are clearly equivalent. Remark: Every finite automaton is a transition graph.
Dr. Nejib Zaguia CSI3104-W06 10
L=
L = {L} L baa
+
abba
L = {}
+ +
L
+
CSI3104-W06
12
a,b
b +
FA b a
b
+
transition graph: Some words can fail, crash, and succeed: abab.
CSI3104-W06
13
a,b b a b aa b aa
Dr. Nejib Zaguia CSI3104-W06 14
a,b a b b b
+
Language EVEN-EVEN
FA:
even a even b
b 2 b a b a 4 b
even a odd b
Transition Graph:
aa,bb
+ ab,ba aa,bb
1 +
a
odd a even b
a
balanced odd a odd b
CSI3104-W06
ab,ba
unbalanced
15
b a bbb a a a,b + b
a
b
ab bbb bb
abbbabbbabba
bb a
Dr. Nejib Zaguia
CSI3104-W06
16
L
a a
+
a b, L
But not here
Dr. Nejib Zaguia CSI3104-W06
18
A generalized transition graph (GTG) is the following 3 things: 1. a finite set of states, at least one of which is designated as the start state, and some (maybe none) of which are designated the final states (or accepting states) 2. an alphabet of input letters 3. a finite set of edges connecting some pairs of states, each labeled with a regular expression
Dr. Nejib Zaguia CSI3104-W06 19
a*
+
(ba+a)*
b+L
CSI3104-W06
20
a,b
+
a,b
(a+b)*
(a+b)
b*
CSI3104-W06
21
Choosing Transitions
ab
abb
abb
5
abb
5
22
CSI3104-W06
Machine is nondeterministic
b b
9 1 0
7
8
b
1 0
a b L
9
23
CSI3104-W06