Question: Dubai, led by a monarch, has what connection to Tripoli, the twinned administrative body of Madrid?
Choices:
film distribute region
voice actor
publisher
twinned administrative body
illustrator
characters
had as last meal
operating system
chief executive officer
academic degree
Answer: twinned administrative body
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Dubai" . ?e_1 <office_held_by_head_of_government> ?e_3 . ?e_3 <pred:name> "monarch" . ?e_2 <pred:name> "Tripoli" . ?e_4 <twinned_administrative_body> ?e_2 . ?e_4 <pred:name> "Madrid" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: monarch
function: Relate
dependencies: 0
inputs: office held by head of government
backward
function: Find
inputs: Dubai
function: And
dependencies: 1
2
function: Find
inputs: Madrid
function: Relate
dependencies: 4
inputs: twinned administrative body
forward
function: Find
inputs: Tripoli
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7