the busy beaver, the placid platypus and the universal unicorn

33
Beaver, Platypus, Unicorn, Zoo … Monash 29 th June,2011 The Busy Beaver, the Placid Platypus and the Universal Unicorn James Harland [email protected] Using an to catc h a to chase a otter beaver platyp us

Upload: vance-drake

Post on 04-Jan-2016

34 views

Category:

Documents


0 download

DESCRIPTION

James Harland [email protected]. The Busy Beaver, the Placid Platypus and the Universal Unicorn. 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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

The Busy Beaver, the Placid Platypus and the Universal Unicorn

James Harland

[email protected]

Using an to catch a

to chase a

otter beaver platypus

Page 2: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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 h11R01R

00L

10R

01L

11R

Page 3: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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 1 1

2 4 6

3 6 21

4 13 107

5 ≥ 4098 ≥ 47,176,870 (??)

6 ≥ 3.51×1018276 ≥ 7.41×1036534 (!!)

Page 4: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

What?

n m #1’s #steps

2 2 4 6

3 2 6 21

2 3 9 38

4 2 13 107

2 4 2,050 3,932,964

3 3 374,676,383 119,112,334,170,342,540

5 2 ≥ 4098 ≥ 47,176,870

2 5 ≥ 1.7 × 10352 ≥ 1.9 × 10704

6 2 3.51×1018276 ≥ 7.41×1036534

4 3 ≥ 1.383 × 107036 ≥ 1.025 × 1014072

3 4 ≥ 3.743 × 106518 ≥ 5.254 × 1013036

2 6 ≥ 1.903 × 104933 ≥ 2.415 × 109866

Page 5: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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)

Page 6: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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’

Page 7: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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) ]

Page 8: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Otter -> Beaver -> Platypus Monash 29th June,2011

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

Page 9: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

How?

Easy! :-) To find bb(n,m):

1. Generate all n-state m-symbol machines

2. Classifying them as terminating or non-terminating

3. 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 …

Page 10: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

a b c h11R01R

00L, 10R

10R01R

Page 11: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

How?

First transition is fixed Run partial machine Add a new transition when a `missing’ case happens Add `halt’ transition last

00La b c h11L

01R 10R

{a}0 -> 1{b}0 -> {a}1 -> {a}01 -> 1{b}1 -> 10{c}0

Generates machines in tree normal form (tnf)

Page 12: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

How Many?

n m tnf free

2 2 32 128

3 2 3,288 82,944

2 3 2,280 82,944

4 2 527,952 100,663,296

2 4 447,664 100,663,296

3 3 24,711,336 ??

5 2 110,537,360 ??

2 5 176,293,040 ??

Page 13: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

Page 14: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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!

Page 15: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

Page 16: The Busy Beaver, the Placid Platypus and the Universal Unicorn

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

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Page 17: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

How?

Three main cases:

1) Wild Wombat

2) Stretching Stork

3) Observant Otter

4) (soon also the Ossified Ocelet)

slithering snake

resilient reptile

maniacal monkey

Page 18: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Wild Wombat

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}

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''

Page 19: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Stretching Stork

X {S} IN Y → X {S} I IN-1 Y

11 {C} (11)N 011 → 11 {C} 11 (11)N-1 011

X {S} IN Y → ??

If the wombat doesn't apply and N > 0

Condition N > 0 required to stop this being infinitely applicable

Page 20: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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 → …

Page 21: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

Page 22: The Busy Beaver, the Placid Platypus and the Universal Unicorn

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

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Sometimes this is not as simple as it may seem …

Page 23: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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!)

Page 24: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Blue Bilby

n-state m-symbol machines, n x m ≤ 6

n m Total Terminated

Going Unclassified

2 2 32 8 24 0

3 2 3,288 831 2,457 0

2 3 2,280 616 1,664 0

n m Total Terminated

Going Unclassified

2 2 128 35 93 0

3 2 82,944 22,034 60,910 0

2 3 82,944 18,613 64,331 0

tnf

free

Page 25: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

2 4 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

11

5 3 2

Page 26: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

White Whale

n m Total

3 3 24,711,336

5 2 110,537,360

2 5 176,293,040 (??)

Need to improve the technologybefore taking this on ...

n-state m-symbol machines, n x m = 9 or 10

Page 27: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

Demon Duck of Doom

n m Total

6 2 ??

4 3 ??

3 4 ??

2 6 ??

Page 28: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

Page 29: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

2-D machines

0

0

2

1

1

Page 30: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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 …

Page 31: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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

Page 32: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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’

Page 33: The Busy Beaver, the Placid Platypus and the Universal Unicorn

Beaver, Platypus, Unicorn, Zoo …

Monash 29th June,2011

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