Question: write the answers in PROLOG language !!! 1. Describe the following rules (0.25 marks) - is_mother(Mum):-mother(Mum,Child). - granpa_of(Gpa,X):-parent(Par,X),father(Gpa,Par). ANSWER: - sibling(S1,S2):- parent(Par,S1),parent(Par,S2),not(S1,S2). ANSWER: 2. Represent
write the answers in PROLOG language !!!



1. Describe the following rules (0.25 marks) - is_mother(Mum):-mother(Mum,Child). - granpa_of(Gpa,X):-parent(Par,X),father(Gpa,Par). ANSWER: - sibling(S1,S2):- parent(Par,S1),parent(Par,S2),not(S1,S2). 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. ANSWER: - 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)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
