Question: How many conversation medium that applies to jurisdiction over New Brunswick (the one that stocks border with Prince Edward Island) or that derives The Count of Monte Cristo (the one that has Guy Pearce as a solid member).
Choices: 1
2
3
4
5
6
7
8
9
10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "communication medium" .  { ?e <applies_to_jurisdiction> ?e_1 . ?e_1 <pred:name> "New Brunswick" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Prince Edward Island" .  } UNION { ?e <derivative_work> ?e_1 . ?e_1 <pred:name> "The Count of Monte Cristo" . ?e_1 <cast_member> ?e_2 . ?e_2 <pred:name> "Guy Pearce" .  } }
Program:
function: Find
inputs: Prince Edward Island
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: New Brunswick
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: applies to jurisdiction
backward
function: FilterConcept
dependencies: 4
inputs: communication medium
function: Find
inputs: Guy Pearce
function: Relate
dependencies: 6
inputs: cast member
backward
function: Find
inputs: The Count of Monte Cristo
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: derivative work
backward
function: FilterConcept
dependencies: 10
inputs: communication medium
function: Or
dependencies: 5
11
function: Count
dependencies: 12
Answer: 1