Question: Section - 1 : Prolog 1 . The family tree below shows a part of the family tree in the Mahabharat. Model the family tree

Section-1: Prolog
1. The family tree below shows a part of the family tree in the Mahabharat. Model the family tree similar to the example discussed in class. In particular, define the following predicates:
parent \((X, Y)-X \) is the parent of \( Y \).
Similarly, ancestor(\(\mathrm{X},\mathrm{Y})\), brother \((\mathrm{X},\mathrm{Y})\), stepBrother \((\mathrm{X},\mathrm{Y})\), sister \((\mathrm{X},\mathrm{Y})\), stepSister \((\mathrm{X},\mathrm{Y})\), mother \((\mathrm{X},\mathrm{Y})\), stepMother \((\mathrm{X},\mathrm{Y})\) father \((\mathrm{X},\mathrm{Y})\), stepFather(\(\mathrm{X},\mathrm{Y}\)), grandFather \((X, Y)\), grandMother(\(\mathrm{X},\mathrm{Y})\), maternalUncle \((\mathrm{X},\mathrm{Y})\)- mother's brother, maternalAunt \((\mathrm{X},\mathrm{Y})\)- mother's sister, maternalUncleWife(X, Y ) mother's brother's wife, maternalAuntHusband(X,Y )- mother's sister's husband, paternalUncle(X,Y )- father's brother, paternalAunt(X,Y )- father's sister, paternalUncleWife(X,Y )- father's brother's wife, paternalAuntHusband(X,Y )- father's sister's husband.
In addition define any extra predicates that you require to express the relations correctly.
Key to the Symbols
Blue
Male - Pandavas Note: In each case write Prolog programs for the predicates given in the problem. Clearly specify the meaning of any supplementary or helping predicates you need.
Section - 1 : Prolog 1 . The family tree below

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 Programming Questions!