Interactive visualization of Turing Machine components and operation
M = (Q, Σ, Γ, δ, q₀, ␣, F)
Current State | Read Symbol | New State | Write Symbol | Move |
---|
The machine starts in state q₀ with the input string on the tape, surrounded by blanks (␣). The head is positioned at the leftmost input symbol.
The head reads the symbol at its current position. This symbol and the current state determine the next action.
The control unit consults δ (transition function) to determine: new state, symbol to write, and head movement direction.
The head writes the new symbol at its current position, then moves left (L) or right (R) one cell.
Steps 2-4 repeat until no transition is defined for the current state and symbol (halt).
If halted in a final state (F), the input is accepted. Otherwise, it's rejected (either by halting in non-final state or infinite loop).
The configuration of a TM at any point can be represented as: α q β
Initial: q₀ 0 1 0 ␣
After 1st transition: 1 q₁ 1 0 ␣
After 2nd transition: 1 0 q₁ 0 ␣
Final: 1 0 1 qf ␣ (Accepted)