Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a database of facts that describe parent relationships as well as gender relationships. The predicate parent ( john , ann ) is interpreted as:

Consider a database of facts that describe parent relationships as well as gender relationships. The predicate parent(john,ann) is interpreted as: "John is a parent of Ann". The predicate male(john) is interpreted as: "John is a man". The predicate female(ann) is interpreted as: "Ann is a woman".Create a prolog program (relationship.pl) and include the following rules. parent(john,ann). parentjim,john). parentfim,keith).parent(im,nora).parent(mary, ann). parent(mary,sylvia). parent(brian,sylvia). parent(brian,betty). male (keith). male (jim). male (brian). female(sylvia). female(betty). female(ann). female(mary).Note that some things are not specified in the database above (e.g., male (john)).Note that a true may be left blank if running on the gl server. Trailing false's after queries with two variables are ok.A.(10 points) Add a Prolog predicate sibling(X, Y) that is true if X and Y have the same mother or the same father. For instance (user input is in
image text in transcribed

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

Real Time Database And Information Systems Research Advances

Authors: Azer Bestavros ,Victor Fay-Wolfe

1st Edition

1461377803, 978-1461377801

More Books

Students also viewed these Databases questions