Question: Which has less Erdős number, Richard Taylor of the Royal Society or Stephen Hawking?
Choices:
Paul Simon
Richard Taylor
Rahul Dev Burman
Richard Gere
Simon Cowell
Sylvester Stallone
Max Fleischer
William Henry Harrison
Stephen Hawking
James E. Reilly
Program:
function: Find
inputs: Royal Society
function: Relate
dependencies: 0
inputs: member of
backward
function: Find
inputs: Richard Taylor
function: And
dependencies: 1
2
function: Find
inputs: Stephen Hawking
function: SelectBetween
dependencies: 3
4
inputs: Erdős number
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Richard Taylor" . ?e <member_of> ?e_1 . ?e_1 <pred:name> "Royal Society" .   } UNION { ?e <pred:name> "Stephen Hawking" .  } ?e <Erdős_number> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Richard Taylor