Question: Artificial intelligence - PROLOG Suppose you are given the following facts. Consult using Prolog Listener Family tree example parent (pam, bob). parent (tom, bob parent

 Artificial intelligence - PROLOG Suppose you are given the following facts.

Consult using Prolog Listener Family tree example parent (pam, bob). parent (tom,

Artificial intelligence - PROLOG

Suppose you are given the following facts. Consult using Prolog Listener Family tree example parent (pam, bob). parent (tom, bob parent (tom, liz) parent (bob, ann) parent (bob, pat) parent (tina, ann) parent (tina, pat). parent (pad, im) parent (mary, jim). parent (ann, george). parent (michael, george). parent ann, Sophie). parent (ian, Sophie). sex (pam, female). sex (tom, male). sex (bob, male). sex (tina, female). sex (liz, female). sex (ann, Eemale). sex (pat, male). sex (mary Female) sex (michael, male). sex (george, male). sex (ian, male). sex (mmale). sex (sophie, Eemale). sex (lou, Eemale). sex (pat, Eemale). sex (elizabeth, Female). sex (cathy, female). sex (donna, Eemale). sex (pauline, female). sex (michelle, female). sex (vicky, Eemale). sex (angie, Eemale). sex (sharon, female). sex (kenny, male). sex (simon, male). sex (pete, male). sex (san, male). sex (arthur, male). sex (den, male). sex (lofty, male). sex (albert, male). parent (lou, kenny). parent (albert, tenny). parent (lou, pete). parent (lou, pauline) parent (albert, pauline). parent pat, Simon). parent (pete, Simon). parent (kenny, simon). parent kenny, elizabeth). parent cathy, ian). parent (pete, ian). parent (pauline, michelle). parent arthur, michelle). parent (michelle, vicky). parent (den, vicky). parent cathy, donna). parent (kenny, elizabeth). / - ------ */ married (cathy, pete). married (pauline, arthur). married (michelle, lofty). married (lou, albert). Question Instruction. 1. Since the program contains no rules (at all), you are required to define two (2) rules that make use of the existing facts parent(Parent, Child). sex(Person, Sex). % where Sex is one of "male" or "female" married Wife, Husband). Examples of rules needed may be: mother(), father(), etc. [Think of it!] You may need to use compound predicates when making queries (if there is no suitable rule to use)

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!