Einstein's five-houses riddle is a famous logic puzzle. Last year we have proved the existence of its unique solution by Coq. Recently DasoviÄ‡ et al. demonstrates that a spreadsheet application can solve it as a linear programming problem. Although they use Microsoft Excel's Solver add-in, it is even easier to perform the task by LibreOffice Calc, thanks to its built-in Solver menu.

Here is a spreadsheet in OpenDocument Format reproducing the mathematical model described in the paper: five-houses.ods

How to play it (tested with LibreOffice 5.3.2):

- Go to menu "Tools" > "Solver ..."
- Pick an arbitrary empty cell for "Target cell"; leave "Optimize to" Maximum or whatever
- Choose all of yellow cells in field "By changing cells" by entering
`$B$2:$F$6;$B$9:$F$13;$B$16:$F$20;$B$23:$F$27;$B$30:$F$34;$J$12;$J$14;$J$19`

- In field "Limiting Conditions", make every yellow cell "Binary", and specify an equation for each cell with a comment (see cheatsheet)
- It is advisable to choose "LibreOffice CoinMP Linear Solver" as Solver Engine from "Options..." in the dialog. Also checking "Assume variables as integer" and "Assume variables as non-negative" would be a plus but optional.
- Push "Solve" button

Then it will finish in only a second or so.

We have observed a couple of interesting points during this attempt; the one is that constraint (4), namely

The green house is on the left of the white house.

should be interpreted in a strict sense. That is, it must require that the green house is just next to the white house. Otherwise, the riddle could have several solutions. In fact the last two sheets of the above spreadsheet show alternative solutions under a weaker version of constraint (4). Moreover, constraint (19) is unnecessary at least for Calc's solver.

2016: Dec / Nov / Sep / Aug / Jul / Mar / Feb / Jan

2015: Dec / Oct / Sep / Jul / May / Mar / Feb

2014: Dec / Nov / Oct / Aug / Apr / Mar / Feb / Jan

2013: Dec / Nov / Oct / Sep / Aug / Jun / May / Apr / Mar

2012: Nov / Oct / Sep / Jul / Jun / May / Mar / Feb / Jan

2011: Dec / Nov / Oct / Sep / Jul / Jun / Apr / Mar / Feb / Jan

2010: Dec / Nov / Oct / Sep / Aug / Jul / Jun / May / Apr / Mar / Feb / Jan

2009: Dec / Nov / Oct / Sep / Aug / Jul / Jun / May / Apr / Mar / Feb / Jan

2008: Dec / Nov / Oct / Sep / Aug / Jul / Jun / May / Apr / Mar / Feb / Jan

2007: Dec / Nov / Oct / Sep / Aug / Jul / Jun / May / Apr / Mar / Feb / Jan

© 2006-2017 fixedpoint.jp