1 / 33

Proving Termination and Non-Termination of Busy Beaver Machines

James Harland james.harland@rmit.edu.au. Proving Termination and Non-Termination of Busy Beaver Machines. Using an. to catch a. to chase a. otter. beaver. platypus. 01R. 10R. 11R. 11R. a. b. c. h. 01L. 00L. What?. Turing Machines of a particular type: Deterministic

joannc
Download Presentation

Proving Termination and Non-Termination of Busy Beaver Machines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 20th November, 2009 James Harland james.harland@rmit.edu.au Proving Termination and Non-Termination of Busy Beaver Machines Using an to catch a to chase a otter beaver platypus

  2. 20th November, 2009 01R 10R 11R 11R a b c h 01L 00L 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

  3. 20th November, 2009 What? What is the largest number of 1’s that can be printed by a terminating n-state machine?

  4. 20th November, 2009 What?

  5. 20th November, 2009 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)

  6. 20th November, 2009 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’

  7. 20th November, 2009 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) ]

  8. 20th November, 2009 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

  9. 20th November, 2009 How? • Easy! :-) To find bb(n,m): • Generate all n-state m-symbol machines • Classifying 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 …

  10. 20th November, 2009 How? • There is a finite but very large set of machines for each size … • Number of machines of size n is O(nn) [ > O(n!) > O(2n) !!] • `Free’ generation of machines quickly becomes impractical • `Free’ generation creates too many trivial machines 01R 10R 11R a b 01R c h 00L, 10R

  11. 20th November, 2009 01R 10R 11L a b c h How? • First transition is fixed • Run partial machine • Add a new transition when a `missing’ case happens • Add `halt’ transition last 00L {a}0 -> 1{b}0 -> {a}1 -> {a}01 -> 1{b}1 -> 10{c}0 Generates machines in tree normal form (tnf)

  12. 20th November, 2009 How Many?

  13. 20th November, 2009 How? • 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

  14. 20th November, 2009 How? Otherwise .. (ie all the easy cases have been checked): • Run the machine for a given number of steps • If it halts, done. • Examine the execution trace for non-termination conjectures • Attempt to show that the hypothesis pattern repeats infinitely • Execute machine for a large number of steps • Give up!

  15. 20th November, 2009 How? • 11{C}1 → 11{C}111 → 11{C}11111 … • Conjecture 11{C} 1 (11)N →  11{C} 1(11)N+1 • Start engine in 11{C} 1 (11)N • Terminate with success if we reach 11{C} 1 (11)N+1 (or 11{C} 1 (11)N+2or …) • Halt with failure after a certain number of steps • Main trick is how to deal with (11)N case where N is a variable

  16. 20th November, 2009 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 … • (this is why two previous instances are needed) • Conjecture in this case is 1N{D}0 → 12N+6{D}0 • or alternatively • 1N{D}0 → (11)N111111{D}0 • These are known as killer kangaroos ...

  17. 20th November, 2009 How? • Three main cases: • Wild Wombat • Stretching Stork • Observant Otter • (soon also the Ossified Ocelet) slithering snake resilient reptile maniacal monkey

  18. 20th November, 2009 Wild Wombat • X {S} IN Y → ?? {S} I → J {S} • Pointer remains within I • First exits I to the right • State on exit is S • ``Context-free'' X {S} IN Y → X JN {S} Y X IN {S} Y → X {S} JN Y 11 {C} (11)N 011 → 11 (00)N {C} 011 if {C}11 → 0{D}1 →{B}01 → 0{B}1 → 00 {C}

  19. 20th November, 2009 Stretching Stork X {S} IN Y → ?? If the wombat doesn't apply and N > 0 Condition N > 0 required to stop this being infinitely applicable X {S} IN Y → X {S} I IN-1 Y 11 {C} (11)N 011 → 11 {C} 11 (11)N-1 011

  20. 20th November, 2009 Observant Otter 11 {C} (11)N 01 → … → 111 {C} 1(11)N-1 01 → … → 1111 {C} 1(11)N-2 01 → … → Oi! There is a pattern here! 11 (1)N {C} 01 → …

  21. 20th November, 2009 Observant Otter • X {S} IN Y → ?? • Looks through execution history to find a similar pattern • Requires two previous instances before a match is made • Currently only allows decrement of 1  • Calculates new state from patterns • Ossified Ocelet will store these patterns for potential future use • This technique used by Wood in 2008 to evaluate monsters ...

  22. 20th November, 2009 Observant Otter • 1111{C}11 • 1011{C}111 • 110{C}1111 • 111111{C}11 • 101111{C}111 • 11011{C}1111 • 1110{C}11111 • 11111111{C}11 Sometimes this is not as simple as it may seem …

  23. 20th November, 2009 Implementation • Around 8,000 lines of Ciao Prolog • Needs a thorough clean up; necessary code is around 40% of this size • 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!)

  24. 20th November, 2009 Blue Bilby • n-state m-symbol machines, n x m ≤ 6 tnf free

  25. 20th November, 2009 Ebony Elephant • n-state m-symbol machines, n x m = 8

  26. 20th November, 2009 White Whale • n-state m-symbol machines, n x m = 9 or 10 Need to improve the technology before taking this on ...

  27. 20th November, 2009 Demon Duck of Doom

  28. 20th November, 2009 Universal Turing machines • Quest for the smallest universal TM goes on … • Involves searching similar 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

  29. 20th November, 2009 2-D machines 0 2 1 0 1

  30. 20th November, 2009 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 here • Strict generalisation of one-dimensional case • No existing work that I have been able to find …

  31. 20th November, 2009 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 ...

  32. 20th November, 2009 Conclusions & Further Work • Otter still needs some refinements • needs to `dovetail’ with the rest of the engine • some small number of machines resistant to otter (so far) • Some parameters (eg maximum search steps) need to be tweaked • Connections to universal Turing machines and 2-D machines need investigation • New (journal) paper will be out `soon’  • Ebony elephant is close to capture • White whale should be alert and alarmed

  33. 20th November, 2009 Conclusions & Further Work • Ebony elephant is close to capture • White whale should be alert and alarmed (``Call me Ishmael’’ ) • Demon Duck of Doom should be alert but not alarmed yet • Machine learning techniques may identify criteria which can reduce search space • Duality between n-state 2-symbol and 2-state n-symbol cases • Lock away the beaver and play with the platypus 

More Related