cs3102: theory of computation class 20: busy beavers spring 2010 university of virginia david evans...
TRANSCRIPT
![Page 1: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/1.jpg)
cs3102: Theory of Computation
Class 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.
![Page 2: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/2.jpg)
Exam 2• Out 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 exam
![Page 3: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/3.jpg)
Exam 2: Main Topics• Countable and uncountable infinite sets• Turing machines: – Formal definition– Computing model– Robustness of TM model
• Church-Turing thesis and its implications• Turing-recognizable, Turing-decidable classes and
their properties• Using reduction to prove a language is undecidable• Everything from Exam 1 also
![Page 4: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/4.jpg)
“Game Theory” Experiment
Number of “Exempt Me” messages received:
14No exemptions on Exam 2. (Although some more opportunities in today’s class.)
![Page 5: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/5.jpg)
Reduction Proofs
B reduces to Ameans
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 X
![Page 6: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/6.jpg)
Singleton Language
![Page 7: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/7.jpg)
Proving Undecidability
MSINGLETON
TM that decides SINGLETONTM
Acceptor
Reject
Acceptor
Reject
MH that decides HALTSTM
1. Assume SINGLETONTM is decidable.2. Then, there exists a TM that decides it. We’ll call it MSINGLETON.3. Show how to use MSINGLETON to build a machine that decides HALTSTM.4. Contradiction: we know HALTSTM is undecidable, so if we could use
MSINGLETON to construct a machine that decides it, MSINGLETON must not exist.
![Page 8: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/8.jpg)
Reducing HALTSTM to SINGLETONTM
![Page 9: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/9.jpg)
Reducing HALTSTM to SINGLETONTM
![Page 10: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/10.jpg)
Type Safety
"hello" + 3Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> "hello" + 3TypeError: Can't convert 'int' object to str implicitly
![Page 11: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/11.jpg)
Reducing HALTSTM to WELLTYPEDPython
![Page 12: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/12.jpg)
Reducing HALTSTM to WELLTYPEDPython
![Page 13: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/13.jpg)
Well-Typed Java?public class Test { static public void main(String args[]) { System.out.println("Hello" + 3); }}
> javac Test.java> java TestHello3
public class Test { static public void main(String args[]) { System.out.println("Hello" - 3); }}
> javac Test.javaTest.java:3: operator - cannot be applied to java.lang.String,int
![Page 14: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/14.jpg)
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. }
![Page 15: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/15.jpg)
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!
![Page 16: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/16.jpg)
Busy Beavers
![Page 17: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/17.jpg)
The “Busy Beaver” GameDesign 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 qAccept
and qReject) Tibor Radó, 1895-1965
Goal is to run for as many steps as possible before eventually halting
![Page 18: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/18.jpg)
Busy Beaver: N = 1
Start
01, 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
Accept
![Page 19: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/19.jpg)
AStart
B
0 ...0 0 0 0 0 0 0 0 0
BB(2, 2) = ?
0 0 0 0 0 0...
Accept1 1, L
1 1, L
0 1, L
0 1, R
Step 0
![Page 20: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/20.jpg)
Step 1
1 ...0 0 0 0 0 0 0 0 00 0 0 0 0 0...
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 21: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/21.jpg)
Step 2
1 ...1 0 0 0 0 0 0 0 00 0 0 0 0 0...
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 22: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/22.jpg)
Step 3
1 ...1 0 0 0 0 0 0 0 00 0 0 0 0 0...
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 23: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/23.jpg)
Step 4
1 ...1 0 0 0 0 0 0 0 00 0 0 0 0 1...
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 24: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/24.jpg)
Step 5
1 ...1 0 0 0 0 0 0 0 00 0 0 0 1 1...
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 25: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/25.jpg)
Step 6:Halted
1 ...1 0 0 0 0 0 0 0 00 0 0 0 1 1...
BB(2, 2) 6
(Actually, it is known that BB(2,2) = 6)
AStart
B
Accept1 1, L
1 1, L
0 1, L
0 1, R
![Page 27: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/27.jpg)
AStart
BC
D E
F
Accept
1 1, L
0 1, R
0 0, R
0 1, L1 0, R1 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, 2001
![Page 28: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/28.jpg)
300232771652356282895510301834134018514775433724675250037338180173521424076038326588191208297820287669898401786071345848280422383492822716051848585583668153797251438618561730209415487685570078538658757304857487222040030769844045098871367087615079138311034353164641077919209890837164477363289374225531955126023251172259034570155087303683654630874155990822516129938425830691378607273670708190160525534077040039226593073997923170154775358629850421712513378527086223112680677973751790032937578520017666792246839908855920362933767744760870128446883455477806316491601855784426860769027944542798006152693167452821336689917460886106486574189015401194034857577718253065541632656334314242325592486700118506716581303423271748965426160409797173073716688827281435904639445605928175254048321109306002474658968108793381912381812336227992839930833085933478853176574702776062858289156568392295963586263654139383856764728051394965554409688456578122743296319960808368094536421039149584946758006509160985701328997026301708760235500239598119410592142621669614552827244429217416465494363891697113965316892660611709290048580677566178715752354594049016719278069832866522332923541370293059667996001319376698551683848851474625152094567110615451986839894490885687082244978774551453204358588661593979763935102896523295803940023673203101744986550732496850436999753711343067328676158146269292723375662015612826924105454849658410961574031211440611088975349899156714888681952366018086246687712098553077054825367434062671756760070388922117434932633444773138783714023735898712790278288377198260380065105075792925239453450622999208297579584893448886278127629044163292251815410053522246084552761513383934623129083266949377380950466643121689746511996847681275076313206
(1730 digits)
Best found before 2001, only 925 digits!
http://drb9.drb.insel.de/~heiner/BB/index.html
A
Start
B
C
DE
F
Accept
1 1, L
0 1, R
0 0, R
0 1, L1 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)?
![Page 29: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/29.jpg)
Busy Beaver NumbersBB(1, 2) = 1BB(2, 2) = 6BB(3, 2) = 21 Proved by Lin and Rado, 1965BB(4, 2) = 107BB(5, 2) = Unknown!
Best so far is 47,176,870BB(6, 2) = Unknown!
Best so far is > 102879 (discovered in 2007)Previous best: > 101730 (discovered in 2001, previous slide)Previous best: > 10925 (discovered in August 2000)
![Page 30: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/30.jpg)
flickr: climbnh2003
Why is BB(5, 2) unknown?
![Page 31: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/31.jpg)
How many (5, 2) TMs are there?
![Page 32: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/32.jpg)
How many (5, 2) TMs are there?
B
E
A
D
C
qAccept
0 1, R
![Page 33: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/33.jpg)
264 Trillion (<1012) is not a very big number! Cryptosystems with 56-bit keys (256 = 1016) are considered easily brute-force breakable, 270K times bigger.
![Page 34: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/34.jpg)
Why BB(5, 2) is Unknown
• Best found so far: 47,176,870• There 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) = 47176870But, its possible one of these machines eventually accepts!
![Page 35: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/35.jpg)
What does this have to do with reviewing reduction proofs?
(or: is BB a language?)
![Page 36: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/36.jpg)
Is LBB Decidable?
![Page 37: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/37.jpg)
![Page 38: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/38.jpg)
Do we know this terminates?
Someone pointed out after class today that this is not quite correct! The problemis 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.
![Page 39: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/39.jpg)
Busy Beaver Challenges
• Determine 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 Exam
![Page 40: Cs3102: Theory of Computation Class 20: Busy Beavers Spring 2010 University of Virginia David Evans Office hours: I am not able to hold my Thursday morning](https://reader030.vdocuments.us/reader030/viewer/2022032705/56649db45503460f94aa4c67/html5/thumbnails/40.jpg)
Charge
• Exam 2 will be handed out at end of class Thursday, due on Tuesday
• Prepare your Exam 2 note sheet before class Thursday
• Thursday’s office hours: 11am-1pm (not normal time)