Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started