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.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
Turing -Recognizable vs. -Decidable
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CS605 – The Mathematics and Theory of Computer Science Turing Machines.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
Mapping Reducibility Sipser 5.3 (pages ).
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CHAPTER 4 Decidability Contents Decidable Languages
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 2: Modeling Computers.
Class 19: Undecidability in Theory and Practice David Evans cs302: Theory of Computation University of Virginia Computer.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Lecture 14: Church-Turing Thesis Alonzo Church ( ) Alan Turing ( )
Cs3102: Theory of Computation Class 17: Undecidable Languages Spring 2010 University of Virginia David Evans.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Announcements Homework – HW8 due Tues 5/29 11am – HW5 grades are out Monday is Memorial Day; no office hours, etc. – Go see a parade, or some fireworks,
David Evans Turing Machines, Busy Beavers, and Big Questions about Computing.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
CSCI 2670 Introduction to Theory of Computing November 4, 2004.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Introduction to CS Theory Lecture 15 –Turing Machines Piotr Faliszewski
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
1 Which languages do the following TM’s accept over the alphabet Σ={a, b}? Recall: A TM M accepts a language L defined over an alphabet Σ if M halts on.
Cs3102: Theory of Computation Class 14: Turing Machines Spring 2010 University of Virginia David Evans.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
CSE 311 Foundations of Computing I Lecture 29 Computability: Turing machines, Undecidability of the Halting Problem Autumn 2012 CSE 3111.
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 16: Universality and Undecidability.
Class 24: P=NP? David Evans cs302: Theory of Computation University of Virginia Computer Science PS6 (the last one) is.
BUSY BEAVER PROBLEM by Alejandro Mendoza Rigoberto Fernandez School of Computer Science 04/18/2005.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
Turing -Recognizable vs. -Decidable
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
1 Which languages do the following TM’s accept over the alphabet Σ={a, b}? Recall: A TM M accepts a language L defined over an alphabet Σ if M halts on.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
Recall last lecture and Nondeterministic TMs Ola Svensson.
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
CSE 311 Foundations of Computing I
Reductions Costas Busch - LSU.
Turing Machines, Busy Beavers, and Big Questions about Computing
CSE 311 Foundations of Computing I
Decidable Languages Costas Busch - LSU.
Class 34: Models of Computation CS200: Computer Science
Theory of Computability
Theory of Computability
Presentation transcript:

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.

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

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

“Game Theory” Experiment Number of “Exempt Me” messages received: No exemptions on Exam 2. (Although some more opportunities in today’s class.)

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

Singleton Language

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.

Reducing HALTS TM to SINGLETON TM

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

Reducing HALTS TM to WELLTYPED Python

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

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. }

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!

Busy Beavers

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ó, Goal is to run for as many steps as possible before eventually halting

Busy Beaver: N = 1 Start 01, R BB(1, 2) = 1 Most steps a 1-state machine that halts can make Accept

A Start B BB(2, 2) = ? Accept 1  1, L 0  1, L 0  1, R Step 0

Step A Start B Accept 1  1, L 0  1, L 0  1, R

Step A Start B Accept 1  1, L 0  1, L 0  1, R

Step A Start B Accept 1  1, L 0  1, L 0  1, R

Step A Start B Accept 1  1, L 0  1, L 0  1, R

Step A Start B Accept 1  1, L 0  1, L 0  1, R

Step 6: Halted 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

What is BB(6, 2) ? Busy Bunny?

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

(1730 digits) Best found before 2001, only 925 digits! 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) ?

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 > (discovered in 2007) Previous best: > (discovered in 2001, previous slide) Previous best: > (discovered in August 2000)

flickr: climbnh2003 Why is BB(5, 2) unknown?

How many (5, 2) TMs are there?

B E A D C q Accept 0  1, R

264 Trillion (<10 12 ) is not a very big number! Cryptosystems with 56-bit keys (2 56 = ) are considered easily brute-force breakable, 270K times bigger.

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) = But, its possible one of these machines eventually accepts!

What does this have to do with reviewing reduction proofs? (or: is BB a language?)

Is L BB Decidable?

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.

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

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)