Question: 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

Unification and resolutions in Prolog for instance i think i figured out

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!