General
Material
Lecture 1
Lecture 2
Lecture 3
Lecture 4
Lecture 5

Neighbors

There is a street with three neighboring houses that all have a different color. They are red, blue, and green. People of different nationalities live in the different houses and they all have a different pet. Here are some more facts about them:

  • The Englishman lives in the red house.
  • The jaguar is the pet of the Spanish family.
  • The Japanese lives to the right of the snail keeper.
  • The snail keeper lives to the left of the blue house.
Define a predicate zebra(?N) that helps you find out the nationality N of the owner of the zebra.

To solve this task you first have to come up with a suitable way of representing streets and houses.

Hint

Back to the practical session of day 3.