Question: How is Titanic starring Catherine Zeta-Jones related to Peter Gallagher?
Choices: start point
update method
penalty
family name
head of state
film distribute region
domain of saint or deity
candidate
cast member
founded by
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Titanic" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Catherine Zeta-Jones" . ?e_2 <pred:name> "Peter Gallagher" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Catherine Zeta-Jones
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Titanic
function: And
dependencies: 1
2
function: Find
inputs: Peter Gallagher
function: QueryRelation
dependencies: 3
4
Answer: cast member