Compute the output of the following program

  

Question:

Prolog is a programming language that belongs to the logic programming paradigm as explained in Section 6.7 of the Brookshear textbook.
 

Compute the output of the following program:
 

Parent(dad_tough_guy, babe_ruth).
Parent(dad_tough guy, little_kid).
Parent(john_oldman, dad_tough_guy).
Parent(mary_oldwoman, dad_tough_guy).
Grandparent(X, Y) :- parent(X, Z), parent(Z, Y).
 

What is the following following Prolog query trying to ask? What are the values of X?
?- Grandparent(X, babe_ruth).

Tags: No tags