Open essepuntato opened 2 years ago
input: ' '
blank: '0'
start state: A
table:
A:
' ' : { write: 0, R: B}
0 : { write: 0, L: C}
B:
0 : { write: 1, L: A }
C:
0 : { write: 1, R: D }
D:
I attach my solution proposal for this exercise:
Current State | Tape Symbol | Write Symbol | Move Head | New State |
---|---|---|---|---|
A | 0 | 1 | Right | B |
B | 0 | 1 | Left | A |
A | 1 | 0 | Left | C |
C | 0 | 1 | Right | D |
On "Turing machine Visualization" this can be rendered as:
blank: '0'
start state: A
table:
A:
0: {write: 1, R: B}
1: {write: 0, L: C}
B:
0: {write: 1, L: A}
C:
0: {write: 1, R: D}
D:
Current stateTape symbol_Write symbolMove head__Next state A_____read 0 or 1____0leftB B____read 0 or 1____1__right__C__ C_read 0 or 1____0__right__B__ B_read 0 or 1____1__right__D__
Table of instructions:
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
CURRENT STATE | TAPE SYMBOL | WRITE SYMBOL | MOVE HEAD | NEW STATE -- | -- | -- | -- | -- A | 0 | 1 | Left | B A | 1 | 0 | Right | C B | 0 or 1 | 1 | Right | A C | 0 or 1 | 1 | Left | D
Write the table of instructions of a Turing machine with four states – A (initial state), B, C, and D (final state) – such that, once reached the final state, only the cells immediately on the left and on the right of the initial position of the head of the machine will have the value 1 specified. The final state must not have any instruction set in the table.