Prolog Problem #1

Given the following facts:

father(bill,jake).
father(bill,shelley).
father(james,peter).
father(james,john).
mother(mary,jake).
mother(mary,shelley).
mother(muriel,peter).
mother(muriel,john).

Add a rule that will describe the sibling relationship, that is "has the same mother and father". Use the following left-hand-side of the rule:

sibling(X,Y) <= 
where X and Y are the names of potential siblings.

For the purposes of this problem we will permit sibling relationships to include a person being their own sibling!


Last updated 2002/03/13
© J.A.N. Lee, 2002.