Program(Queen Victoria's family):
male(albert).
male(edward).
female(alice).
female(victoria).
parents(edward,victoria,albert).
parents(alice,victoria,albert).
sister_of(X,Y):-
female(X),
parents(X,M,F),
parents(Y,M,F).
On the query sister_of(X,Y) more one answer can be
returned. Explain how all the answers are obtained,
and what they are.
Comments
Leave a comment