Question: Consider the following Prolog program using the predicates hasPet ( a , b ) to represent that person a owns a pet b and doesNotEat
Consider the following Prolog program using the predicates hasPeta b to represent that person a owns a pet b and doesNotEata b to represent that animal a does not eat animal b
hasPetjoe fish
hasPetpierre pig
hasPetjoe chameleon
hasPetselvi cat
hasPetrich dog
hasPetkumar turkey
hasPetrich turkey
doesNotEatX Y : hasPetZ X hasPetZ Y
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
