Question

Artificial Intelligence

1. Facts are given in each of the sub-questions. Translate the following sentences (bold italic) into a Prolog program (rules are required):

a. Every mother likes her child if her child is good.

mother(ann, lina).

mother(annie, sophie).

mother(ann, john).

mother(annie, jack).

mother(maria, anne).

mother(maria, harith).

good(john).

good(anne).

good(harith).

good(sophie).


b. Every woman loves her husband if her husband is helpful.

married(ann, king).

married(annie, chong).

married(maria, kumar).

helpful(chong).


c. Uncles are brothers of our parents.

sibling(ahmad, ali).

sibling(annie, chong).

sibling(devi, kumar).

sibling(sheda, salina).

sex(ahmad, male).

sex(annie, female).

sex(sheda, female).

sex(salina, female).

sex(devi, male).

sex(ali, male).

sex(chong, male).

sex(kumar, male).


d. Aunties are sisters of our parents.

sibling(ahmad, ali).

sibling(annie, chong).

sibling(devi, kumar).

sibling(sheda, salina).

sex(ahmad, male).

sex(annie, female).

sex(sheda, female).

sex(salina, female).

sex(devi, male).

sex(ali, male).

sex(chong, male).

sex(kumar, male).


2. How would you write a Prolog goal that lists all the blue objects on the table? [Hint: use compound queries]

color(ball, blue).

color(box, brown).

color(chair, blue).

color(table, purple).

color(sky, blue).

on(ball, table).

on(box, table).

on(chair, table).

on(table, floor).


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Artificial Intelligence
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Experiment 5A. 238: Simpson's Pedigree Assignment, Blood Typing. Loo we were de Figure 2. Example of...

    Experiment 5A. 238: Simpson's Pedigree Assignment, Blood Typing. Loo we were de Figure 2. Example of a pedigree including symbol key. (Wikipedia 2014). Construct a pedigree of the Simpson family using the information provided below. I. Family lineage Information a. Homer Simpson married Marge Bouvier i. They have three children, Bart Simpson, Lisa Simpson, and Maggie Simpson, listed in order of birth b. Marge has twin monozygotic sisters: Patty and Selma Bouvier c. Selma is married to Sideshow Bob; Patty...

  • The Emergency Department Chair has asked for an audit of ED records in preparation for an...

    The Emergency Department Chair has asked for an audit of ED records in preparation for an upcoming Joint Commission survey. Your staff conducted the audit against the Joint Commission standard that addresses ED documentation. The results were very poor, with no consistency in documenting the required components. You check the medical staff by-laws and realize that there are no specifics related to ED documentation. Determine the Joint Commission documentation requirements for Emergency Department reports. List them here. Audit the five...

  • C++ Create an application that searches a file of male and female first names. A link...

    C++ Create an application that searches a file of male and female first names. A link to the file is provided on the class webpage. "FirstNames2015.txt" is a list of the most popular baby names in the United States and was provided by the Social Security Administration. Each line in the file contains a boy's name and a girl's name. The file is space-delimited, meaning that the space character is used to separate the boy name from the girl name....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT