com.opensudoku.puzzle.index.html Maven / Gradle / Ivy
Einstein's riddle
Story from http://en.wikibooks.org/wiki/Puzzles/Logic_puzzles/5_Houses
There are 5 houses in 5 different colors.
In each house lives a person with a different nationality.
The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet.
No owners have the same pet, smoke the same brand of cigar, or drink the same beverage.
Somebody owns a fish. The question is: who?
Hints:
- The English man lives in the red house.
- The Swede keeps dogs as pets.
- The Dane drinks tea.
- The green house is on the left and next to the white house.
- The green homeowner drinks coffee.
- The person who smokes Pall Mall rears birds.
- The owner of the yellow house smokes Dunhill.
- The man living in the center house drinks milk.
- The Norwegian lives in the first house.
- The man who smokes Blends lives next to the one who keeps cats.
- The man who keeps the horse lives next to the man who smokes Dunhill.
- The owner who smokes Blue Master drinks beer.
- The German smokes Prince.
- The Norwegian lives next to the blue house.
- The man who smokes Blends has a neighbor who drinks water.
Here is a Java application for you to try out this riddle.
You should have application shows like this
To swap, step 1, select one item it will become disabled.
Step 2, select another item.
Step 3, they will swap and update check result as well.