Intuition The one core idea
A Turing machine is just a strip of paper cells with a pencil-eraser head that reads one cell, rewrites it, and shuffles one step left or right — following a tiny fixed rulebook. Everything else in the parent note is bookkeeping notation for describing that one picture precisely enough to reason about it.
Before you can read the parent note (topic note) , you need to see every symbol it throws at you. We build them one at a time, each on top of the last. Nothing is used before it is drawn.
Two words appear on every line of the parent note, so let us pin them down first.
Definition Set — a bag of allowed things
A set is just a collection of items with no repeats and no order. We write it with curly braces: { 0 , 1 } is "the bag containing 0 and 1 ". If x is inside the bag we write x ∈ S ("x is a member of S "). If it is not, x ∈ / S .
Definition Alphabet and string
An alphabet is a finite set of symbols — the characters you're allowed to write. A string is a finite row of those symbols placed side by side, like 0110. The set of all strings you can build from an alphabet Γ is written Γ ∗ (the little star means "any length, including the empty string").
Think of the alphabet as the keys on a tiny typewriter, and a string as one line typed with those keys. Γ ∗ is "every line you could ever type".
The parent note needs these because a Turing machine's whole job is to read and rewrite strings built from an alphabet .
The tape is an infinitely long strip divided into equal boxes called cells . Each cell holds exactly one symbol at a time. The strip stretches forever to the right (and by convention starts at a left edge — cell 0 ).
Why infinite? Because we want no memory limit . A finite automaton has a fixed brain; a real computer runs out of RAM. The tape's endlessness is what makes the model able to compute anything computable .
Intuition But the input is finite!
You only ever write finitely many symbols. So how does the machine know where "your writing" ends and "empty space" begins? That is exactly what the blank symbol below is for.
⊔
⊔ (a little "cup" shape) is a special symbol meaning this cell is empty . Every cell you never wrote to holds ⊔ . It lets the machine detect "I've reached the end of the real data".
Common mistake "Blank means nothing is there."
Why it feels right: empty looks like nothing. Fix: ⊔ is a real, readable symbol . The head can read it, and the rulebook can react to it — that is how a machine knows it walked off the end of the input.
Definition Input alphabet
Σ vs tape alphabet Γ
Σ (capital sigma) — the input alphabet : the symbols your input string is allowed to use. Blank is never in it: ⊔ ∈ / Σ .
Γ (capital gamma) — the tape alphabet : every symbol that can ever appear on the tape . It always contains the blank and always contains all of Σ : ⊔ ∈ Γ and Σ ⊆ Γ .
The symbol ⊆ means "is a subset of" — every member of the left set is also in the right set. So Σ ⊆ Γ says: whatever you may type as input, the machine can also write on the tape.
Intuition WHY two alphabets and not one?
The machine needs scratch symbols — markers like X or # — to keep track of its work, the way you'd tick items off a list. Those markers must never be confused with real input. So Γ is the bigger bag (Σ plus blank plus markers), and Σ is the smaller "input-only" bag inside it.
Definition State and the set of states
Q
A state is the machine's current mood — a label for "what I'm in the middle of doing" (e.g. "hunting for the next 0"). Q is the finite set of all possible moods. There are only finitely many, which is why the control is called finite control .
The head is a pointer — imagine a finger resting on one cell. It can read that cell, overwrite it, and slide one cell left or right. It never jumps more than one cell per step.
Intuition Why only one cell and one step?
Simplicity is the whole point. If this bare-bones machine can already compute everything, then fancier abilities (jumping, multiple tapes) add no extra power. We prove that later; for now, small moves keep the model easy to reason about.
Three named states matter specially:
Definition Start, accept, reject
q 0 — the start state , the mood the machine begins in.
q accept — the mood meaning "yes , I accept this input", and I stop .
q reject — the mood meaning "no , I reject", and I stop .
We require q accept = q reject — the two must be different moods, otherwise "yes" and "no" would be the same thing.
Definition Move direction
{ L , R } is a two-item set: L = "slide the finger one cell left ", R = "one cell right ". Every step moves the head by exactly one of these.
Common mistake "The head can also stay put."
Why it feels right: sometimes you'd like to write without moving. Fix: in this standard definition there is no "stay" option — every step moves L or R . (The one exception: pushing L at the left edge leaves the head where it is, by convention.)
Now the biggest symbol. Everything above was nouns; δ is the verb .
Definition Function and the arrow
→
A function is a machine-within-the-machine that takes an input and gives back exactly one output. We write f : A → B to mean "f turns each item of set A into an item of set B ". The × (Cartesian product) glues sets into pairs: A × B is "the set of all pairs, one from A and one from B ".
Definition Transition function
δ
δ : Q × Γ → Q × Γ × { L , R }
Read left-to-right: give δ a pair (current state, symbol under head); it returns a triple (new state, symbol to write, direction to move). One reading of δ = one step of the machine.
function and not just any rule?
A function gives exactly one output per input — no ambiguity. Because δ is a function, from any (state, symbol) the machine's next move is completely determined. That is what makes this a deterministic Turing machine: no choices, no dice. (Machines that do branch are Nondeterministic Turing Machines .)
Mnemonic Remember the seven as one sentence
"Q uiet S tudents G et δ etention q₀ uickly, accept ing or reject ing." — states, Σ, Γ, δ, start, accept, reject.
This is the notation that trips people up most, so we earn it slowly.
Intuition Why bundle three things into one word?
At any instant, the machine's entire future depends on only three facts: which mood (q ), what's on the tape , and where the finger sits . If we pack all three into a single written string, we can describe a whole computation as a list of these snapshots — like movie frames.
u q v
Write the tape left-to-right, but insert the state letter q right before the cell the head points at . So:
u = everything on the tape left of the head,
v = everything from the head onward (head reads the first symbol of v ),
the state q sits sandwiched between them.
Both u and v are strings from Γ ∗ . Everything past v is blanks.
Worked example Reading a configuration
1011 q 7 01111 means: tape reads 101101111, the machine is in mood q 7 , and the finger is on the 0 that comes right after 1011. If v is empty (nothing after q ), the head is reading a blank ⊔ .
⊢
C 1 ⊢ C 2 ("C 1 yields C 2 ") means: applying δ once to snapshot C 1 produces snapshot C 2 . It is the single-step arrow of the whole model — one turn of the crank.
The parent note's yield rules (move-right, move-left, left-edge) are just this one idea spelled out for each direction. You now have every symbol needed to read them.
L
A language is just a set of strings — the strings we consider "good" / "in". L ( M ) = { w : M accepts w } is the set of all inputs machine M says yes to.
Definition Recognizable vs decidable (in one breath)
Recognizable : some TM accepts every good string. On bad strings it may loop forever — never answering "no". See Recursively Enumerable Languages .
Decidable : some TM always halts with a definite yes or no. See Recursive Languages . A machine that always halts is a decider .
The gap between them — looping forever instead of saying "no" — is exactly where the Halting Problem lives.
Two alphabets Sigma and Gamma
Transition function delta
Turing machine topic 4.6.13
Where does this all lead? These same foundations power the whole neighbourhood: Finite Automata and Pushdown Automata are weaker cousins, Multitape Turing Machines and Nondeterministic Turing Machines are equal-power variants, and the Church-Turing Thesis claims this simple picture captures all of computation.
Self-test: cover the right side and answer before revealing.
What does x ∈ S mean? x is a member of the set S .
What is a string over an alphabet Γ ? A finite row of symbols each taken from Γ .
What does Γ ∗ denote? The set of all strings (any length, including empty) over Γ .
What is the blank symbol ⊔ for? It marks an empty cell, letting the machine detect the end of real input.
Why are there two alphabets Σ and Γ ? Σ is input-only; Γ adds blank and scratch markers for bookkeeping.
State the containment relation between them. Σ ⊆ Γ and ⊔ ∈ Γ but ⊔ ∈ / Σ .
What is a "state" in plain words? The machine's current mood — what it's in the middle of doing.
Why must q accept = q reject ? Otherwise "yes" and "no" would be the same state and answers would be meaningless.
What are the only two head moves? L (one cell left) or R (one cell right).
What does δ ( q , a ) = ( r , b , D ) tell the machine to do? In state q reading a : go to state r , write b , move in direction D .
Why is δ a function and not just a relation? A function gives exactly one output per input, making the machine deterministic.
In u q v , what symbol is the head reading? The first symbol of v (blank ⊔ if v is empty).
What does C 1 ⊢ C 2 mean? C 2 is what you get by applying δ once to C 1 .
What is a language? A set of strings.
Recognizable vs decidable — the one-word difference? A decider always halts ; a recognizer may loop forever on non-members.