YAPP
- From: "Advait" <advait_raut@xxxxxxxxxxxxxx>
- Date: 26 Jun 2006 03:45:57 -0700
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
.
- Follow-Ups:
- Re: YAPP
- From: A . L .
- Re: YAPP
- Prev by Date: Using C to create a graphical interface for a prolog program
- Next by Date: Prolog authentication???
- Previous by thread: Using C to create a graphical interface for a prolog program
- Next by thread: Re: YAPP
- Index(es):
Relevant Pages
|
|