Class 20 Busy Beavers Spring 2010 University of Virginia David Evans Office hours I am not able to hold my Thursday morning office hours this week I will have office hours Thursday 11am1pm instead ID: 302212
Download Presentation The PPT/PDF document "cs3102: Theory of Computation" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
cs3102: Theory of ComputationClass 20: Busy Beavers
Spring 2010University of VirginiaDavid Evans
Office hours:
I am not able to hold my Thursday morning office hours this week. I will have office hours Thursday 11am-1pm instead. Slide2
Exam 2Out
Thursday, due next Tuesday (2:01pm)Should not take more than two hours to complete (but don’t wait until 12:01pm Tuesday to start it!)Prepare (before class Thursday) one page of notes: you may use this as much as you want during the exam
You may also use: course book, course handouts, your notes, other resources: but only for up to 30 minutes during examSlide3
Exam 2: Main TopicsCountable and uncountable infinite sets
Turing machines: Formal definitionComputing modelRobustness of TM modelChurch-Turing thesis and its implicationsTuring-recognizable, Turing-decidable classes and their properties
Using reduction to prove a language is undecidableEverything from Exam 1 alsoSlide4
“Game Theory” Experiment Number of “Exempt Me” messages received:
14
No exemptions on Exam 2. (Although some more opportunities in today’s class.)Slide5
Reduction Proofs
B
reduces to
A
means
that can
decide
B
can be used to make
that can
decide
A
If we already know
A
is undecidable, this proves
B
is undecidable.
Y
XSlide6
Singleton LanguageSlide7
Proving Undecidability
MSINGLETONTM that decides SINGLETON
TM
Accept
or
Reject
Accept
or
Reject
M
H
that decides
HALTS
TM
Assume
SINGLETON
TM
is decidable.
Then, there exists a TM that decides it. We’ll call it
M
SINGLETON
.
Show how to use
M
SINGLETON
to build a machine that decides
HALTS
TM
.
Contradiction:
we know
HALTS
TM
is undecidable, so if we could use
M
SINGLETON
to construct a machine that decides it,
M
SINGLETON
must not exist.Slide8
Reducing HALTSTM to SINGLETON
TMSlide9
Reducing HALTSTM to SINGLETON
TMSlide10
Type Safety
"hello" + 3
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
"hello" + 3
TypeError
: Can't convert '
int
' object to
str
implicitlySlide11
Reducing HALTSTM to
WELLTYPEDPythonSlide12
Reducing HALTSTM to
WELLTYPEDPythonSlide13
Well-Typed Java?public class Test { static public void main(String
args[]) { System.out.println("Hello" + 3); }}
> javac
Test.java
> java Test
Hello3
public class Test {
static public void main(String
args
[]) {
System.out.println("Hello" - 3);
}
}
>
javac
Test.java
Test.java:3: operator - cannot be applied to
java.lang.String,intSlide14
Type Safety
This is decidable: your Java compiler should do this (and should always terminate)!
WELLTYPEDJava
--
(<
P
>) = {
P
is a Java
program that does not use type casts or array assignments and
P
never produces a run-time type error. }Slide15
Reducing HALTSTM to
WELLTYPEDJava--?
We claimed on the last slide that it is decidable! Something must be broken with this “proof”.
No such Java
program exists!Slide16
Busy BeaversSlide17
The “Busy Beaver” Game Design a (2-way infinite tape) Turing
Machine that:Uses k symbols (e.g., “0” and “1”)Starts with a tape of all “0”s (no blanks)Eventually halts (can’t run forever)
Has n states (not counting q
Accept
and
q
Reject
)
Tibor
Radó
,
1895-1965
Goal is to run for as many steps as possible before eventually haltingSlide18
Busy Beaver: N = 1
Start
0
1, R
0
...
0
0
0
0
0
0
0
0
0
BB
(1, 2) = 1
Most steps a 1-state
machine that halts can make
0
0
0
0
0
0
0
0
AcceptSlide19
A
Start
B
0
...
0
0
0
0
0
0
0
0
0
BB
(2, 2) = ?
0
0
0
0
0
0
...
Accept
1
1, L
1
1, L
0
1, L
0
1, R
Step
0Slide20
Step 1
1
...
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide21
Step 2
1
...
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide22
Step 3
1
...
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide23
Step 4
1
...
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
...
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide24
Step 5
1
...
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
...
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide25
Step 6:Halted
1
...
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
...
BB
(2, 2)
6
(Actually,
it is known
that
BB
(2,2) = 6
)
A
Start
B
Accept
1
1, L
1
1, L
0
1, L
0
1, RSlide26
What is BB(6, 2)?
Busy Bunny?Slide27
A
Start
B
C
D
E
F
Accept
1
1, L
0
1, R
0
0, R
0
1, L
1
0, R
1
0, L
1
1, R
1
0, L
0
1, L
0
0, L
0
0, R
1
1, R
6-state machine found by
Buntrock
and
Marxen
, 2001Slide28
300232771652356282895510301834134018514775433724675250037338180173521424076038326588191208297820287669898401786071345848280422383492822716051848585583668153797251438618561730209415487685570078538658757304857487222040030769844045098871367087615079138311034353164641077919209890837164477363289374225531955126023251172259034570155087303683654630874155990822516129938425830691378607273670708190160525534077040039226593073997923170154775358629850421712513378527086223112680677973751790032937578520017666792246839908855920362933767744760870128446883455477806316491601855784426860769027944542798006152693167452821336689917460886106486574189015401194034857577718253065541632656334314242325592486700118506716581303423271748965426160409797173073716688827281435904639445605928175254048321109306002474658968108793381912381812336227992839930833085933478853176574702776062858289156568392295963586263654139383856764728051394965554409688456578122743296319960808368094536421039149584946758006509160985701328997026301708760235500239598119410592142621669614552827244429217416465494363891697113965316892660611709290048580677566178715752354594049016719278069832866522332923541370293059667996001319376698551683848851474625152094567110615451986839894490885687082244978774551453204358588661593979763935102896523295803940023673203101744986550732496850436999753711343067328676158146269292723375662015612826924105454849658410961574031211440611088975349899156714888681952366018086246687712098553077054825367434062671756760070388922117434932633444773138783714023735898712790278288377198260380065105075792925239453450622999208297579584893448886278127629044163292251815410053522246084552761513383934623129083266949377380950466643121689746511996847681275076313206
(1730 digits)
Best found before 2001, only 925 digits!
http://drb9.drb.insel.de/~heiner/BB/index.html
A
Start
B
C
D
E
F
Accept
1
1, L
0
1, R
0
0, R
0
1, L
1
0, R
1
0, L
1
1, R
1
0, L
0
1, L
0
0, L
0
0, R
1
1, R
Is this
BB
(6, 2)
?Slide29
Busy Beaver NumbersBB
(1, 2) = 1BB(2, 2) = 6
BB(3, 2) =
21
Proved by Lin and
Rado
, 1965
BB
(4, 2)
= 107
BB
(5, 2)
=
Unknown!
Best so
far is 47,176,870
BB
(6, 2) = Unknown! Best so far is
> 102879 (discovered in 2007) Previous best: > 10
1730 (discovered in 2001, previous slide) Previous best: > 10925
(discovered in August 2000)Slide30
flickr
: climbnh2003Why is BB
(5, 2) unknown?Slide31
How many (5, 2) TMs are there?Slide32
How many (5, 2) TMs are there?
B
E
A
D
C
q
Accept
0
1, RSlide33
264 Trillion (<10
12
) is
not
a very big number! Cryptosystems with 56-bit keys (2
56
= 10
16
) are considered easily brute-force breakable, 270K times bigger.Slide34
Why BB(5, 2) is UnknownBest found so far: 47,176,870There are about 40 (5,2) TMs that run for more than 47,176,870 steps without obviously repeating (but haven’t halted yet)
Probably, these machines never halt and BB(5,2) = 47176870 But, its possible one of these machines eventually accepts!Slide35
What does this have to do with reviewing reduction proofs?
(or: is BB a language?)Slide36
Is
L
BB
Decidable?Slide37Slide38
Do we know this terminates?
Someone pointed out after class today that this is not quite correct! The problem
is we’re simulating M starting with w on the tape, but the BB starts with a blank tape.
To fix this, we need to create M’ that first writes w on the tape and then simulates M.Slide39
Busy Beaver ChallengesDetermine BB
(5, 2)The standard Busy Beaver problem is defined for a doubly-infinite tape TM. For the one-way infinite tape TM, what is BB(4, 2)
?
Worth an exemption on Exam 2 or the Final ExamSlide40
ChargeExam 2 will be handed out at end of class Thursday, due on TuesdayPrepare your Exam 2 note sheet before class ThursdayThursday’s office hours: 11am-1pm (not normal time)