SPARQL 1.1 has property paths that include the * operator for "any number."
This does not tell you what the path or the length of the shortest path is - is there only such a path.
PREFIX : <http://graphtheory/node/> PREFIX node: <http://graphtheory/node/> ASK { node:1 :hasNeighbor* node:2 }
(You do not need ?a = and ?d = , you can write values ββto the query.)
Adding the path data type to the language is the place for future work - several experimental systems have addressed the problem.
source share