From CSULA CS Wiki
< Courses‎ | CS 332L‎ | Spring 2006‎ | Nicholas Mew
Revision as of 15:20, 22 May 2006 by WikiAdmin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


greatAunt(X) :-
 sister_of(X,Y),
 parent(Y,Z),
 parent(Z,_).

greatAunt(X) :-
 wife(X,Y),
 brother_of(Y,Z),
 parent(Z,A),
 parent(A,_).

full_brother(X,Y) :-
 parents(X,M,F),
 parents(Y,M,F),
 dif(X,Y).
 
half_brother(X,Y) :-
 parents(X,M1,F),
 parents(Y,M2,F),
 dif(X,Y).
 dif(M1,M2).
 
half_brother(X,Y) :-
 parents(X,M,F1),
 parents(Y,M,F2),
 dif(X,Y),
 dif(F1,F2).
 
half_brother2(X,Y) :-
 parent(X,Z),
 parent(Y,Z),
 parent(X,P1),
 parent(Y,P2),
 dif(P1,P2),
 dif(X,Y).