PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

Merry Xmas!

Note: This article was originally published at Planet PHP on 26 December 2010.
Planet PHP

To everyone who participated in the Christmas Conundrum, I hope you enjoyed this little dose of holiday fun. :-)

Congrats to everyone who solved it. If you're curious, here are the first seven people who solved it, in order:

  1. Christer Edvartsen
  2. Terry Matula
  3. Derick Rethans
  4. Andrei Zmievski
  5. Patrick Springstubbe
  6. Helmut Hummel
  7. Krzysztof Kotowicz

If you want the solution, keep reading.

I created the puzzle before going to bed Tuesday night. I had a lot of ideas, but I kept coming back to the idea of beginning with an animated digital clock, just like I used for a puzzle I made years ago. For that puzzle, the order of the sequence was irrelevant, so I made the clock advance pretty normally. This time, I decided I would make the sequence matter, which would make the clock seem much more sporadic. I also wanted to tailor the puzzle to an audience primarily made up of developers. Binary it is. :-)

Next, I plotted MERRY XMAS! in a text file:

X X XXXXX XXXX XXXX X X XX XX X X X X X X X X X X XXXX XXXX XXXX X X X X X X X X X X X XXXXX X X X X X A X X X X X XXX X X X XX XX X X X X X X X X XXXXX XXX X X X X X X X X X X X X X X XXX X

Knowing that I wanted to use binary and wanted to use a digital clock, I knew the numbers couldn't be too big. I like creative puzzles, but I also wanted to get to bed, so I simply assigned the values vertically, like this:

1024 X X XXXXX XXXX XXXX X X 512 XX XX X X X X X X X 256 X X X XXXX XXXX XXXX X 128 X X X X X X X X 64 X X XXXXX X X X X X 32 16 X X X X X XXX X 8 X X XX XX X X X X 4 X X X X XXXXX XXX X 2 X X X X X X X 1 X X X X X X XXX X

I was still doing this by hand. (I made the old puzzle with PHP.) At this point, I regretted that decision a bit, but I powered through and quickly added up each column:

1024 512 256 + 128 + 64 + 16 + 8 + 4 + 1 = 477 512 1024 A A 512 + 64 + 2 = 578 1024 + 256 + 128 + 16 + 4 + 1 = 1429 1024 + 256 + 16 + 4 + 1 = 1301 1024 + 256 + 16 + 4 + 1 = 1301 1024 + 512 + 256 + 128 + 64 + 8 = 1992 A A 512 + 64 + 4 + 2 + 1 = 583 1024 + 256 + 128 + 8 + 4 = 1420 1024 + 256 + 16 + 4 = 1300 1024 + 256 + 8 + 4 = 1292 1024 + 512 + 256 + 128 + 64 + 4 + 2 + 1 = 1991 A A 1024 + 64 + 16 + 8 + 4 + 2 + 1 = 1119 1024 + 256 + 64 + 8 = 1352 1024 + 256 + 64 + 4 = 1348 1024 + 256 + 64 + 8 = 1352 1024 + 512 + 256 + 128 + 64 + 16 + 8 + 4 + 2 + 1 = 2015 A A 1024 + 512 + 256 + 128 + 64 + 16 + 1 = 2001 512 + 8 + 2 = 522 256 + 4 = 260 512 + 8 + 2 = 522 1024 + 512 + 256 + 128 + 64 + 16 + 1 = 2001

This gave me numbers small enough to work (no larger than four digits). If I had been lucky enough that each number could also represent a valid time, I was going to add one more bit of cleverness and use an analog clock with different colors to denote ante meridiem and post meridiem. But, since I wasn't so lucky, I went with the original idea of a digital clock and made this:

I was pretty happy that the first two numbers made for a nice hint, and the hint I posted was really just an attempt to make i

Truncated by Planet PHP, read more at the original (another 1326 bytes)