Since the turing machine is completely determined by the definition of alfabet on the tape and the state machine that reads the tape, it would be wiser to make the language as a table
Allows you to name the state Qn, characters Alfabet Ai, read from the tape. The machine determines the following state from the transisiton an table and writes Ao to tape and moves in the D direction: L / R
Then the machine can be identified by writing it
QnAi → QmAoD
The wikipedia add program will then become
QbA0 -> QbA1R QbA1 -> QbA1R Q0A- -> Q0A-L Q1A0 -> QrA-L Q1A1 -> QaA-L Q1A- -> QrA-L
with the receiving state and r rejecting state. This is a fairly compact and readable presentation of the transliteration matrix.
This, of course, suggests that what is on the tape is interpreted as data. But there is nothing stopping the creation of a transition matrix in order to make a statemachine interpretative instruction from tape.
To implement this, you have a tuple on the left side and a triple on the right, so it displays a search in a 2D array for reading a triplet. Move the C # state to the bits of the character on the tape and connect them together. Multiply (ok, another switching operation) to make room for the triplet, and use it as an offset in the table to read the triplet.
Write the new state in the status register, char on the tape and inc decrement if you find the data in the triplet or stop any data there. It should be fun to build.
Peter Tillemans
source share