Question
Create a prolog database capturing the information about your family. The information must be created in terms of a procedure named individual which should have
Create a prolog database capturing the information about your family. The information must be created in terms of a procedure named individual which should have the below mentioned syntax. individual(tom, male, adam, eve). individual(sandra, female, john, jenny). The facts comprise of individuals name, sex, and parents names. Create a minimum of 15 facts to make the database large enough. Create the below mentioned rules to query useful information from the database.
1. offspring(X, Y) /* Hint: X is an offspring of Y which means Y is one of Xs parents*/
2. niblings(X, Y) /* Hint: X is nibling of Y which means X is Ys siblings offspring */
3. puncle(X, Y) /* Hint: X is Ys paternal uncle which means X is Ys fathers brother*/
4. modrige(X, Y) /* Hint: X is Ys modrige which means X is Ys mothers sister */ 5. avuncle(X, Y) /* Hint: X is Ys avuncle which means X is Ys mothers brother*/
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