Question: All must be in prolog - Create a rule grandchild which is true when one person is the grandchild of another. ANSWER: - Create a

All must be in prolog  All must be in prolog - Create a rule "grandchild which
is true when one person is the grandchild of another. ANSWER: -
Create a rule "descendent" which is true when one person is the
descendent of another. ANSWER: 4. Having the previous tree graph, answer the

- Create a rule "grandchild which is true when one person is the grandchild of another. ANSWER: - Create a rule "descendent" which is true when one person is the descendent of another. ANSWER: 4. Having the previous tree graph, answer the provided queries using the constructed knowledge base in questions 2 and 3. ( 0.25 marks) ANSWER: - ?- cousin(A,B). ANSWER: - ?- grandchild(A, B). ANSWER: ?- descendent(A, B). ANSWER: 2. Represent the following tree graph in Prolog using the following facts: parent, male, and female. (0.25) 3. Represent the following in Prolog (0.25 marks) - Create a rule "brother" which is true when two persons are brothers. ANSWER: - Create a rule "cousin" which is true when two persons are cousins. 1. Describe the following rules ( 0.25 marks) - is_mother(Mum):-mother(Mum,Child). ANSWER: - is_father(Dad):-father(Dad,Child). ANSWER: - is_son(Son):-parent(Par,Son),male(Son). ANSWER: - sister_of(Sis,Pers):- parent(Par,Sis),parent(Par,Pers), female(Sis),not(Sis,Pers). ANSWER: 1. Describe the following rules ( 0.25 marks) - is_mother(Mum):-mother(Mum,Child). ANSWER: - is_father(Dad):-father(Dad,Child). ANSWER: - is_son(Son):-parent(Par,Son),male(Son). ANSWER: - sister_of(Sis,Pers):- parent(Par,Sis),parent(Par,Pers), female(Sis),not(Sis,Pers)

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!