Dashboard Simulator Examples Theory About
Theory of Automata & Formal Languages

Turing Machine Simulator

An interactive visual environment to understand the fundamental model of computation — step by step, transition by transition.

11Built-in Examples
7Formal Components
Tape Length
50KMax Steps
Quick Launch Open the simulator with an example pre-loaded
⚙ Simulator
Symbol Palette — click to insert
Stateq0
Step0
Head0
Read
Ready
300ms
Transition Table
FromReadWriteMoveTo
Execution Log
Run the simulator to see execution steps…
✦ Custom Machine Designer — M = (Q, Σ, Γ, δ, q₀, B, F)

Transition Function (δ): One rule per line  |  Format: state, read → next, write, L|R|S
Example: q0, a → q1, X, R  |  Use B for blank  |  S = stay  |  Lines starting with // are comments
Transition Diagram
Built-in Examples Click any card to load it in the simulator
Theory Formal foundations of Turing Machines

Formal Definition

A Turing Machine is a 7-tuple M = (Q, Σ, Γ, δ, q₀, q_acc, q_rej) where:

Q— finite, non-empty set of states
Σ— input alphabet (blank ∉ Σ)
Γ— tape alphabet (Σ ⊂ Γ, blank ∈ Γ)
δ— transition function Q×Γ → Q×Γ×{L,R}
q₀— initial state (q₀ ∈ Q)
q_acc— accept state
q_rej— reject state (q_acc ≠ q_rej)

How a TM Computes

The machine begins with its input written on the tape and the read/write head at the leftmost cell. At each step, it reads the current cell, writes a symbol, moves the head left or right, and transitions to a new state.

Computation halts when the machine enters the accept or reject state. If it loops forever, the input is said to not be decided by that machine.

A language is Turing-decidable if some TM halts on every input. A language is Turing-recognizable if some TM accepts every member, but may loop on non-members.

The Church-Turing Thesis & Key Results

The Church-Turing thesis states that every effectively computable function can be computed by a Turing Machine. This is not a provable theorem but an empirical hypothesis supported by many decades of research.

Key theoretical results include the Halting Problem (undecidable), Rice's Theorem (every non-trivial semantic property of TMs is undecidable), and the existence of Universal Turing Machines which can simulate any other TM.

The study of Turing Machines underpins modern complexity theory: the classes P, NP, PSPACE, and others are defined in terms of resource-bounded Turing Machines.

About TAFL Project — Theory of Automata & Formal Languages

About this Simulator

This Turing Machine Simulator is a project for the Theory of Automata & Formal Languages course. It provides a fully interactive, visual environment to construct, run, and study Turing Machines step by step.

Key Features

  • Dynamic transition table — add, remove, edit any rule
  • Custom Machine Builder — write rules in text format
  • Step-by-step execution with full step-back history
  • Interactive SVG diagram with draggable states & zoom
  • Light & Dark mode with university-style aesthetic
  • 11 built-in example machines
  • Configurable initial, accept, and reject states
  • Adjustable execution speed

Technologies

HTML5CSS3 Vanilla JSSVG Google Fonts

Reference

Sipser, M. — Introduction to the Theory of Computation

Blank Symbol

Use B in the transition table to represent the blank tape symbol (□).