CS 1104 Introduction to Computer Science

COMPILERS AND TRANSLATORS



Convince yourself that this machine will recognize strings with the following properties:

Every string starts with "0" and finishes with "1" but there are no limitations on the intermediate characters except that they must be chosen from the set {0,1}

Current State
Current Character
Next State
=> A
0
B
B
1
D =>
B
0
C
C
1
D =>
C
0
C
D
1
D =>
D
0
C

 

The state transition listing for the string "0111" is:

 

A
0
B
B
1
D
D
1
D
D
1
D
D (exit)

 

Now check out this machine by building it in one of two emulators:

Virginia Tech United Kingdom


[Prev][TOC][Next]


© J.A.N. LEE
Last Updated 2000/10/24