Question: You should use SWI Prolog software to write your code. a . For the family tree given above, write all Prolog facts using parent, male,
You should use SWI Prolog software to write your code.
a For the family tree given above, write all Prolog facts using parent, male, and female relationships.
b Define mother, father, grandparent, sibling, cousin, brother, sister, aunt, uncle relationships using parent, male, and female relationships. When you define a new relationship, you can use it to define another relationship eg using sibling to define cousin
c Run the following queries in Prolog. Write your queries and Prolog answers to your Word document.
Find grandparents of Liam.
Find grandchildren of Bob.
Find siblings of Carol.
Find cousins of Hannah.
Are Gracie and Roger cousins?
Find sisters of David.
Find brothers of Melissa.
Are Alice and Pearl sisters?
Find aunts of Melissa.
Find all people who have Oscar as their uncle.
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
