Question: For the given facts: a . Father b . Mother c . Brother d . Sister e . Grandfather Define Prolog rules for these facts
For the given facts:
a Father
b Mother
c Brother
d Sister
e Grandfather
Define Prolog rules for these facts and test the defined rules with queries. Add screenshots of the
screen showing the defined rules and queries for verification.
maleaaa
malebbb
maleccc
maleddd
maleeee
malefff
malehhh
femaleiii
femalejjj
femalekkk
femalelll
femalemmm
parent child parent
parentbbb aaa
parentjjj aaa
parentccc bbb
parentiii bbb
parentddd bbb
parentkkk jjj
parenteee kkk
parenteee hhh
parentiii mmm
parentccc mmm
parentddd mmm
parentkkk fff
parentjjj lll
parentbbb lll
married AB A is married to B
marriedaaa lll
marriedlll aaa
marriedbbb mmm
marriedmmm bbb
marriedjjj fff
marriedfff jjj
marriedkkk hhh
marriedhhh kkk
Note: Run your function in Replit and SwiProlog.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
