Sie sind auf Seite 1von 10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies


More NextBlog BuiltOn BuiltAt ReportIssue CreateBlog SignIn

ANeighborhoodofInfinity
Sunday,September30,2007

ArborealIsomorphismsfromNuclearPennies
The game of Nuclear Pennies is a game for one player played on a semi-infinite strip of sites, each of which may contain any non-negative number of pennies. The aim is to achieve a target configuration of pennies from a starting configuration by means of penny fusion and penny fission. In penny fission, a penny is split into a pair of pennies in the two neighbouring sites. In penny fusion, two pennies, separated by exactly one site, are fused into one penny in the intervening site. Obviously no fission or fusion take place at the very end site because there is no room for one of the fission products or fusion precursors. The following diagrams show some legal moves in Nuclear Pennies: One using fission:

One using fusion:

Can you achieve this target configuration:

Starting from this configuration?

It's a surprisingly non-trivial task but I urge you to have a go. If you give up, here's a video solution:

blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html

1/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

So a natural question arises: what single penny configurations can be achieved from that starting position? As every move in Nuclear Pennies is reversible, if you solved the puzzle you know we can shift a single penny 6 places left or right. (But to move 6 spaces left we need one extra space on the left.) So labelling positions 0,1,2,... we know that starting from 7 we can place a penny on 6n+1 for all non-negative n. But what about other positions? We can borrow a technique from M Reiss's seminal paper on peg solitaire: Beitrge zur Theorie des Solitr-Spiels, Crelles Journal 54 (1857) 344-379. The idea is to associate an algebraic value with each position and then ensure that each this is chosen so that each legal move leaves the value unchanged. Label the sites as follows:

We consider the value of each penny to be the value of its site and to get the value of a position, add the values of the individual pennies. If we pick x to be one of the complex cube roots of -1 then we have x=x2+1, because x3+1=(1+x)(x2+1-x). We define a move to be paralegal if it doesn't change the value of a position. It should be clear that penny fusion and fission are both paralegal. In other words legal paralegal and paraillegal illegal

Now consider the values of 1,x,x2,... and so on. It's not hard to show that the only time an element in this sequence takes the value 1 is when the exponent is 6. In fact, x is a sixth root of unity. So this shows we can never shift a single coin by anything other than a multiple of 6 sites. As the video shows how to shift by 6 sites we know we can shift a single coin by n sites if and only if n is a multiple of 6 (and there's one site available to the left of the leftmost penny). It's neat that we took an excursion through the field of complex numbers to prove something about a seemingly simple piece of discrete mathematics. But who cares about nuclear coin reactions? That's not my real motivation here. Believe it or not, each coin shuffle above corresponds to an isomorphism between certain types and solving the puzzle above actually demonstrates a really neat isomorphism between tuples of data structures. Go back to the algebra above. We have that legal paralegal because coin reactions correspond to legal manipulations of x. Fissioning a coin represents replacing x by 1+x2, for example. But the converse isn't true. We can manipulate complex numbers in all kinds of interesting ways that don't correspond to coin reactions. For example, we can write -x2 but we aren't allowed negative numbers of coins in a site. But there's another algebraic structure which corresponds exactly to coin reactions. To see that, it's time to start writing Haskell code:
blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html 2/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

>i m p o r tP r e l u d eh i d i n g( L e f t , R i g h t ) >i m p o r tC o n t r o l . M o n a d >i m p o r tT e s t . Q u i c k C h e c k >d a t aT=L e a f|F o r kTTd e r i v i n g( E q , S h o w )

a simple binary tree type. That declaration simply says that in the algebra of types, T=T2+1. Now unlike complex numbers, when you form a polynomial in the type T you can't have anything other than a nonnegative integer as a coefficient. In other words, positions in the game of Nuclear Pennies correspond precisely to polynomials, in the algebra of types, in T.
Tis

For example, consider the first move in the video solution I gave:

It corresponds to T7->T8+T6 or in Haskell notation an isomorphism

( T , T , T , T , T , T , T )>E i t h e r( T , T , T , T , T , T , T , T )( T , T , T , T , T , T )

So you know what I'm going to do next, I'm going to code up the entire solution as a Haskell program mapping seven trees to one and back again. You don't need to read all of the following, but I thought I'd put it here for completeness. So skip over the code to the end if you feel like it... Firstly, E i t h e ris a bit tedious to write. So here's my own implementation that uses a slightly non-standard way to write a type constructor:

>d a t aa: +b=L e f ta|R i g h tb

We know that the type algebra is commutative, so A+B=B+A. But that '=' sign is really an isomorphism, not equality, and we'll need that isomorphism explicitly:

>c o m m u t e: :a: +b>b: +a >c o m m u t e( L e f ta )=R i g h ta >c o m m u t e( R i g h tb )=L e f tb

Same goes for associativity:

>a s s o c i a t e: :( a: +b ): +c>a: +( b: +c ) >a s s o c i a t e( L e f t( L e f ta ) )=L e f ta >a s s o c i a t e( L e f t( R i g h tb ) )=R i g h t( L e f tb ) >a s s o c i a t e( R i g h tc )=R i g h t( R i g h tc )

And associativity the other way. Here I'm starting a convention of using primes to represent the inverse of a function.

blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html

3/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies


>a s s o c i a t e ': :a: +( b: +c )>( a: +b ): +c >a s s o c i a t e '( L e f ta )=L e f t( L e f ta ) >a s s o c i a t e '( R i g h t( L e f tb ) )=L e f t( R i g h tb ) >a s s o c i a t e '( R i g h t( R i g h tc ) )=R i g h tc

For a fixed b, '+b' is a functor so f :: a -> b induces a map a+b -> c+b. Unfortunately I don't know an easy way to make '+b', as opposed to 'b+', a functor in Haskell. So I'll have to make do with this function that lifts f to a+b:

>l i f t L e f t : :( a>c )>a: +b>c: +b >l i f t L e f tf( L e f ta )=L e f t( fa ) >l i f t L e f tf( R i g h tb )=R i g h tb

I'm going to need all these.

>l i f t L e f t 2=l i f t L e f t.l i f t L e f t >l i f t L e f t 3=l i f t L e f t.l i f t L e f t 2 >l i f t L e f t 4=l i f t L e f t.l i f t L e f t 3 >l i f t L e f t 5=l i f t L e f t.l i f t L e f t 4

I'm going to represent tuples a little weirdly, though arguably this is much more natural than the usual way to write tuples. T ncorresponds to Tn:

>t y p eT 0=( ) >t y p eT 1=( T , T 0 ) >t y p eT 2=( T , T 1 ) >t y p eT 3=( T , T 2 ) >t y p eT 4=( T , T 3 ) >t y p eT 5=( T , T 4 ) >t y p eT 6=( T , T 5 ) >t y p eT 7=( T , T 6 ) >t y p eT 8=( T , T 7 )

And now we need functions to assemble and disassemble trees at the start of a tuple. These correspond to fusion and fission respectively in the game.

>a s s e m b l e( L e f tx )=( L e a f , x ) >a s s e m b l e( R i g h t( a , ( b , x ) ) )=( F o r kab , x ) >a s s e m b l e '( L e a f , x )=L e f tx >a s s e m b l e '( F o r kab , x )=R i g h t( a , ( b , x ) )

Here's the first step in the solution. That was easy.

>s t e p 1: :T 7>T 6: +T 8 >s t e p 1=a s s e m b l e '

It gets successively harder because we need to push the a s s e m b l e 'function down into the type additions:

>s t e p 2: :T 6: +T 8>T 5: +T 7: +T 8 >s t e p 2=l i f t L e f ta s s e m b l e ' >s t e p 3: :T 5: +T 7: +T 8>T 4: +T 6: +T 7: +T 8 >s t e p 3=l i f t L e f t 2a s s e m b l e ' >s t e p 4: :T 4: +T 6: +T 7: +T 8>T 3: +T 5: +T 6: +T 7: +T 8 >s t e p 4=l i f t L e f t 3a s s e m b l e ' >s t e p 5: :T 3: +T 5: +T 6: +T 7: +T 8>T 2: +T 4: +T 5: +T 6: +T 7: +T 8 >s t e p 5=l i f t L e f t 4a s s e m b l e '

blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html

4/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies


>s t e p 6: :T 2: +T 4: +T 5: +T 6: +T 7: +T 8>T 1: +T 3: +T 4: +T 5: +T 6: +T 7: +T 8 >s t e p 6=l i f t L e f t 5a s s e m b l e '

We're going to use a few functions whose sole purposes is to shuffle around type additions using commutativity and associativity.

>s w a p 2 3: :( a: +b ): +c>( a: +c ): +b >s w a p 2 3=c o m m u t e.a s s o c i a t e.l i f t L e f tc o m m u t e >s h u f f l e 1: :T 1: +T 3: +T 4: +T 5: +T 6: +T 7: +T 8>T 1: +T 4: +T 3: +T 5: +T 6: +T 7: +T 8 >s h u f f l e 1=l i f t L e f t 4s w a p 2 3 >s h u f f l e 2: :( T 1: +T 4 ): +T 3: +T 5: +T 6: +T 7: +T 8>T 3: +T 5: +T 6: +T 7: +T 8: +( T 1: +T 4 ) >s h u f f l e 2=s w a p 2 3.l i f t L e f ts w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f t 3s w a p 2 3.l i f t L e f t 4c o m m u t e

After the left-to-right sweep, here's the right-to-left sweep:

>s t e p 7: :T 3: +T 5: +T 6: +T 7: +T 8: +( T 1: +T 4 )>T 4: +T 6: +T 7: +T 8: +( T 1: +T 4 ) >s t e p 7=l i f t L e f t 4a s s e m b l e >s t e p 8: :T 4: +T 6: +T 7: +T 8: +( T 1: +T 4 )>T 5: +T 7: +T 8: +( T 1: +T 4 ) >s t e p 8=l i f t L e f t 3a s s e m b l e >s t e p 9: :T 5: +T 7: +T 8: +( T 1: +T 4 )>T 6: +T 8: +( T 1: +T 4 ) >s t e p 9=l i f t L e f t 2a s s e m b l e >s t e p 1 0: :T 6: +T 8: +( T 1: +T 4 )>T 7: +( T 1: +T 4 ) >s t e p 1 0=l i f t L e f ta s s e m b l e >s h u f f l e 3: :T 7: +( T 1: +T 4 )>T 1: +T 4: +T 7 >s h u f f l e 3=c o m m u t e

And now we have another left-to-right sweep followed by a right-to-left sweep:

>s t e p 1 1: :T 1: +T 4: +T 7>T 2: +T 0: +T 4: +T 7 >s t e p 1 1=l i f t L e f t 2( c o m m u t e.a s s e m b l e ' ) >s t e p 1 2: :T 2: +T 0: +T 4: +T 7>T 3: +T 1: +T 0: +T 4: +T 7 >s t e p 1 2=l i f t L e f t 3( c o m m u t e.a s s e m b l e ' ) >s t e p 1 3: :T 3: +T 1: +T 0: +T 4: +T 7>T 4: +T 2: +T 1: +T 0: +T 4: +T 7 >s t e p 1 3=l i f t L e f t 4( c o m m u t e.a s s e m b l e ' ) >s t e p 1 4: :T 4: +T 2: +T 1: +T 0: +T 4: +T 7 >T 5: +T 3: +T 2: +T 1: +T 0: +T 4: +T 7 >s t e p 1 4=l i f t L e f t 5( c o m m u t e.a s s e m b l e ' ) >s h u f f l e 4: :T 5: +T 3: +T 2: +T 1: +T 0: +T 4: +T 7>T 7: +T 5: +T 3: +T 2: +T 1: +T 0: +T 4 >s h u f f l e 4=l i f t L e f t 5c o m m u t e.l i f t L e f t 4s w a p 2 3.l i f t L e f t 3s w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f ts w a p 2 3.s w a p 2 3 >s h u f f l e 5: :T 7: +T 5: +T 3: +T 2: +T 1: +T 0: +T 4>T 7: +T 5: +T 4: +T 3: +T 2: +T 1: +T 0 >s h u f f l e 5=l i f t L e f t 3s w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f ts w a p 2 3.s w a p 2 3 >s t e p 1 5: :T 7: +T 5: +T 4: +T 3: +T 2: +T 1: +T 0>T 6: +T 4: +T 3: +T 2: +T 1: +T 0 >s t e p 1 5=l i f t L e f t 5( a s s e m b l e.c o m m u t e ) >s t e p 1 6: :T 6: +T 4: +T 3: +T 2: +T 1: +T 0>T 5: +T 3: +T 2: +T 1: +T 0 >s t e p 1 6=l i f t L e f t 4( a s s e m b l e.c o m m u t e ) >s t e p 1 7: :T 5: +T 3: +T 2: +T 1: +T 0>T 4: +T 2: +T 1: +T 0 >s t e p 1 7=l i f t L e f t 3( a s s e m b l e.c o m m u t e ) >s t e p 1 8: :T 4: +T 2: +T 1: +T 0>T 3: +T 1: +T 0 >s t e p 1 8=l i f t L e f t 2( a s s e m b l e.c o m m u t e ) >s t e p 1 9: :T 3: +T 1: +T 0>T 2: +T 0 >s t e p 1 9=l i f t L e f t( a s s e m b l e.c o m m u t e ) >s t e p 2 0: :T 2: +T 0>T 1 >s t e p 2 0=a s s e m b l e.c o m m u t e

And put it all together:


blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html 5/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

>i s o: :T 7>T 1 >i s o=s t e p 2 0.s t e p 1 9.s t e p 1 8.s t e p 1 7.s t e p 1 6.s t e p 1 5.s h u f f l e 5.s h u f f l e 4.s t e p 1 4. > s t e p 1 3.s t e p 1 2.s t e p 1 1.s h u f f l e 3.s t e p 1 0.s t e p 9.s t e p 8.s t e p 7. > s h u f f l e 2.s h u f f l e 1.s t e p 6.s t e p 5.s t e p 4.s t e p 3.s t e p 2.s t e p 1

At this point I might as well write the inverse. This was mostly derived from the forward function using vim macros:

>s t e p 2 0 ': :T 1>T 2: +T 0 >s t e p 2 0 '=c o m m u t e.a s s e m b l e ' >s t e p 1 9 ': :T 2: +T 0>T 3: +T 1: +T 0 >s t e p 1 9 '=l i f t L e f t( c o m m u t e.a s s e m b l e ' ) >s t e p 1 8 ': :T 3: +T 1: +T 0>T 4: +T 2: +T 1: +T 0 >s t e p 1 8 '=l i f t L e f t 2( c o m m u t e.a s s e m b l e ' ) >s t e p 1 7 ': :T 4: +T 2: +T 1: +T 0>T 5: +T 3: +T 2: +T 1: +T 0 >s t e p 1 7 '=l i f t L e f t 3( c o m m u t e.a s s e m b l e ' ) >s t e p 1 6 ': :T 5: +T 3: +T 2: +T 1: +T 0>T 6: +T 4: +T 3: +T 2: +T 1: +T 0 >s t e p 1 6 '=l i f t L e f t 4( c o m m u t e.a s s e m b l e ' ) >s t e p 1 5 ': :T 6: +T 4: +T 3: +T 2: +T 1: +T 0>T 7: +T 5: +T 4: +T 3: +T 2: +T 1: +T 0 >s t e p 1 5 '=l i f t L e f t 5( c o m m u t e.a s s e m b l e ' ) >s h u f f l e 5 ': :T 7: +T 5: +T 4: +T 3: +T 2: +T 1: +T 0>T 7: +T 5: +T 3: +T 2: +T 1: +T 0: +T 4 >s h u f f l e 5 '=s w a p 2 3.l i f t L e f ts w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f t 3s w a p 2 3 >s h u f f l e 4 ': :T 7: +T 5: +T 3: +T 2: +T 1: +T 0: +T 4>T 5: +T 3: +T 2: +T 1: +T 0: +T 4: +T 7 >s h u f f l e 4 '=s w a p 2 3.l i f t L e f ts w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f t 3s w a p 2 3.l i f t L e f t 4s w a p 2 3.l i f t L e f t 5c o m m u t e >s t e p 1 4 ': :T 5: +T 3: +T 2: +T 1: +T 0: +T 4: +T 7>T 4: +T 2: +T 1: +T 0: +T 4: +T 7 >s t e p 1 4 '=l i f t L e f t 5( a s s e m b l e.c o m m u t e ) >s t e p 1 3 ': :T 4: +T 2: +T 1: +T 0: +T 4: +T 7>T 3: +T 1: +T 0: +T 4: +T 7 >s t e p 1 3 '=l i f t L e f t 4( a s s e m b l e. c o m m u t e ) >s t e p 1 2 ': :T 3: +T 1: +T 0: +T 4: +T 7>T 2: +T 0: +T 4: +T 7 >s t e p 1 2 '=l i f t L e f t 3( a s s e m b l e.c o m m u t e ) >s t e p 1 1 ': :T 2: +T 0: +T 4: +T 7>T 1: +T 4: +T 7 >s t e p 1 1 '=l i f t L e f t 2( a s s e m b l e.c o m m u t e ) >s h u f f l e 3 ': :T 1: +T 4: +T 7>T 7: +( T 1: +T 4 ) >s h u f f l e 3 '=c o m m u t e >s t e p 1 0 ': :T 7: +( T 1: +T 4 )>T 6: +T 8: +( T 1: +T 4 ) >s t e p 1 0 '=l i f t L e f ta s s e m b l e ' >s t e p 9 ': :T 6: +T 8: +( T 1: +T 4 )>T 5: +T 7: +T 8: +( T 1: +T 4 ) >s t e p 9 '=l i f t L e f t 2a s s e m b l e ' >s t e p 8 ': :T 5: +T 7: +T 8: +( T 1: +T 4 )>T 4: +T 6: +T 7: +T 8: +( T 1: +T 4 ) >s t e p 8 '=l i f t L e f t 3a s s e m b l e ' >s t e p 7 ': :T 4: +T 6: +T 7: +T 8: +( T 1: +T 4 )>T 3: +T 5: +T 6: +T 7: +T 8: +( T 1: +T 4 ) >s t e p 7 '=l i f t L e f t 4a s s e m b l e ' >s h u f f l e 2 ': :T 3: +T 5: +T 6: +T 7: +T 8: +( T 1: +T 4 )>( T 1: +T 4 ): +T 3: +T 5: +T 6: +T 7: +T 8 >s h u f f l e 2 '=l i f t L e f t 4c o m m u t e.l i f t L e f t 3s w a p 2 3.l i f t L e f t 2s w a p 2 3.l i f t L e f ts w a p 2 3.s w a p 2 3 >s h u f f l e 1 ': :T 1: +T 4: +T 3: +T 5: +T 6: +T 7: +T 8>T 1: +T 3: +T 4: +T 5: +T 6: +T 7: +T 8 >s h u f f l e 1 '=l i f t L e f t 4s w a p 2 3 >s t e p 6 ': :T 1: +T 3: +T 4: +T 5: +T 6: +T 7: +T 8>T 2: +T 4: +T 5: +T 6: +T 7: +T 8 >s t e p 6 '=l i f t L e f t 5a s s e m b l e >s t e p 5 ': :T 2: +T 4: +T 5: +T 6: +T 7: +T 8>T 3: +T 5: +T 6: +T 7: +T 8 >s t e p 5 '=l i f t L e f t 4a s s e m b l e >s t e p 4 ': :T 3: +T 5: +T 6: +T 7: +T 8>T 4: +T 6: +T 7: +T 8 >s t e p 4 '=l i f t L e f t 3a s s e m b l e >s t e p 3 ': :T 4: +T 6: +T 7: +T 8>T 5: +T 7: +T 8 >s t e p 3 '=l i f t L e f t 2a s s e m b l e >s t e p 2 ': :T 5: +T 7: +T 8>T 6: +T 8 >s t e p 2 '=l i f t L e f ta s s e m b l e >s t e p 1 ': :T 6: +T 8>T 7

blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html

6/10

11/15/13
>s t e p 1 '=a s s e m b l e

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

>i s o ': :T 1>T 7 >i s o '=s t e p 1 '.s t e p 2 '.s t e p 3 '.s t e p 4 '. > s t e p 5 '.s t e p 6 '.s h u f f l e 1 '.s h u f f l e 2 '.s t e p 7 '. > s t e p 8 '.s t e p 9 '.s t e p 1 0 '.s h u f f l e 3 '.s t e p 1 1 '. > s t e p 1 2 '.s t e p 1 3 '.s t e p 1 4 '.s h u f f l e 4 '.s h u f f l e 5 '. > s t e p 1 5 '.s t e p 1 6 '.s t e p 1 7 '.s t e p 1 8 '.s t e p 1 9 '.s t e p 2 0 '

Enough already! Time to test the code. It's already pretty obvious that each of the steps above is invertible but let's use QuickCheck anyway. And here's a small puzzle: why to I have r e t u r nL e a ftwice?

>i n s t a n c eA r b i t r a r yTw h e r e > a r b i t r a r y=o n e o f[ r e t u r nL e a f , r e t u r nL e a f , l i f t M 2F o r ka r b i t r a r ya r b i t r a r y ] >m a i n=d o > q u i c k C h e c k$\ x>x = = i s o( i s o 'x ) > q u i c k C h e c k$\ x>x = = i s o '( i s ox )

All done. So time to think about what exactly we have here. We have a way to pack 7-tuples of trees into a single tree exactly. It's easy to store two trees in a tree say, just by making them the left and right branch of another tree. But then we get some 'wastage' because the isolated leaf doesn't correspond to any pair of trees. We have a perfect packing. Of course the set of trees and the set of 7-tuples of trees have the same cardinality, and it's not hard to find a bijection by enumerating these sets and laying them out side by side. But such a bijection could get arbitrarily complicated. But the isomorphism above only looks at the tops of the trees and can be executed lazily. It's a particularly nice isomorphism. And from what I showed above, you can only pack (6n+1)-tuples into a single tree. Weird eh? And everything I say here is derived from the amazing paper Seven Trees in One by Andreas Blass. I've mentioned it a few times before but I've been meaning to implement the isomorphism explicitly for ages. Blass's paper also shows that you can, to some extent, argue paralegal legal - something that's far from obvious. Posted by Dan Piponi at Sunday, September 30, 2007

11comments: Milessaid... Another amazing paper along similar lines is Tom Leinster and Marcelo Fiore's Objects of Categories as Complex Numbers, which shows how the "meaningless computation" of Blass' section 2 can be made rigorous and proves a general soundness theorem for such proofs. Monday, 01 October, 2007 BrentYorgeysaid... Hey, I'm planning to write a post on the "nuclear pennies" game on my math blog for high school students (mathlesstraveled.com). Mind if I steal your images? =) Friday, 05 October, 2007 sigfpesaid... Brent, Steal away! Friday, 05 October, 2007 Porgessaid... It would be very cool if someone came up with a program to automatically generate type isomorphisms such as these :)
blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html 7/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

Saturday, 06 October, 2007 GeorgeBellsaid... Interesting puzzle!!? I have an alternate proof thet doesn't rely on complex numbers, but it less slick. Is 18 moves the shortest possible solution? You can do it in only 4 moves if you allow "negative pennies". Monday, 08 October, 2007 JeremyHentysaid... Porges, there's a Haskell program called Djinn that creates Haskell expressions given only the type. See http://lambdathe-ultimate.org/node/1178 . Maybe it's powerful enough to discover these isomorphisms? Monday, 08 October, 2007 sigfpesaid... George, If you allow negative pennies then whether you realise it or not you're proving that two polynomials lie in a certain ideal of a polynomial ring! :-) Monday, 08 October, 2007 sigfpesaid... jeremy, Djinn will find functions with the right type, but not isomorphisms. Monday, 08 October, 2007 GeorgeBellsaid... ** Spoiler Alert ** Here is a nice symmetrical solution in 18 moves. I'm pretty sure no shorter solution exists. 000000010 000000101 000001011 000010111 000101111 001011111 010111111 101111111 110211111 111121111 111112011 111111101 111111010 111110100 111101000 111010000 110100000 101000000 010000000 Tuesday, 09 October, 2007 sigfpesaid... George, Nicely done! I believe that is the shortest solution.
blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html 8/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

See also Cale's: http://cale.yi.org/autoshare/pennies.png Tuesday, 09 October, 2007 JeremyHentysaid... sigfpe, I was wondering if Djinn would find the natural isomorphisms without needing to be told that they were isomorphisms, but now I think that's unlikely. Asked to find maps between T^7 and T it would probably just find obvious canonical projections and embeddings. :-( PS: your blog rejects the <sup> tag, which seems unnecessarily paranoid. Tuesday, 09 October, 2007 Post a Comment Linkstothispost Create a Link Newer Post Subscribe to: Post Comments (Atom) Home Older Post

BlogArchive
2013 (4) 2012 (8) 2011 (13) 2010 (20) 2009 (21) 2008 (35) 2007 (37) December (1) November (5) October (2) September (3) Arboreal Isomorphisms from Nuclear Pennies Tries and their Derivatives The Antidiagonal July (3) June (2) May (1) April (3) March (7) February (6) January (4) 2006 (92) 2005 (53)

SomeLinks
The Comonad.Reader Rubrication Richard Borcherds: Mathematics and physics The n-Category Cafe Ars Mathematica

AboutMe
blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html 9/10

11/15/13

A Neighborhood of Infinity: Arboreal Isomorphisms from Nuclear Pennies

Dan Piponi
Follow

1.5k

Blog: A Neighborhood of Infinity Code: Github Twitter: sigfpe Home page: www.sigfpe.com View my complete profile

blog.sigfpe.com/2007/09/arboreal-isomorphisms-from-nuclear.html

10/10

Das könnte Ihnen auch gefallen