The busy beaver game
A simple yet non-computable function
A Hierarchy of Program Types
Recursively Enumerable Function
Recursive
A Hierarchy of Program Types
A function that can be
de-recursed
i.e. that is the function can be computed by a computer
program whose loops are all "for" loops
Recursively Enumerable Function
Recursive
A Hierarchy of Program Types
Informally, functions that you just have to define them
re-cursively!
A function for which a ‘yes’ answer can be verified by a Turing machine in a finite amount of time
Recursively Enumerable
Recursive
A Hierarchy of Program Types
A subset of recursively enumerable (RE).
The Turing Machine will always halt in this case.
Recursively Enumerable
Recursive
A Hierarchy of Program Types
Recursively EnumerableRecursive
Primitive Recursive
(Non-computable)Undecidable!
Non-computable
• An non-computable function is a function
which can’t be computed by any algorithm.
• Equivalently, not by any
Turing machine
!The Busy Beaver Game
• The concept was first introduced by Tibor Radó in his 1961 paper, "On Non-Computable Functions".
The Busy Beaver Game
•What is the maximum number of 1s that
get printed on your tape, for your
given
Turing machine
, when it
halts
?
The Busy Beaver Game
•We shall use
binary Turing machines
;
that is, Turing machines with the binary
alphabet 0, 1.
•We shall use the term
“card”
instead of
“state”.
Radó’s “Binary Turing Machine”
Divide a long tape into
squares, each square is a memory location
Read/write head (scanner)
Radó’s “Binary Turing Machine”
14/45
··· 0 0 0 0 0 0 0 0 ···
Difference Between Rado’s Turing Machine and what we’ve learned in the lecture:
• Initially an all-zero tape
• Start from the middle of the tape • Unbounded to both left and right
thus no left endmark symbol
• No blank symbol ▷
• Can’t “remain stationary”
“Card”
C
10 1 0 2
1 1 1 3
“Card”
C
10 1 0 2
1 1 1 3
“Card”
C
10 1 0 2
1 1 1 3
Contains the alphabet 0,1
“Card”
C
10 1 0 2
1 1 1 3
Contains the alphabet 0,1
The “shift” column:
0 : left shift 1 : right shift
“Card”
C
10 1 0 2
1 1 1 3
Contains the alphabet 0,1
The “shift” column: 0 : left shift 1 : right shift Overprint by The index of next card 0: halt
A 1-card Turing machine Example
C1
0 1 0 1 1 1 0 0
A 1-card Turing machine Example
C1
0 1 0 1 1 1 0 0
A 1-card Turing machine Example
C1
0 1 0 1 1 1 0 0
A 1-card Turing machine Example
C1
0 1 0 1 1 1 0 0
A 1-card Turing machine Example
C1
0 1 0 1 1 1 0 0
1 1 1 1 1 0 0 0 0 0
Rules
•The contestant selects a positive number
n; and makes up his own n-card, binary
Turing machine.
•He starts his machine on the all-zero
tape, and satisfies himself that his
machine
stops
after a certain number of
shifts.
Rules
• The BB-n champion is the contestant who
achieved the highest score (i.e. the number of 1s on the tape) in the BB-n game.
•The highest score in the BB-n game is
called
the busy beaver function (also
called Rado’s sigma function) Σ (n)
.
How to compute Σ (n)?
The answer is –
How to compute Σ (n)?
Overprint Shift Next card Read 0/1 n different cards
Strategy
To prove Σ(x) is non-computable, we would like to prove that for
some x>x0, Σ(x)≠f(x) for any
computable function x.
In this proof, we will try to prove
Notation: “-”
Let f(x), g(x) be two functions. We shall
write f(x)>-g(x) to state that f(x)>g(x) for x greater than a certain x0.
Using this notation, we shall now prove the following theorem.
Theorem
Σ(n)>-f(n) for every computable (that is, general
recursive) function f(n) for n. Hence Σ(n) is non-computable.
Proof
C1 0 1 1 2 1 1 1 0 C2 0 1 1 3 1 -C3 0 1 0 1 1 -0 0 0 0 0 0 0 0 0 0Proof
C1 0 1 1 2 1 1 1 0 C2 0 1 1 3 1 -C3 0 1 0 1 1 -0 0 0 0 1 1 1 0 0 0Proof
But note that C is decided by F, so n must be sufficiently large.How big is Σ(n)?
Even though Σ(n) is non-computable, it is
entirely possible that Σ(n) can be effectively determined for particular values of n.
How big is Σ(n)?
How many TMs? Cards Max score
64 1 1
20736 2 4
16777216 3 6
25.6 trillion 4 13
•For 5-card busy beaver game, the
maximum score
so far
is 4098.
Summary
• The busy beaver function a famous function in
computation theory.
• We can prove its non-computability by proving that Σ(n)>f(n) for any computable function n for some
sufficiently large n.
• But we do can find Σ(n) for some n!
• Scientist are now working on 5-card and 6-card
busy beaver game.