## Decoding the mysterious symmetry of the bicycle lock numbers

2014-02-25 § Leave a comment

Suppose you have a lock of this sort that has *n* dials and *k* numbers on each dial. Let *m*(*n*, *k*) be the minimum number of turns that always suffice to open the lock from any starting position, where a turn consists of rotating **any number of adjacent rings** by one place.

In the previous post, we found an algorithm for computing these *bicycle lock numbers*, revealing a mysterious symmetry, « Read the rest of this entry »

## The bicycle lock problem

2014-02-18 § 3 Comments

Don’t lock your bicycle with a combination lock. Someone will steal it: I learnt this the hard way. It’s quite easy to open a combination lock by feel, without knowing the combination. Try it: with a bit of practice, you can open the lock with your eyes shut. (It’s easier to do this with an old wobbly lock than a tight-fitting new one.)

« Read the rest of this entry »

## Beyond Bézier curves

2013-11-13 § 4 Comments

There is a new feature of Pages and Keynote, not mentioned in any of Apple’s publicity nor in any press coverage I’ve seen, that is really very interesting. Perhaps it will even one day prove to have been revolutionary, in a quiet way. « Read the rest of this entry »

## I hate the Pumping Lemma

2013-08-18 § 29 Comments

I hate the Pumping Lemma for regular languages. It’s a complicated way to express an idea that is fundamentally very simple, and it isn’t even a very good way to prove that a language is not regular.

Here it is, in all its awful majesty: for every regular language L, there exists a positive whole number *p* such that every string *w*∈L that has *p* characters or more can be broken down into three substrings *xyz*, where *y* is not the empty string and the total length of *xy* is at most *p*, and for every natural number *i* the string *xy ^{i}z* is also in L.

« Read the rest of this entry »

## The algebra of Unix command substitution

2013-08-16 § 6 Comments

Shadab Ahmed raised an interesting question. Open a Unix command shell, type `: '!!'`

and press return. Then type `: "!!" '!!'`

and press return. Now repeat the following a few times: press the up arrow, and press return.

## “Venn diagram” partitioning

2013-07-10 § Leave a comment

Paddy3118 wrote about partitioning elements in the same way a Venn diagram does. So, if we have sets *A*, *B* and *C*, the partitions are

## Linear Logic without Units

2013-05-10 § Leave a comment

My PhD thesis (2007) was available for several years from my web site at the University of Manchester, but since that site was taken down it’s been unavailable. Today’s announcement is that I’ve finally got round to uploading it to GitHub.