Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the example of Family Relationships given in module 1 2 , consider the following facts and rules are known: % Facts parent (

Based on the example of "Family Relationships" given in module 12, consider the following facts and rules are known:
% Facts
parent(john, mary).
parent(john, susan).
parent(john, peter).
parent(john, frank).
parent(paula, mary).
parent(paula, susan).
parent(paula, peter).
parent(paula, frank).
male(john).
male(peter).
male(frank).
female(paula).
female(mary).
female(susan)
% Rules
father(X, Y) :- parent(X, Y), male(X).
mother(X, Y) :- parent(X, Y), female(X).
sibling(X, Y) :- parent(Z, X), parent(Z, Y), X \= Y.
Define the following rules only using the information given above:
1. son(X, Y). X is the son of Y.
2. daughter(X, Y). X is the daughter of Y.
3. sisters(X, Y). X and Y are sisters.
4. brothers(X, Y). X and Y are brothers.

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

What is TPS?

Answered: 1 week ago

Question

What is meant by functional currency and how it is determined?

Answered: 1 week ago