Example 7.2.2. (repeats the LBA of Example 7.2.1)
0: if {0} print X, right_to 1;
if {1} print X, right_to 2
1: while {0,1} right;
if {0} print Y, left_to 3
2: while {0,1} right;
if {1} print Y, left_to 3
3: while {0,1,Y} left;
if {X} right_to 4
4: if {0} print X, right_to 5;
if {1} print X, right_to 7;
if {Y} right_to 9
5: while {0,!} right;
if {Y} right_to 6
6: while {Y} right;
if {0} print Y, left_to 3
7: while {0,1} right;
if {Y} right_to 8
8: while {Y} right;
if {1} print Y, left_to 3
9: while {Y} right;
if {0,1} halt;
accept
Previous slide | Next slide | Back to first slide | View graphic version |