Question: Question 1 [12] (a) Convert the following information into a Prolog program (6) Everyone that is either a mother or a father of someone is

 Question 1 [12] (a) Convert the following information into a Prolog

Question 1 [12] (a) Convert the following information into a Prolog program (6) Everyone that is either a mother or a father of someone is a parent. X is a sister of Y if X is female and X and Y have the same mother or father Joan is Mary's mother and Peter is Mary's father. Jenny's parents are John and Patty. Peter is Tom's father. Joan is Tom's mother. (b) Write Prolog queries to ask the following questions (2) Does Tom have a sister? Is there anyone who has a sister? (C) What are the effects of the following queries? When a match is possible, give the resulting bindings for the variables. (4) . f(g(x,a),Y) = f(Y,g(6,2)). . [X, a R] [3,Y, 1]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!