Download presentation
Presentation is loading. Please wait.
Published byLogan Bell Modified over 9 years ago
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 office hours this week. I will have office hours Thursday 11am-1pm instead.
2
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
3
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
4
“Game Theory” Experiment Number of “Exempt Me” messages received: 14 14 No exemptions on Exam 2. (Although some more opportunities in today’s class.)
5
Reduction Proofs B B reduces to A 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 Y X X
6
Singleton Language
7
Proving Undecidability M SINGLETON TM that decides SINGLETON TM Accept or Reject Accept or Reject M H that decides HALTS TM 1.Assume SINGLETON TM is decidable. 2.Then, there exists a TM that decides it. We’ll call it M SINGLETON. 3.Show how to use M SINGLETON to build a machine that decides HALTS TM. 4.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.
8
Reducing HALTS TM to SINGLETON TM
10
Type Safety "hello" + 3 Traceback (most recent call last): File " ", line 1, in "hello" + 3 TypeError: Can't convert 'int' object to str implicitly "hello" + 3 Traceback (most recent call last): File " ", line 1, in "hello" + 3 TypeError: Can't convert 'int' object to str implicitly
11
Reducing HALTS TM to WELLTYPED Python
13
Well-Typed Java? public class Test { static public void main(String args[]) { System.out.println("Hello" + 3); } > javac Test.java > java Test Hello3 > 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,int > javac Test.java Test.java:3: operator - cannot be applied to java.lang.String,int
14
Type Safety This is decidable: your Java compiler should do this (and should always terminate)! WELLTYPED Java-- ( ) = { P is a Java program that does not use type casts or array assignments and P never produces a run-time type error. }
15
Reducing HALTS TM to WELLTYPED Java-- ? We claimed on the last slide that it is decidable! Something must be broken with this “proof”. No such Java program exists!
16
Busy Beavers
17
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 halting
18
Busy Beaver: N = 1 Start 01, R 0... 000000000 BB(1, 2) = 1 Most steps a 1-state machine that halts can make 00000000 Accept
19
A Start B 0... 000000000 BB(2, 2) = ? 000000... Accept 1 1, L 0 1, L 0 1, R Step 0
20
Step 1 1... 000000000 000000 A Start B Accept 1 1, L 0 1, L 0 1, R
21
Step 2 1... 100000000 000000 A Start B Accept 1 1, L 0 1, L 0 1, R
22
Step 3 1... 100000000 000000 A Start B Accept 1 1, L 0 1, L 0 1, R
23
Step 4 1... 100000000 000001 A Start B Accept 1 1, L 0 1, L 0 1, R
24
Step 5 1... 100000000 000011 A Start B Accept 1 1, L 0 1, L 0 1, R
25
Step 6: Halted 1... 100000000 000011 BB(2, 2) 6 (Actually, it is known that BB(2,2) = 6 ) A Start B Accept 1 1, L 0 1, L 0 1, R
26
What is BB(6, 2) ? Busy Bunny?
27
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, 2001
28
30023277165235628289551030183413401851477543372467525003 73381801735214240760383265881912082978202876698984017860 71345848280422383492822716051848585583668153797251438618 56173020941548768557007853865875730485748722204003076984 40450988713670876150791383110343531646410779192098908371 64477363289374225531955126023251172259034570155087303683 65463087415599082251612993842583069137860727367070819016 05255340770400392265930739979231701547753586298504217125 13378527086223112680677973751790032937578520017666792246 83990885592036293376774476087012844688345547780631649160 18557844268607690279445427980061526931674528213366899174 60886106486574189015401194034857577718253065541632656334 31424232559248670011850671658130342327174896542616040979 71730737166888272814359046394456059281752540483211093060 02474658968108793381912381812336227992839930833085933478 85317657470277606285828915656839229596358626365413938385 67647280513949655544096884565781227432963199608083680945 36421039149584946758006509160985701328997026301708760235 50023959811941059214262166961455282724442921741646549436 38916971139653168926606117092900485806775661787157523545 94049016719278069832866522332923541370293059667996001319 37669855168384885147462515209456711061545198683989449088 56870822449787745514532043585886615939797639351028965232 95803940023673203101744986550732496850436999753711343067 32867615814626929272337566201561282692410545484965841096 15740312114406110889753498991567148886819523660180862466 87712098553077054825367434062671756760070388922117434932 63344477313878371402373589871279027828837719826038006510 50757929252394534506229992082975795848934488862781276290 44163292251815410053522246084552761513383934623129083266 949377380950466643121689746511996847681275076313206 (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) ?
29
Busy Beaver Numbers BB(1, 2) = 1 BB(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 > 10 2879 (discovered in 2007) Previous best: > 10 1730 (discovered in 2001, previous slide) Previous best: > 10 925 (discovered in August 2000)
30
flickr: climbnh2003 Why is BB(5, 2) unknown?
31
How many (5, 2) TMs are there?
32
B E A D C q Accept 0 1, R
33
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.
34
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) = 47176870 But, its possible one of these machines eventually accepts!
35
What does this have to do with reviewing reduction proofs? (or: is BB a language?)
36
Is L BB Decidable?
38
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.
39
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
40
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)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.