Neil's News

+ 2010
+ 2009
+ 2008
+ 2007
+ 2006
- 2005
 Shell Acoustics
 Context Menus
 Security Lecture
 Unfortunate Typo
 Logging Out
 Switch
 Through the Looking Glass
 Scotland Video
 Comma Separated Values
 OU-M880 (Soft Eng)
 Cycling Britain
 Hidden Costs
 Hiring
 Golden
 Style vs Substance
 Bess
 Ajax Content
 DHTML Client
 Over There
 Content Hijacking
 Raw Statistics
 Trying to Fail
 SETI@home 2500
 Security Separation
 Gamma Ray Bursts
 Fishy Behaviour
 Moo Browser
 Caption this Photo
 All Good Things
 Dalek
 Moo Direction
 Open University
 OU-M865 (Projects)
 OU-M876 (Data)
 OU-M886 (Security)
 OU-M878 (Objects)
 OU-M874 (Java)
 OU-M873 (UI)
 Einstein's Riddle
 Glowing Books
 Hogmanay
+ 2004
+ 2003
+ 2002

Einstein's Riddle

15 January 2005

While looking for pictures of exploding pigeons, I stumbled across Einstein's Riddle. After a few minutes of work (most of which was spent flailing around in Python's terrible documentation), a program emerged which spat out one answer. I'd intended to optimise it, but since it only takes half a second to run, there didn't seem much point. Fun little problem.

Google shows that there are quite a few people who have solved this problem using one language or another. My favourite has to be FormulaOne. How one writes the FormulaOne compiler, I've no idea, but that's a pretty powerful language -- at least for this type of problem. I'm unconvinced that one could use it to write blogging software of equal elegance.

One odd thing that nobody else seems to have spotted is that the 15th rule is not required (The man who smokes Blends has a neighbour who drinks water). The inclusion of a redundant rule makes me suspect that this riddle did not in fact come from Einstein. It would be interesting to generalise the solving program and then write a program to generate riddles of this type, seeking the most elegantly simple one.

Update: No! For the upteenth time, I am NOT this man. Geeze, it's like people think there's only one person in this town who knows what an IP address is. Well I guess now that's true.

< Previous | Next >

 
-------------------------------------