Presentation is loading. Please wait.

Presentation is loading. Please wait.

Proving Termination and Non-Termination of Busy Beaver Machines

Similar presentations


Presentation on theme: "Proving Termination and Non-Termination of Busy Beaver Machines"— Presentation transcript:

1 Proving Termination and Non-Termination of Busy Beaver Machines
Using an to catch a to chase a otter beaver platypus James Harland Otter -> Beaver -> Platypus 20th November, 2009

2 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 Otter -> Beaver -> Platypus 20th November, 2009

3 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 (??) ≥ 4.64×101439 ≥ 2.58× (!!) Otter -> Beaver -> Platypus 20th November, 2009

4 What? Otter -> Beaver -> Platypus 20th November, 2009 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 ≥ 4.64 × ≥ 2.58 × ≥ × ≥ × ≥ × ≥ × ≥ × ≥ × Otter -> Beaver -> Platypus 20th November, 2009

5 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) Otter -> Beaver -> Platypus 20th November, 2009

6 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’ Otter -> Beaver -> Platypus 20th November, 2009

7 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) ] Otter -> Beaver -> Platypus 20th November, 2009

8 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, , 113, 114, 115, … Need complete classification to be sure Otter -> Beaver -> Platypus 20th November, 2009

9 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 … Otter -> Beaver -> Platypus 20th November, 2009

10 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 Otter -> Beaver -> Platypus 20th November, 2009

11 How? First transition is fixed Run partial machine
Add a new transition when a `missing’ case happens Add `halt’ transition last 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) Otter -> Beaver -> Platypus 20th November, 2009

12 How Many? n m tnf free 2 32 128 3 3,288 82,944 2,280 4 527,952 100,663,296 447,664 24,711,336 ?? 5 110,537,360 176,293,040 Otter -> Beaver -> Platypus 20th November, 2009

13 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 Otter -> Beaver -> Platypus 20th November, 2009

14 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! Otter -> Beaver -> Platypus 20th November, 2009

15 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+2 or …) Halt with failure after a certain number of steps Main trick is how to deal with (11)N case where N is a variable Otter -> Beaver -> Platypus 20th November, 2009

16 Observant Otter Some surprises can be in store {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 ... Otter -> Beaver -> Platypus 20th November, 2009

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

18 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} if {C}11 → 0{D}1 →{B}01 → 0{B}1 → 00 {C} Otter -> Beaver -> Platypus 20th November, 2009

19 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 Otter -> Beaver -> Platypus 20th November, 2009

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

21 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 ... Otter -> Beaver -> Platypus 20th November, 2009

22 Observant Otter Sometimes this is not as simple as it may seem …
1111{C} {C} {C} {C} {C} {C} {C} {C}11 Otter -> Beaver -> Platypus 20th November, 2009

23 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!) Otter -> Beaver -> Platypus 20th November, 2009

24 Blue Bilby n-state m-symbol machines, n x m ≤ 6 tnf free n m Total
Terminated Going Unclassified 2 32 8 24 3 3,288 831 2,457 2,280 616 1,664 tnf n m Total Terminated Going Unclassified 2 128 35 93 3 82,944 22,034 60,910 18,613 64,331 free Otter -> Beaver -> Platypus 20th November, 2009

25 Ebony Elephant n-state m-symbol machines, n x m = 8 n m Total
Terminated Going Unclassified 4 2 527,952 118,348 408,876 728 447,664 ?? 1's 1 2 3 4 5 6 7 8 9 10 11 12 13 # 3836 23161 37995 31023 15131 5263 1487 357 74 Otter -> Beaver -> Platypus 20th November, 2009

26 White Whale n-state m-symbol machines, n x m = 9 or 10 n m Total 3
24,711,336 5 2 110,537,360 176,293,040 (??) Need to improve the technology before taking this on ... Otter -> Beaver -> Platypus 20th November, 2009

27 Demon Duck of Doom n m Total 6 2 ?? 4 3
Otter -> Beaver -> Platypus 20th November, 2009

28 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 Otter -> Beaver -> Platypus 20th November, 2009

29 2-D machines 2 1 1 Otter -> Beaver -> Platypus
2 1 1 Otter -> Beaver -> Platypus 20th November, 2009

30 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 … Otter -> Beaver -> Platypus 20th November, 2009

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

32 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 Otter -> Beaver -> Platypus 20th November, 2009

33 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  Otter -> Beaver -> Platypus 20th November, 2009


Download ppt "Proving Termination and Non-Termination of Busy Beaver Machines"

Similar presentations


Ads by Google