The Zebra Puzzle is a well-known logic puzzle. The puzzle is often called Einstein's Puzzle or Einstein's Riddle because it is said to have been invented by Albert Einstein as a boy. You are required to solve a simplified version of this puzzle using logic techniques and code studied in this course. The simplified version goes as follows:-
Puzzle: Three different houses each contain a different pet, a different drink, and an inhabitant of a different nationality. The following six facts are true about these houses:
- The man in the third (middle) house drinks milk.
- The Spaniard owns the dog.
- The Ukranian drinks the tea.
- The Norwegian lives in the first house.
- The Norwegian lives next to the tea-drinker.
- The juice drinker owns the fox. Questions. Who owns the zebra? Who drinks juice?
Using FIRST-ORDER LOGIC