The Busy Beaver, the Placid Platypus and the Universal Unicorn

Slides:



Advertisements
Similar presentations
CATS’07 1/2/2007James Harland Analysis of Busy Beaver machines via Induction Proofs Analysis of Busy Beaver Machines via Induction Proofs James Harland.
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Lecture 24 MAS 714 Hartmut Klauck
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
Beaver, Platypus, Unicorn, Zoo …Monash 29 th June,2011 The Busy Beaver, the Placid Platypus and the Universal Unicorn James Harland
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Complexity 7-1 Complexity Andrei Bulatov Complexity of Problems.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
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.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
Complexity 5-1 Complexity Andrei Bulatov Complexity of Problems.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
CHAPTER 4 Decidability Contents Decidable Languages
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Turing Machines CS 105: Introduction to Computer Science.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
The Busy Beaver, the Placid Platypus and the Universal Unicorn Beaver, Platypus, Unicorn … RMIT 1 st August, 2014 James Harland
Fundamentals of Python: From First Programs Through Data Structures
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
CS&IT Seminar 7/9/2007James Harland Busy Beaver, Universal machines and the Wolfram Prize Busy Beaver, Universal Machines and the Wolfram Prize James Harland.
MA/CSSE 474 Theory of Computation More Reduction Examples Non-SD Reductions.
Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 The Halting Problem and Decidability How powerful is a TM? Any program in a high level language can be simulated by a TM. Any algorithmic procedure carried.
Computability Construct TMs. Decidability. Preview: next class: diagonalization and Halting theorem.
Halting Problem Introduction to Computing Science and Programming I.
Turing Machines and the Halting Problem This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
BUSY BEAVER PROBLEM by Alejandro Mendoza Rigoberto Fernandez School of Computer Science 04/18/2005.
Computability Chapter 5. Overview  Turing Machine (TM) considered to be the most general computational model that can be devised (Church-Turing thesis)
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
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.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Recursively Enumerable and Recursive Languages
1 Turing Machines and Equivalent Models Section 13.1 Turing Machines.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Introduction to Turing Machines
Unrestricted Grammars
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
Chapter 9 Turing Machines What would happen if we change the stack in Pushdown Automata into some other storage device? Truing Machines, which maintains.
Universal Turing Machine
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Complexity Classes.
The Acceptance Problem for TMs
Turing Machines Finite State Machines.
Proving Termination and Non-Termination of Busy Beaver Machines
CSCE 411 Design and Analysis of Algorithms
Theory of Computation Turing Machines.
Theory of Computation Languages.
Computability and Complexity
Recall last lecture and Nondeterministic TMs
Presentation transcript:

The Busy Beaver, the Placid Platypus and the Universal Unicorn James Harland james.harland@rmit.edu.au Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Busy beaver problem and similar problems Machine execution techniques Overview Busy beaver problem and similar problems Machine execution techniques Searching large numbers of machines Universal Turing machines Connections with other areas Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Busy beaver problem and similar problems Machine execution techniques Overview Busy beaver problem and similar problems Machine execution techniques Searching large numbers of machines Universal Turing machines Connections with other areas Beaver, Platypus, Unicorn … Monash June 2nd, 2014

‘Organic’ theoretical computer science Overview ‘Organic’ theoretical computer science Exploration of theoretical concepts by software tools Mix of empirical and theoretical methods Beaver, Platypus, Unicorn … Monash June 2nd, 2014

a b c h What? Turing Machines of a particular type: Deterministic Symbols are only 0 (blank) and 1 (initially) Only consider blank input n states plus a halt state means size is n a b c h 11R 01R 00L 10R 01L Beaver, Platypus, Unicorn … Monash June 2nd, 2014

What? What is the largest number of 1’s that can be printed by a terminating n-state machine? n #1’s (productivity) #steps 1 2 4 6 3 21 13 107 5 ≥ 4098 ≥ 47,176,870 (??) 6 ≥ 3.51×1018,276 ≥ 7.41×1036,534 (!!) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

HERE BE DRAGONS! What? n m #1’s #steps 2 4 6 3 21 9 38 13 107 2,050 3,932,964 374,676,383 119,112,334,170,342,540 5 ≥ 4098 ≥ 47,176,870 ≥ 1.7 × 10352 ≥ 1.9 × 10704 3.51×1018276 ≥ 7.41×1036534 ≥ 1.383 × 107036 ≥ 1.025 × 1014072 ≥ 3.743 × 106518 ≥ 5.254 × 1013036 ≥ 1.903 × 104933 ≥ 2.415 × 109866 HERE BE DRAGONS! Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Various mathematical bounds known All surpassed in practice What? Busy Beaver function is non-computable; it grows faster than any computable function (!!) Various mathematical bounds known All surpassed in practice Seems hopeless for n ≥ 7 Values for n ≤ 5 seem settled (but as yet unproven) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Some enormous numbers here! `… the poetry of logical ideas’ (Einstein) Why? Some enormous numbers here! `… the poetry of logical ideas’ (Einstein) Evidence for results is somewhat lacking (“The remaining 250+ cases were checked by hand”) Should have test data and evidence available Should be able to automate entire test `Nothing capable of proof should be accepted as true without it’ (Frege) `Nothing capable of automation should be accepted as finished without it’ Beaver, Platypus, Unicorn … Monash June 2nd, 2014

An n-state (2-symbol) machine of productivity k shows that bb(n,2) ≥ k Why? An n-state (2-symbol) machine of productivity k shows that bb(n,2) ≥ k at most n states are needed to print k 1’s What is the minimum number of states (for an n- state 2-symbol machine) needed to print k 1’s? We call this the placid platypus problem [ pp(k) ] Beaver, Platypus, Unicorn … Monash June 2nd, 2014

bb(n,2) = k means that pp(k) ≤ n and pp(k+1) ≥ n+1 Why? bb(n,2) = k means that pp(k) ≤ n and pp(k+1) ≥ n+1 pp(2) = pp(3) = pp(4) = 2 pp(5) = pp(6) = 3 pp(k) = 4 for k є {7,8,9,10,11,12,13} pp(k) ≥ 5 for k ≥ 14 …??? There seem to be no 5-state 2-symbol machines with productivity 74, 85, 92-7, 100-110, 113, 114, 115, … Need complete classification to be sure Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Marxen and Buntrock (1990): macro machines Executing Machines Marxen and Buntrock (1990): macro machines Treat a sequence of k characters as a single ‘symbol’ Avoids repetition of previous sequences Significant speed up Need to choose k in advance Holkner (2004): loop prediction {b}(01)1001 -> (11)100 {b}1 State Input InDir Output OutDir NewState b 01 l 11 r Beaver, Platypus, Unicorn … Monash June 2nd, 2014

20,000+ steps in 1 Executing Machines What do the monsters do? 5x2 state champion (terminates in 47,176,870 steps) Step Configuration 12393 001111{b}(001)66100 12480 001(111)6{b}(001)63100 12657 001(111)11{b}(001)60100 … 33120 001(111)106{b}(001)3100 47176870 101{h}(001)4095100 20,000+ steps in 1 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

5x2 state champion takes 11 otter steps Executing Machines 5x2 state champion takes 11 otter steps Otter Steps Predicted 1 267 2 2,235 3 6,840 4 20,463 5 62,895 6 176,040 7 500,271 8 1,387,739 9 3,878,739 10 10,830,672 11 30,144,672 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Executing Machines Macro machines + loop prediction + observant otter can cope with all known monsters (!!) Size Ones Hops Otters Otter Steps 2x4 90 7195 2 64% 2050 3932964 8 99% 3x3 17338 127529109 17 > 99% 95524079 (16 digits) 374676383 (18 digits) 60 5x2 4098 47,176,870 11 11,798,796 10 4097 23,554,764 74 2x5 (31 digits) (62 digits) 168 (106 digits) (212 digits) 593 (353 digits) (705 digits) 1993 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Executing Machines Size Ones Hops Otters Otter Steps 6x2 (18268 digits) (36535 digits) 30345 > 99% (10567 digits) (21133 digits) 99697 (1440 digits) (2880 digits) 8167 (882 digits) (1763 digits) 2211 4x3 (7037 digits) (14073 digits) 25255 (6035 digits) (12069 digits) 34262 (4932 digits) (9864 digits) 57368 3x4 (6519 digits) (13037 digits) 13667 (2373 digits) (4745 digits) 13465 (2356 digits) (4711 digits) 107045 2x6 (4934 digits) (9867 digits) 16394 49142 (822 digits) (1644 digits) 2733 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

HERE BE DRAGONS! Executing Machines Size Ones Hops Otters Otter Steps (18268 digits) (36535 digits) 30345 > 99% (10567 digits) (21133 digits) 99697 (1440 digits) (2880 digits) 8167 (882 digits) (1763 digits) 2211 4x3 (7037 digits) (14073 digits) 25255 (6035 digits) (12069 digits) 34262 (4932 digits) (9864 digits) 57368 3x4 (6519 digits) (13037 digits) 13667 (2373 digits) (4745 digits) 13465 (2356 digits) (4711 digits) 107045 2x6 (4934 digits) (9867 digits) 16394 49142 (822 digits) (1644 digits) 2733 HERE BE DRAGONS! Beaver, Platypus, Unicorn … Monash June 2nd, 2014

HERE BE HOBBITS! Executing Machines Size Ones Hops Otters Otter Steps (18268 digits) (36535 digits) 30345 > 99% (10567 digits) (21133 digits) 99697 (1440 digits) (2880 digits) 8167 (882 digits) (1763 digits) 2211 4x3 (7037 digits) (14073 digits) 25255 (6035 digits) (12069 digits) 34262 (4932 digits) (9864 digits) 57368 3x4 (6519 digits) (13037 digits) 13667 (2373 digits) (4745 digits) 13465 (2356 digits) (4711 digits) 107045 2x6 (4934 digits) (9867 digits) 16394 49142 (822 digits) (1644 digits) 2733 HERE BE HOBBITS! Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Aberrent Albatrosses The observant otter is not a panacea … Some machines do not produce “neat, compressible” patterns … 3x3 case terminates in 2,315,619 steps with 31 non-zeroes 2x5 case terminates in 26,375,397,569,930 steps with 143 non-zeroes 1004: 012010150130170{b}134334 5000: (011)2101(111)311{a}0433135441100 10001: 01401013010160{a}331374300 ??? Beaver, Platypus, Unicorn, … Monash June 2nd, 2014

Some non-termination cases are easy Analysing Machines Some non-termination cases are easy perennial pigeon: repeats a particular configuration phlegmatic phoenix: tape returns to blank road runner: “straight to the end of the tape” meandering meerkat: terminal transition cannot be reached Hence we check for these first Beaver, Platypus, Unicorn … Monash June 2nd, 2014

How? Otherwise .. (ie all the easy cases have been checked): Run the machine for a given number of steps If it halts, done. Check for non-terminating pattern (Verify non-terminating pattern) Execute machine for a larger number of steps Eventually give up! Beaver, Platypus, Unicorn, … Monash June 2nd, 2014

Observant Otter Some surprises can be in store .... 16{D}0 → 118{D}0 → 142{D}0 (!!!) → 190{D}0 130{D}0 does not occur … So always look for three instances of a pattern Conjecture in this case is 1N{D}0 → 12N+6{D}0 or alternatively 1N{D}0 → (11)N111111{D}0 Clearly there is exponential growth here … Beaver, Platypus, Unicorn, … Monash June 2nd, 2014

Aberrent Albatrosses These occur in non-termination cases as well … 36: {a}0333 54: {a}030323 74: {a}032333 88: {a}033333 110: {a}03030323 136: {a}03232333 150: {a}03332333 168: {a}03303333 204: {a}0332330323 ?? Beaver, Platypus, Unicorn, … Monash June 2nd, 2014

Aberrent Albatrosses These occur in non-termination cases as well … 36: {a}0333 54: {a}030323 74: {a}032333 88: {a}033333 110: {a}03030323 136: {a}03232333 150: {a}03332333 168: {a}03303333 204: {a}0332330323 Beaver, Platypus, Unicorn, … Monash June 2nd, 2014

Searching for Machines To find bb(n,m): Generate all n-state m-symbol machines Classify them as terminating or non-terminating Find the terminating one which produces the largest number of 1’s (or non-zero characters) Only problem is that there are lots of traps … Beaver, Platypus, Unicorn … Monash June 2nd, 2014

HERE BE DRAGONS! Executing Machines Size Ones Hops Otters Otter Steps (18268 digits) (36535 digits) 30345 > 99% (10567 digits) (21133 digits) 99697 (1440 digits) (2880 digits) 8167 (882 digits) (1763 digits) 2211 4x3 (7037 digits) (14073 digits) 25255 (6035 digits) (12069 digits) 34262 (4932 digits) (9864 digits) 57368 3x4 (6519 digits) (13037 digits) 13667 (2373 digits) (4745 digits) 13465 (2356 digits) (4711 digits) 107045 2x6 (4934 digits) (9867 digits) 16394 49142 (822 digits) (1644 digits) 2733 HERE BE DRAGONS! Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Searching for Machines There is a finite but very large set of machines for each size … #machines of size n is O(nn) [ > O(n!) > O(2n) !!] ‘Free’ generation of machines quickly becomes cumbersome .. ‘Free’ generation creates too many trivial machines a b c h 11R 01R 00L, 10R 10R Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Searching through Machines First transition is fixed Run partial machine Add a new transition when a ‘missing’ case happens Add ‘halt’ transition when appropriate Only one transition left At least n different states for an n-state machine a b c h 11L 01R 10R 00L {a}0 -> 1{b}0 -> {a}1 -> {a}01 -> 1{b}1 -> 10{c}0 Generates machines in tree normal form (tnf) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Searching through Machines tnf free 2 36 64 3 3,522 55,296 2,765 41,472 4 507,107 ?? 501,232 25,955,301 5 99,174,375 ≥ 115,000,000 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Around 5,000 lines of SWI Prolog Versions available at my website Implementation Around 5,000 lines of SWI Prolog Versions available at my website Data available as well Documentation is a little lacking … Intention is that other researchers can use data and verify results (this is empirical science!) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Blue Bilby n-state m-symbol machines, n x m ≤ 6 Total Terminated Going Unclassified 2 36 14 22 3 3,522 1,188 2,334 2,765 839 1,926 The free and arbitrary classes have also been classified for these cases Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Ebony Elephant n-state m-symbol machines, n x m = 8 n m Total Terminated Going Unclassified 4 2 507,107 150,897 356,210 501,232 168,674 331,960 598 1's 1 2 3 4 5 6 7 8 9 10 11 12 13 # 3836 23161 37995 31023 15131 5263 1487 357 74 Beaver, Platypus, Unicorn, Zoo … Monash 29th June,2011

White Whale n-state m-symbol machines, n x m = 9 or 10 n m Total 3 25,955,301 5 2 99,174,375 ≥ 115,000,000 Need to improve the technology before taking this on ... Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Demon Duck of Doom n-state m-symbol machines, n x m = 12 (!??!!) n m Total 6 2 ?? 4 3 Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Universal Turing machines Quest for the smallest universal TM goes on … Involves searching similar (but larger) spaces Alain Colmerauer (KR’08 talk) U on code(M)code(w) simulates M on w Let M = U U on code(U)code(w) simulates U on w Let w = blank (and assume code(blank) = blank) U on code(U) simulates U on blank Hence pseudo-universality test: M is pseudo-universal if M on code(M) simulates M on blank Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Universal Turing machines What exactly is the definition of a universal Turing machine? How can such definitions be used to identify universal machines “in the wild”? What constraints are there on the coding function? Does a UTM have to terminate? Must a UTM terminate on code(M)code(w) exactly when M terminates on w? What is an appropriate “architecture” for a UTM? (code(M)code(w) vs code(w)code(M) ) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

2-D machines 2 1 1 Monash June 2nd, 2014 Beaver, Platypus, Unicorn …

2-D machines Can interpret numbers as images … Have generated some of the smaller cases here Very basic implementation of emulation Potentially very interesting loop behaviour Strict generalisation of one-dimensional case Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Learning? Ebony Elephant case suggests that `most' machines are boring … Only 2,667 are either high productivity or unclassified At most 100,000 of the non-terminators are difficult The remaining 80% are unexceptional … Can we find a criterion to identify (at least a substantial fraction) of the unexceptional machines? Need to identify possible features of machines ... Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Finite Decidability Anomaly Termination for TMs on blank input is undecidable Calculating bb(n) involves “only” a finite # machines … So there is an algorithm for computing bb(n) for each n (!!) Claim: Any decision problem over any finite set is decidable Proof Sketch: For a set of size n, there are only 2n possible decisions. Each such decision can be implemented by a Turing machine, ie. a “table” machine that outputs the decision value for each element i є {1 … n}. This is only a “table”, not an “algorithm”, but it is a Turing machine … QED Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Finite Decidability Anomaly Termination for TMs on blank input is undecidable Calculating bb(n) involves “only” a finite # machines … So there is an algorithm for computing bb(n) for each n (!!) Claim: Any decision problem over any finite set is decidable Proof Sketch: For a set of size n, there are only 2n possible decisions. Each such decision can be implemented by a Turing machine, ie. a “table” machine that outputs the decision value for each element i є {1 … n}. This is only a “table”, not an “algorithm”, but it is a Turing machine … QED Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Finite Decidability Anomaly Note: A decision procedure for a decidable problem over an infinite set is much shorter than the set itself So for a finite set, we should require that the Turing machine that decides it should be quantifiably shorter than the “table” which specifies the decision … An “algorithm” should be predictive, ie should work for more values than those specified in the table … (more thought needed!) Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Conclusions & Further Work Ebony elephant is close to capture White whale should be alert and alarmed (“Call me Ishmael’’ ) Demon Duck of Doom … [watch this space] Machine learning techniques may identify criteria which can reduce search space Duality between n-state 2-symbol and 2-state n-symbol cases Otter needs to be “remembered” Compress machines rather than fix macro size in advance Beaver, Platypus, Unicorn … Monash June 2nd, 2014

Conclusions & Further Work Weakening of conjectures for aberrent albatrosses Proofs desired for 3 instances for otter is sufficient Calculation of #steps (2nd order difference equations) Champion machines are always exhaustive Quadruple vs Quintuple machines Better “pruning” of search space Beaver, Platypus, Unicorn … Monash June 2nd, 2014