Question
Define your answers to Exercises 1 through 6 in terms of the base relations parent (X, Y), female (X), and male (X). To test your
Define your answers to Exercises 1 through 6 in terms of the base relations parent (X, Y), female (X), and male (X). To test your code, define some parent facts like those in this chapter, along with apporpriates female and male facts. But your solutions should be gerneral enough to work with any set of such facts.
Exercise 5.) Define the firstCousin predicate so that firstCousin(X,Y) says that X is a first cousin of Y. Be careful, a person cannot be his or her own cousin, nor can a brother or sister also be a cousin.
Exercise 6.) Define the descendant predicate so that descendant (X,Y) says that X is a descendant of Y.
Your Name Chapter 1 Exercises CSC 3750 Spring 2017 Facts females( brandy, ann mary, Susan jen jane, susie, nda] males (Doseph, brandon, jim, james, tom, john, clark, bob, steven, jason, bill, jude]). males (mark) parent(adam mary) parent(mary Susan) parent parent parent(steven,bill). parent(mary,clark) parent(maryim) parent clark Steven) Predicates male(X) males (L) member (X,L) female(X) females(L), member (X,L) "Exercise 19.1 mother (X,Y) female(X) parent sibling(X,Y) parent(P,X), parent(PY), not (X Y) "Exercise 19.4 grandson(X,Y) male (X) parent(P,X), parent(YP) ancestor (X,Y) parent(X,Y) parent(P,Y), ancestor (X,Y) ancestor (X,P) Exercise 19.12 Your Name Chapter 1 Exercises CSC 3750 Spring 2017 Facts females( brandy, ann mary, Susan jen jane, susie, nda] males (Doseph, brandon, jim, james, tom, john, clark, bob, steven, jason, bill, jude]). males (mark) parent(adam mary) parent(mary Susan) parent parent parent(steven,bill). parent(mary,clark) parent(maryim) parent clark Steven) Predicates male(X) males (L) member (X,L) female(X) females(L), member (X,L) "Exercise 19.1 mother (X,Y) female(X) parent sibling(X,Y) parent(P,X), parent(PY), not (X Y) "Exercise 19.4 grandson(X,Y) male (X) parent(P,X), parent(YP) ancestor (X,Y) parent(X,Y) parent(P,Y), ancestor (X,Y) ancestor (X,P) Exercise 19.12
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started