# A Neighborhood of Infinity

## Saturday, August 09, 2008

### Untangling with Continued Fractions: Part 0

A rational tangle is what you get when you take two initially separate lengths of rope and then allow them to interact while keeping the ends 'at infinity'. You're allowed to do whatever tangling you like with the proviso that you can't pass the ends of the ropes through your tangle. We'll also insist that tangles are arranged so that the four loose ends go off in directions corresponding (at least roughly) to the four diagonals. This is, of course, mathematics, so there'll be some idealisation going on too.

Here is an example of a tangle:

My goal over the next few posts is to sketch how these tangles can be classified mathematically and develop a short Haskell program to tell you how to untangle them. Along the way we'll meet a monad that gives a simple embedded language to describe knots and tangles as well as an amazing connection with continued fractions noticed by John Conway. We'll also briefly touch on some statistical thermodynamics, quantum field theory, quantum computing, genetics as well as a little bit of knot theory. Amazingly these subjects are all tied together in surprising ways.

The important idea is that all such tangles can be untangled by composing a sequence of just three operations: a rotation, a twist and an antitwist. A rotation is simply a 90 degree rotation anticlockwise. A twist brings the lower right string over the upper right string so that the upper and lower right strings end up swapping places. An antitwist is the inverse to the twist so that a twist followed by an untwist cancels out. It's a bit like solving Rubik's cube.

If I enter machine readable notation describing the above photo into my program the output should be:
rotateantitwistrotatetwistrotateantitwistrotatetwistrotateantitwistantitwistantitwist

Here is a movie showing how that solution gets played out. That's one initial frame plus 12 more for each of the moves listed above:

(Note that I used bungee cords which are quite rigid so doing a twist would sometimes flip the innards of the tangle itself, for example on the first antitwist. That's allowed. The restriction is that I can't bring the ends into 'the picture' at any point.)

Anyway, it took a while to put that video together so that's all for now. In the next post I'll discuss how we form a machine readable description of the tangle above using monadic do-notation. (It'd be cool if I had some smart image processing code to do this, but alas, we're going to have to enter it by hand.)

Mitch said...

It'd be cool if I had some smart image processing code to do this...

See http://processing.org/

Javier Lopez said...

Why do you need the anti-twist? cannot you recover it from twist and rotation alone?

sigfpe said...

Javier,

You're right. But using the antitwist is convenient because if we use only twist and rotate it takes 5 operations to replace antitwist. I wasn't really thinking in terms of a minimal set of operations, I was just thinking that we have a group so I might as well use generators and their inverses whenever I feel like it.

leithaus said...

Knotation is cool, encoding knots in \pi-calculus is cooler ;-)

You can associate processes with crossings and wires.

It turns out you need buffering to make things work and you have a design choice to make wires or crossings buffer.

You can then write a function from the Dowker-Thistlethwaite code for a knot to the process that encodes it.

You can also encode Reidemeister moves as operations on processes (encoding knots).

It is straightforward to see that R1 and R2 result in processes that are weakly bisimilar to the processes they were applied to. It's considerably more subtle to see this for R3.

sigfpe said...

leithaus,

A bit of googling reveals you've given some talks on knots and processes. Cool! Anyway, I'll be taking a slightly different tack.

leithaus said...

Understood. My motivations for this encoding were similar. i wanted a sanity check that the encodings for representations of Hopf algebra elements and spin networks as processes made sense.