Monthly Archives: February 2012

Cahen’s Constant and the Ghostbusters

Relationship between Cahen’s constant and who you’re gonna call

I’m teaching introductory algorithms and data structures at ITU and having a ball.

Since a while back I’ve used weekly, small, well-defined programming exercises for all my courses. It’s a lot of work to develop these, but also a lot of fun.

The book I’m using, Sedgewick and Wayne’s Algorithms (4th ed.), makes it natural to have an exercise about the four sum problem early on, involving a bit of coding, parsing, simple experimental and theoretical running time analysis, and a clever idea or two. Rasmus Pagh had a brilliant idea how to turn this exercise into something fun, inspired by xkcd 687. After all, finding deep-looking product formulas is just a question of looking (after taking logarithms) for values that add to 0. Given enough interesting numbers, some pattern has to emerge.

I’ve played around with Rasmus’s exercise it a bit more since yesterday, added some spit and polish, and made it slightly crazier. The best new law of physics I’ve discovered this way is shown at the top. It relates

  • the energy equivalent muc2 of the atomic mass constant in in MeV,
  • the energy equivalent mdc2 of the mass of a deuterium atom in Joule,
  • Cahen’s constant (roughly 0.643410), defined by a sum of Sylvester numbers ak, and
  • G, the phone number of the Ghostbusters, 5552368.

You can’t make that up. It’s correct up to rounding errors and a cavalier attitude to dimensions.

The finished exercise, with data files, is at the course blog at ITU; I’m slowly getting myself organised to publishing these things on GitHub to make them more useful for other teachers. (That would include the TeX file for the exercise description, for example.) Stay tuned.

Edit to add: I guess the real conclusion of this formula is that the world finally knows the unit and dimension of US phone numbers, assuming that Cahen’s constant is dimension-less. Phone numbers express inverse energy squared, measured in mega electron Volt Joule. You heard it here first.

Edit to add (25 May 2012): xkcd 1047: approximations