Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
From the statement :
- The owner of the yellow house smokes Dunhill.
So :
- The Norwegian smokes Dunhill
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
From the statement :
- The man living in the house right in the centre drinks milk
The Brit lives right int the centre, so :
- The Brit drinks milk
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
From the statements :
- The green house owner drinks coffee.
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
From the statements :
- The Dane drinks tea.
- The Norwegian smokes Dunhill
- The owner who smokes Blue Master drinks beer.
We see that the Norwegian doesn't drink tea, milk & coffee.
And the Norwegian doesn't drink beer, because he smokes Dunhill, not Blue Master
So the possible solution is:
- The Norwegian drinks water
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
From the statements :
- The Dane drinks tea.
- The owner who smokes Blue Master drinks beer.
- The German smokes Prince.
We see that the German doesn't drink water, milk, tea.
And the German doesn't drink beer either because he doesn't smokes Blue Master.
So the possible solution is :
- The German drinks coffee
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
So we add to the facts table :
- The German smokes Prince.
Position | |||||
Nationality | |||||
HouseColor | |||||
Beverage | |||||
Cigar | |||||
Pets |
The available empty slot for the Nationality is Dane & Swede
Since Dane drinks tea, and other kind of drinks is already listed
(water, milk, and coffee), then the only possible solution for
Swede beverage is Beer.
- The Swede drinks Beer
Tidak ada komentar:
Posting Komentar