Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) Create an elementary PROLOG knowledge base, describing following relations: 1. John, Fred and Harry are men, Mary, Julie, Susan and Anne are women. 2.

(a) Create an elementary PROLOG knowledge base, describing following relations: 1. John, Fred and Harry are men, Mary, Julie, Susan and Anne are women. 2. John has blonde hair while Fred and Harry have dark hair. 3. Julie and Susan are blonde, Mary and Anne are brunette. 4. Rich is each person who owns the gold - Fred and Julie in our example. 5. Male like only female and vice versa. Moreover, John and Harry like rich persons, John likes blonde and Fred likes brunette. 6. Both Mary and Julie like dark hair persons, Julie likes rich persons at the same time. 7. Anne owns a house and John owns a car. (b) and define the following queries: Who is male? Who does John like? Who does Mary like? Does Julie like anyone? Is there a couple who like each other?

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions