Professional Documents
Culture Documents
State1 a State2
Figure1: Representation of a+
a State2 State3
State1
a'
Figure2: Representation of a*
a'
Figure3: Representation of a?
Solution Approach:
State1 1 State2
Figure4: Representation of 1+
0
State3
Figure5: Representation of 0
StateX X StateY
Figure6: Representation of X+
4. To consume two consecutive 1s, the representation of the
state diagram would be as in Figure7
1 1
State9 State10
Figure6: Representation of 11
LEVEL 2 Combine the individual state machines graphs
(1. and 2. for now!)
Any path that is not defined above, for instance the 0 path
from State1 leads to the initial state. So State1's 0 path
leads to itself.
0
1
Graph1
Expanding 3. Consumption of the symbol X where X is 10
StateX X StateY
10
StateX 10 StateY
StateX4 1
0 1
1 0 StateX3
StateX1 StateX2 0
Graph2
Joining Graph1 and Graph2
0
1
StateX4 1
0 1
1 0 StateX3 0
StateX1 StateX2
0
1
State1 1 State2 0
StateX4 1
0 1
0 1
1 0 StateX3 0
StateX1 StateX2
0
1
State1 1 State2 0
1
State9 State10
0 1
0 1
State1
0 State7
Out<=1
Out<=0
1
1
State6
1 State2
Out<=0 0
Out<=0
0
1 0 1
0
State3 State4 0 State5
Out<=0 Out<=0
1 Out<=0