0

SO it says given the follwing relations

father (X,Y) says that X is the father of Y
mother (X,Y) says that X is the mother of Y
female(X) says that X is female
male(X) says that X is male

Define a sister relation so that sister(X,Y) says that X is a sister of Y

Here's what I have:

father(X,Y).
mother(X,Y).
female(X).
male(X).

sister(X,Y):-female(X),mother(M,Y), mother(M,X), father(F,X), father(F,Y).

So basically to be a sister, X must be a female, and both X and Y must have same mother and father.

Is this the correct approach?

Thanks.

Edited by lotrsimp12345: n/a

1
Contributor
1
Reply
4
Views
7 Years
Discussion Span
Last Post by lotrsimp12345
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.