Current State (a) |
Current Symbol (A) |
Action (B) |
Next State (b) |
1 |
X |
- |
1 |
1 |
- |
R |
2 |
2 |
X |
R |
2 |
2 |
- |
L |
3 |
3 |
X |
- |
3 |
3 |
- |
L |
4 |
4 |
X |
- |
4 |
4 |
- |
L |
5 |
5 |
X |
L |
6 |
6 |
X |
L |
7 |
6 |
- |
- |
0 |
7 |
X |
L |
7 |
7 |
- |
R |
1 |
The answer to both sections of this question can be found in Chapter 3 of the textbook by Udi Manber. Part (a) is a proof straight from the book, while part (b), where you only needed to give a counterexample, is a solved exercise in the books (problem 3.15); you can find the solution in the back.