Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Prolog the following definitions are given : child(john,sue). child(john,sam). child(jane,sue). child(jane,sam). child(sue,george). child(sue,gina). child(bob,jane). child(bob,bill). child(june,jane). child(june,bill). child(jacob,lily). child(jacob,sam). child(louise,john). child(louise,marsha). child(anna, mark). child(anna,gina).

In Prolog the following definitions are given :

child(john,sue). child(john,sam). child(jane,sue). child(jane,sam). child(sue,george). child(sue,gina). child(bob,jane). child(bob,bill). child(june,jane). child(june,bill). child(jacob,lily). child(jacob,sam). child(louise,john). child(louise,marsha). child(anna, mark). child(anna,gina). child(chet,fred). child(chet,anna). child(jim,chet). child(jim, emma). child(marsha,marx). child(bill,marx). child(lisa,jim). child(lisa,barb).

male(john). male(sam). male(george). male(bob). male(jacob). male(bill). male(chet). male(fred). male(mark). male(jim). male(marx).

female(sue). female(jane). female(june). female(gina). female(lily). female(louise). female(marsha). female(anna). female(emma). female(lisa). female(barb).

parent(Y,X) :- child(X,Y).

father(Y,X) :- child(X,Y), male(Y).

opp_sex(X,Y) :- male(X), female(Y). opp_sex(Y,X) :- male(X), female(Y).

grand_father(X,Z) :- father(X,Y), parent(Y,Z).

What I need to fill out is :

Question 5

first_cousin(C1,C2) :- "answer here"

and

second_cousin(C1,C2) :- "answer here"

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 Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

Which industry did you analyze?

Answered: 1 week ago