Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a prolog system to represent your family tree. I should be able to query for the following relationships: mother, father, grandmother, grandfather, sister, brother,

image text in transcribed

Develop a prolog system to represent your family tree. I should be able to query for the following relationships: mother, father, grandmother, grandfather, sister, brother, cousin, son, daughter The only atomic facts your program can include are male(), female() and parent) If you do not have all of these relationships in your family, then just make up some to satisfy the conditions. You do not have to use your real family data for this project. Your program should be in a single file named prog2.pl Sample Interaction My queries are shown in blue. Note that your program should work for all of the queries above and in any variation. Such as mother(X, doug), father (X,Y), etc... ?-consult('c:lltemplIprog2.pl). true. ?- mother(mary, X) x-beth xsusan X = doug. ?-findall(X, mother(mary X), Z). Z Ibeth, susan, dougl

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions