This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 01/02/2012 for the course COMPUTER 101 taught by Professor Dr.kahan during the Spring '11 term at Akademia Ekonomiczna w Krakowie.
- Spring '11