Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Artificial Intelligence We are in a marriage bureau with a file of candidates to the marriage containing the following facts: Paul is tall, brown and

Artificial Intelligence

We are in a marriage bureau with a file of candidates to the marriage containing the following facts:

Paul is tall, brown and of age ripe. He likes classical music, the books of adventure and swimming. His future wife must be tall, with red hair and young.

Kevin is not very tall, fair and young. He likes rock'n'roll, the books of science fiction and tennis. His future wife should be fair, young and not very tall.

Doug is small, brown and of age ripe. He likes jazz, the detective novels and tennis. He seeks a small, fair woman of average age.

Alice is not very tall, fair and of average age. She likes any type of music, the books of adventure and swimming. She seeks a tall man, brown and of average age.

Eva is not very tall, fair and young. She likes rock'n'roll, books of science fiction, and all sports. She seeks a young man, fair and not very tall.

Lea is small, brown and of age ripe. She likes classical music, the books of adventure and swimming. She seeks a brown man, not very tall and of age ripe.

1. Using PROLOG, express the facts above in the form of predicates.

2. It is considered that two people X and Y, of different sexes, are matched if : X is appropriate to Y and Y is appropriate to X.

X is appropriate to Y if:

X is appropriate physically to Y (height, color of hair and age of X are those which Y seeks) and,

X and Y have the same tastes regarding music, literature and sport.

Write a PROLOG program determining the matched couples. Example 1 :

| ?- match(X,Y).

X = kevin

Y = eva ? ;

X = eva

Y = kevin ? ;

no

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

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago