• Link between our universe and
computational universe
• Cellular automata are self-replicating
abstract machines
• Humans are self-replicating biological
machines (down to the cellular level)
• Or is the entire universe a single machine?
Slide 8
Slide 8 text
• Abstract machine is a model of
computation
• Or a really simple interpreter
• Cellular automata are abstract machines
Slide 9
Slide 9 text
Conway’s Game of Life
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
• if alive
• 2 or 3 neighbours to survive
• if dead
• exactly 3 neighbours to spawn
• else
• cell is dead
• For every problem there is a special purpose
brain that solves it as fast as possible.
— Konrad Zuse, 1937
Slide 122
Slide 122 text
add
increment one-third
Slide 123
Slide 123 text
add
increment one-third
add
increment one-third
Slide 124
Slide 124 text
add
increment one-third
Slide 125
Slide 125 text
add
increment one-third
U
Slide 126
Slide 126 text
U
M
Slide 127
Slide 127 text
No content
Slide 128
Slide 128 text
• Stored-program computer (John von
Neumann)
• Programs as data
• PHPPHP
Slide 129
Slide 129 text
Turing completeness
Slide 130
Slide 130 text
• System capable of emulating a turing
machine
• Unbounded storage
• Conditional branching
• Recursion
Slide 131
Slide 131 text
• Universal Turing Machine
• λ-calculus (Alonzo Church)
• Game of Life
• Brainfuck
• PHP
Slide 132
Slide 132 text
• If PHP can only do as much as a turing
machine, why bother?
• Beware of the Turing tar-pit in which everything is
possible but nothing of interest is easy.
• Epigrams on Programming by Alan Perlis
Slide 133
Slide 133 text
Self-reference
Slide 134
Slide 134 text
Slide 135
Slide 135 text
Recursion
Slide 136
Slide 136 text
call_user_func(
function ($x) { return $x($x); },
function ($x) { return $x($x); }
);
Slide 137
Slide 137 text
while (true);
Slide 138
Slide 138 text
No content
Slide 139
Slide 139 text
No content
Slide 140
Slide 140 text
Russell’s paradox
Slide 141
Slide 141 text
• Let R be the set of all sets that do not
contain themselves
• Does R contain itself?
Slide 142
Slide 142 text
• Barber paradox
• A town with just one barber
• Everyone either shaves themselves or goes
to the barber
• Barber shaves all who do not shave
themselves
• Who shaves the barber?
Slide 143
Slide 143 text
• Liar paradox: “This sentence is false.”
• Type theory
• Hierarchy of types avoids self-reference
• And then came Gödel in 1931 and smashed
the foundation of mathematical reasoning
Slide 144
Slide 144 text
Entscheidungsproblem
Slide 145
Slide 145 text
• David Hilbert asks for an algorithm that
decides if a statement in first-order logic is
universally valid
• Halting problem can be reduced to
Entscheidungsproblem
• Machine that determines if another
machine will halt
Slide 146
Slide 146 text
Halts?
Slide 147
Slide 147 text
Halts?
Negate
Slide 148
Slide 148 text
Halts?
Negate
Copy
Slide 149
Slide 149 text
Halts?
Negate
Copy
{
X
Slide 150
Slide 150 text
( )
X X
Slide 151
Slide 151 text
Halts?
Negate
Copy
X
Slide 152
Slide 152 text
Halts?
Negate
Copy
X X
Slide 153
Slide 153 text
Halts?
Negate
Copy
true
X
X
Slide 154
Slide 154 text
Halts?
Negate
Copy
X
∞ true
X
Slide 155
Slide 155 text
Halts?
Negate
Copy
X
∞ true
X X
X
}
Slide 156
Slide 156 text
Halts?
Negate
Copy
false
X
X
Slide 157
Slide 157 text
Halts?
Negate
Copy
false
halting now
X
X
Slide 158
Slide 158 text
Halts?
Negate
Copy
false
halting now
X
X X
X
}
Slide 159
Slide 159 text
• Proof by contradiction
• Decision machine cannot exist
• Rice’s theorem generalises this
• We are screwed
Slide 160
Slide 160 text
Ways to cope
Slide 161
Slide 161 text
No content
Slide 162
Slide 162 text
No content
Slide 163
Slide 163 text
Use finite state
machines in parts of
your programs
Slide 164
Slide 164 text
Introduce high-level
concepts such as
bounded loops
Slide 165
Slide 165 text
Build restricted subsets
of computing such as
type systems