Sunday, May 28, 2006

I loooooooooooooooove puzzles

Leading up to the launch of The Da Vinci Code movie, Google ran a series of related puzzles and riddles - which I thoroughly enjoyed. As many others did too, and informed Google so, they are now running an on-going puzzle section, led by Wei-Hwa Huang, a soon-to-be-fellow-colleague and four-time world puzzle champion.

The most recent puzzle was a good one.
Here it is, for your enjoyment:

Using the numbers 3, 3, 8, 8 (in any order), make a mathematical expression that equals 24. You can use only addition, subtraction, multiplication, and division (and parentheses), but in any order you wish. Note that you have to use all four numbers; otherwise 3 times 8 would be valid -- and that wouldn't be much of a puzzle, would it?

I wrote a little perl script to brute-force the answer, available at http://colmans.net/blog/puzzle24. Help yourself to the code, but acknowledge me if you pass it on please (or just send them the link to my code directly) - comments are encouraged.

0 Comments:

Post a Comment

<< Home