CAs and Turing
Machines
The Basis for Universal
Computation
What We Mean By Universal
When we claim “universal computation” we mean that
the CA is capable of calculating anything that could
possibly be calculated*.
It takes some input, runs a “program”, and produces some output.
Or really, we mean it can calculate any algorithm.
Algorithms are a well-defined finite sequence of
instructions that will always terminate (eventually) with
an answer.
Oh, get it? Those are just computer programs.
*Some things are impossible to calculate
with any computer.
Your Laptop Is Universal
So how about your desktop or laptop?
Intuitively, you know it is universal – you’ve used it enough to
know it can do just about anything with the correct hardware
and software.
You know it will run any algorithm (program).
So let’s dissect your computer and see what’s
inside. That will help us see what parts of a CA
correspond to the parts of your “real” computer.
Parts of a Computer
output
input
Guts of a Computer
More I/O
(CDs, USB,
etc.)
Processor
(on “mother board”)
Memory cards
(RAM)
Power supply
Important Parts: Power Supply?
No, not power supply!
Turns out energy is unnecessary for computation.
Why? Can make “reversible” computers.
Kind of like reversible CA!
Copying or measuring a bit is ultimately free.
Just can’t erase anything – that costs energy (increases
entropy).
So don’t erase anything – just copy bits into new space.
All information is preserved (nothing erased) so no energy
expended.
Cool proof by Landauer.
Ok, so we can’t build a powerless computer yet (but we’re
working on it).
Important Parts
Input
Yes, need a way to get the program (algorithm) and the data (initial
state) into the machine.
Output
Yes, need a way to get the result of the computation.
But could share with the input device!
E.g., read and write from the same disk.
Memory
Yes, need a place for temporary storage.
But could share the input and output device!
E.g., read, write, and store temporarily on the same disk.
Processor
Yes, need something that actually does the calculation.
Typically filled with lots of boolean gates or circuits.
And has a clock. Keeps all the operations in sync.
Parts of CA Computers
Have to be built from the same parts!
Memory/input/output
Processor and clock
Turing in 1936 mathematically formalized
these parts.
Was interested in what can and can’t be
computed.
Created very simple concept of a “Turing
Machine” (TM) built from these parts.
So we’ll start with TMs and then show equivalence to
some CA.
Turing Machine
Has a finite-sized control.
The processor.
Has a tape and a tape head.
For reading, writing, memory on the tape.
Tape can be magnetic (like floppy disk), paper, legos, piles of
cookies, etc.
Tape is infinite!
Ok, so that is one difference.
But practically speaking we can create as big a tape as we
would like for our desktop.
Turing Machine Picture
#
0
1
0
1
0
0
1
0
#
Blank tape
(often written with
the symbol #)
#
#
#
Tape head for reading and writing
Tape with symbols
(I/O and memory)
Put you program
and data here!
q0
q4
q3
q1
q2
Finite control
(processor)
...
Finite State Control
This is just an automata.
Take automata theory.
q0
q4
q3
q1
q2
Has a finite number of states qo through qn.
The current state is indicated by the arrow.
At discrete steps (the clock!), the automata does two
things.
1.
2.
State changes to a new qi that depends on
(1) the current state, and
(2) the symbol on the tape.
Either writes a new symbol on the tape, or moves tape
head left or right to a new position.
How’s That Transition Work?
Define the transition from one state to
another as
d(qi, X) = (qj, Y, D) where
qi is the current state
qj is the next state
X is the current symbol on the tape
Y is the symbol that is written in place of X
D is the direction that the tape head moves
L = left, R = right, S = stay put
Picture of Transition Function
Draw transition d(qi, X) = (qj, Y, D) as
qi
X/Y, D
qj
So can draw entire TM this way
show all possible transitions
Example TM: Accept Input With “aba”
Looks like a typical automata! (Take Automata Theory.)
This TM “accepts” all strings that contain a substring “aba”.
Assumes an alphabet of a, b, and # (could be 0, 1, and #).
Program quits when reaches ha or hr.
ha is an accepting state indicating that input does contain “aba”.
hr is a reject state indicating that input does not contain “aba”.
hr
b/b, R
#/#, R
#/#, R
#/#, R
#/#, R
q0
Try it!
q1
a/a, R
a/a, R
q2
b/b, R
b/b, R
q3
a/a, R
ha
tape not shown
TM Example: n mod 2
This TM calculates n mod 2.
Assumes an alphabet of 1 and # (could be 0, 1, and #).
Represents a number in unary. E.g., 1111 is 4, 11111 is 5.
On tape will leave a single 1 or nothing.
1/1, R
#/#, R
q0
#/#, R
1/#, L
#/#, L
q1
q2
q3
#/#, R
q4
#/1, R
ha
1/#, L
Try it on #111# and #1111#
tape not shown
So What’s the Big Deal?
This simple “computer” is as powerful as it gets.
Extensions to the model add no new power.
Extra tape heads, two-dimensional tapes, etc.
Or even CD-ROMS, USB ports, etc.
Lots of proofs of this. Take Theory of Computation.
E.g., Having 2 tapes is same as 1 tape. The proof
essentially takes one tape and splits it into two.
May not be as efficient as your desktop, but can do all the
same stuff.
May not be as pretty (the output is on tape, not a nice
display), but gives the same answers.
Church’s Thesis
Church-Turing Thesis: Turing Machines are
formal versions of algorithms.
Can’t
Can
be proved.
Why? Because an algorithm isn’t mathematically defined.
In fact, this thesis says that the TM is the mathematical
definition.
be disproved.
Why? Someone could invent something more powerful
tomorrow.
Not likely to be disproved. Every other type of “computation”
has been proven identical.
Lambda-calculus, general recursive functions, quantum
computing, etc.
In fact, we will prove that CA computation is identical to the
Turing Machine!
Philosophical Implication
Anything you want to calculate can be done on a
Turing Machine.
So if you want to prove that something can do
any calculation, you have to show it is equivalent
to all possible Turing Machines.
All TMs? Yup!
i.e., we have to show that Rule 110, Life and
other “Universal CA” are equivalent to all TMs.
Sounds like a pain.
So we’ll create a “Universal” TM that makes life easier.
Universal TMs
Our current TM can only do one kind of task at a time.
Your desktop can do many different tasks.
We don’t have to rebuild your desktop for every new application.
So what’s the difference?
We need to build a so called “universal TM”.
A Universal TM can read in (as input) any other TM and
run its program!
We fix the finite state machine (i.e., control/automata) to solve that
particular task.
Ah, a programmable TM.
So now we just have to show that a CA is equivalent to
this one Universal TM!
Turing Machine: Definition
A Turing Machine is a quadruple (Q, S, d, q0) where
Q is a finite set of states, not including the halt state qh.
S is an alphabet including the blank symbol but not the symbols
L, R, S.
q0 Q is the initial state.
d is the transition function from Q S to (Q {qh}) S {L, R, S}
Note: The transition function is the same as what we defined before,
but here we were careful to show that we can’t transition away from
the halt state.
Note: Sometimes the definition for the transition function is Q S to
(Q {qh}) (S {L, R}) with no S symbol. i.e., the TM can (1)
move L or R, or (2) write a new symbol on the tape, but it can’t do
both at the same time. This changes nothing fundamental.
Building A Universal TM
If a Universal TM is going to read any other TM
as input (from its tape), then we need a way to
encode a TM (so we can write it on a tape).
Our Universal TM will use the alphabet {0, 1, #}.
Then everything about the TM it is reading must be
represented in this alphabet.
Let state
q0 be 0
q1 be 00
q2 be 000
and in general qi be 0i+1. (The exponent means
concatenation.)
Continuing in this way, we can build a table representing the
symbols of a TM (see next slide).
Mapping TM Symbols Onto a
Universal Tape
The ai are the alphabet.
For example, 0 and 1.
Or 0, 1, and 2. Or “a”
and “b”. Etc.
Original TM
symbol
Code for input on
Universal TM
#
0
ai
0i+2
ha
0
hr
00
qi
0i+1
S
0
L
00
R
000
Mapping Transitions And Input
Onto a Universal Tape
d(qi, ai) = (qk, ak, D) is represented by
“qi1ai1qk1ak1D1”.
Just separate by ones.
For example, d(q0, a2) = (q1, a4, L) is
01000010010000001001
An input string W is W = 1ai1ak1am1an1…ap1
Begin and end with a 1.
Encoding The Whole TM
Suppose there are n states and m letters in the
TM alphabet.
|Q| = n, |S| = m
Then there are nm possible transitions.
Call them Sik
where 1 ≤ i ≤ n and 1 ≤ k ≤ m
Then we can list the whole Turing machine (Q,
S, d, q0) and its input in this order
1q01S11S12...S1mS21S22...S2m...Sn1Sn2...Snm1W
We’ll abbreviate this input as MW
M for Turing “Machine”
Universal TM Operation
So how’s the Universal TM (UTM) work on this
input MW?
To make the explanation easier, let’s use a UTM that has
three tapes.
Recall, this adds no new powers to the UTM.
Tape 1 will initially hold the input state MW.
Tell the UTM to copy W onto tape 2.
Writing automata to copy and shift input states is
straightforward.
Note M and W are easy to find – it’s the only part of the
input that is separated by three 1’s.
Tell the UTM to copy the initial state q0 onto tape 3.
Again, easy to find.
Universal TM Picture
W used to be here. And of course, M and W
actually occupy many cells.
So far we have
Input
#
M
#
#
#
#
#
#
#
#
#
#
#
...
The init
state of
the TM
#
W
#
#
#
#
#
#
#
#
#
#
#
...
State
of M
#
q0
#
#
#
#
#
#
#
#
#
#
#
...
...
q0
q4
q1
q2
q3
Universal TM Operation (cont.)
1.
Tell the UTM to move the head of tape 2 to the first simulated
tape cell of the TM.
2.
UTM now finds the transition on tape 1 that corresponds to the
current state (on tape 3) and the current cell value (on tape 2).
3.
Execute this transition as follows.
1.
Change the contents of tape 2 to reflect the new cell value.
(i.e., update W)
2.
3.
4.
Move the tape head on tape 2 in the direction indicated. i.e., move right
or left to the next (or previous) simulated tape cell of the TM.
Change the contents of tape 3 to the new state.
Repeat until can’t find a transition (in which case it halts and
rejects) or enters accepting state (halt and accept).
Sweet! (And phew!)
Taking Stock
Ok, we have a Universal TM that can simulate
any other TM.
So now, to show that we have a Universal CA,
we just have to prove it is equivalent to a
Universal TM.
In other words, that will prove that the CA can calculate any
algorithm.
And next, we do that for the “Game of Life”!
© Copyright 2026 Paperzz