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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!