Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Unification and resolutions in Prolog for instance i think i figured out some of them: likes(jane, X) = likes(X, josh). False X cannot be both

Unification and resolutions in Prolog

image text in transcribed

for instance i think i figured out some of them:

likes(jane, X) = likes(X, josh).

False

X cannot be both jane and josh at the same time.

ancestor(french(jean), B) = ancestor(A, irish(joe)).

True

A = french(jean)

B = scottish(joe)

characters(hero(luke), X) = characters(X, villain(vader)).

False

X cannot be both hero(luke) and villain(vader) at the same time.

Which of the following pairs of terms can be unified together? If they can't be unified, please provide the reason for it. If they can be unified successfully, wherever relevant, provide the variable instantiations that lead to successful unification. (Note = shows unification) likes(jane, X) = likes(X, josh). disk(27, queens, sgt_pepper) = diSk(A, B, help). [a,b,c] = [X,Y,ZIT]. ancestor(french(jean), B) = ancestor(A, irish(joe)). characters(hero(luke), X) = characters(X, villain(vader)). f(X, ab,c)) = f(d, a(Z, c)). s(x, f(x), z) = s(g(y), f(g(b)), y). vertical( line(point(X,Y), point(X,Z))) = vertical(line(point(1,1),point(1,3))). g(Z, f(A, 17, B), A+B, 17) = g(C, f(D, D, E), C, E). f(c, a(b,c)) = f(Z, a(Z, c)). Which of the following pairs of terms can be unified together? If they can't be unified, please provide the reason for it. If they can be unified successfully, wherever relevant, provide the variable instantiations that lead to successful unification. (Note = shows unification) likes(jane, X) = likes(X, josh). disk(27, queens, sgt_pepper) = diSk(A, B, help). [a,b,c] = [X,Y,ZIT]. ancestor(french(jean), B) = ancestor(A, irish(joe)). characters(hero(luke), X) = characters(X, villain(vader)). f(X, ab,c)) = f(d, a(Z, c)). s(x, f(x), z) = s(g(y), f(g(b)), y). vertical( line(point(X,Y), point(X,Z))) = vertical(line(point(1,1),point(1,3))). g(Z, f(A, 17, B), A+B, 17) = g(C, f(D, D, E), C, E). f(c, a(b,c)) = f(Z, a(Z, c))

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

1. Identify and control your anxieties

Answered: 1 week ago