YAPP



YAPP - Yet Another Prolog Puzzle
Hi guys,
Please solve the prolog puzzle

/*********************/
I married a widow (call her W) who has a grown-up daughter (D).
My father (F), who visited us quite often, fell in love with my
step-daughter and married her. Hence my father became my son-in-law
and my step-daughter became my mother. Some months later, my wife
gave birth to a son (S1), who became the brother-in-law of my father,
as
well as my uncle. The wife of my father - that is, my step-daughter
-
also had a son (S2).
/*********************/

Model the above situation into prolog.
Add rules defining the family relationships (such as father-in-law)
described in the story.
Prove in the prolog system "I am my own grandfather".


I tried to solve it, but came across infinite looping.

Yours,
Advait

.



Relevant Pages