Course Solutions Uncategorized (Solved) : Consider Following Prolog Logic Program Mother Mary Sue Father John Sue Mother Mary Bill Q37968997 . . . .

(Solved) : Consider Following Prolog Logic Program Mother Mary Sue Father John Sue Mother Mary Bill Q37968997 . . . .

 

Consider the following prolog logic program:

mother (mary, sue).

father (john, sue).

mother (mary, bill).

father (john, bill).

mother (sue, nancy).

father (bob, nancy).

mother (sue, jeff).

father (bob, jeff).

mother (jane, ron).

Father(bill,ron).

Parent(A,B) :- father(A,B).

Parent (A,B) :- mother(A,B).

Grandparent(C,D) :- parent(C,E), parent(E,D).

Add a sibling relationship to the above program and answer thefollowing question:

?- sibling(sue, X).

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post