Question
Problem 1 (Family tree): Create a Prolog database of your family tree ( based only onparent, male,female facts) back to your maternal and paternal grandparents
Problem 1 (Family tree):
Create a Prolog database of your family tree ( based only onparent, male,female facts) back to your maternal and paternal grandparents . Draw a picture of the family tree.
Add relationship rules for
mother(X,Y ) - X is the mother of Y
father(X,Y) - X is the father of Y
grandparent(X,Y) - X is the grandparent of Y
ancestor(X,Y) - X is an ancestor of Y
descendant(X,Y) -- X is a descendant of y
grandfather( X,Y) -- X is the grandfather of Y
grandmother(X,Y) -- X is the grandmother of Y
child( X,Y) -- X is the child of Y.
siblings(X,Y) -- X and Y share a parent
brother(X,Y) -- X is a male sibling of Y
sister(X,Y) -- X is a female sibling of Y
aunt(X,Y) -- X is a female sibling of Ys parent
uncle(X,Y) -- X is the male sibling of Ys parent
firstcousins(X,Y) -- X is a child a sibling of one of Ys parents.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started