Unformatted text preview: What are the heads of the rules, and what are the goals they contain?.[3 marks] woman(vincent). woman(mia). man(jules). person(X) :- man(X); woman(X). loves(X,Y) :- knows(Y,X). father(Y,Z) :- man(Y), son(Z,Y). father(Y,Z) :- man(Y), daughter(Z,Y). Q4. Translate the following statements in to prolog rules: [1 mark] Everybody who has a child is happy (introduce a one-argument relation ishappy . Q5. Define the relation grandchild using the parent relation.[1 mark] Hint: It wilt be Similar to the grandparent relation Q6. Define the relation aunt( X, Y) in terms of the relations parent and sister.[3 marks] Q7.For all X, if X has a child who has a sister, then X has Two Children .[2 marks] (introduce a new relation hasTwoCHildren)...
View Full Document
- Spring '11
- King Abdulaziz University, following sequences, I. Aasma Memon, new relation hasTwoCHildren