Question

Write PROLOG program to solve this problem Give a binary resolution proof that is found by...

Write PROLOG program to solve this problem

Give a binary resolution proof that is found by PROLOG interpreter

I married a widow (lets call her W) who has a grown-up daughter (call her D). My father (F), who visited us quite often, fell in love with my step daughter and married her. Hence, my father became my son-in-law and my step-daughter became my mother. Some months later, my wife gave birth to a son (S1), who became the brother-in-law of my father, as well as my uncle. The wife of my father, that is, my step daughter, also had a son (S2)

Homework Answers

Answer #1

PROLOG program:

male(i).
male(f).
male(s1).
male(s2).
married(i,w).
parent(w,d).
parent(f,i).
married(f,d).
parent(w,s1).
parent(i,s1).
parent(f,s2).
parent(d,s2).

married(X,Y) :- tmarried(X,Y).
tmarried(X, Y) :- married(Y,X).

female(X) :- not(male(X))


father(Parent, Child) :-
    parent(Parent, Child),
    male(Parent).

mother(Parent, Child) :-
    parent(Parent, Child),
    female(Parent).

sibling(X,Y) :-
    parent(F, X),
    parent(F, Y), X = Y.

sibling_in_law(X,Y) :-
    parent(P,X),
    parent_in_law(P,Y),
    X = Y.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT