Complexity of SPARQL: PSpace-hardness
Channel: Knowledge-Based Systems, TU Dresden
Date: 2020-12-08

We find that checking if a SPARQL query has any results is a PSpace-hard problem, i.e., harder than NP and therefore not tractable (presumably). Once the basic concepts of complexity are understood, it is not hard to show this. An interesting side effect is that we learn how to express universal quantifiers in SPARQL, e.g. to find bands in Wikidata where all band members are female.


► Lecture slides for download: https://iccl.inf.tu-dresden.de/web/KG2020/en (Lecture 7)
► Related problem sheet to test your knowledge: Exercise 6
► Current and previous versions of the lecture:  https://iccl.inf.tu-dresden.de/web/Knowledge_Graphs
► Lecture notes on complexity theory for background reading: https://iccl.inf.tu-dresden.de/web/Complexity_Theory_(WS2019/20)