8. cousin. x is a cousin of y if some parent of x and some parent of
Question:
8. cousin.
x is a cousin of y if some parent of x and some parent of y are either siblings or (recursively) cousins. (The x and y will always end up being nth cousins for some n. For example, fourth cousins will have parents who are third cousins.) These exercises will give you practice writing and running Prolog programs that reason in a simple way about family relationships, mostly exotic flavors of cousins. Begin your Prolog program by writing a collection of clauses for the child, male, and female predicates for some real or imaginary family. To make things interesting, make sure that more than four generations of people are represented. Note that nobody should have more than two parents (one male and one female), but some individuals will have fewer than two parents recorded. As you work on the following predicates, you should augment your family as necessary so that each of the predicates you define has at least one example in your family.
Figure 3.1 showed clauses for the predicates parent, father, and grand_father.
Now write clauses for each of the following predicates (and for any other auxiliary predicates you find useful)
Step by Step Answer: