Family relationships
Use the predicates male/1, female/1, and parent_of/2 to represent
the following family tree as a Prolog knowledge base.
Solution
Now, formulate rules to capture the following relationships:
- father_of(Father,Child) and mother_of(Mother,Child)
- grandfather_of(Grandfather,Child) and grandmother_of(Grandmother,Child)
- sister_of(Sister,Person)
- aunt_of(Aunt,Person) and uncle_of(Uncle,Person)
Hint
Last modified: Wed Dec 1 16:52:44 CET 2004