Question: Among the counties of Maine that shares border with Somerset County (the one that shares border with Kennebec County),which one has the smallest area ?
Choices:
York County
Somerset County
Cumberland County
Hancock County
Franklin County
Kennebec County
Washington County
Aroostook County
Penobscot County
Oxford County
Program:
function: Find
inputs: Kennebec County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Somerset County
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: shares border with
backward
function: FilterConcept
dependencies: 4
inputs: county of Maine
function: SelectAmong
dependencies: 5
inputs: area
smallest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Maine" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Somerset County" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Kennebec County" .  ?e <area> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Penobscot County