Answering Conjunctive Queries with Safe Negation and Inequalities over RDFS Knowledge Bases
Gianluca Cima, Marco Console, Roberto Maria Delfino, Maurizio Lenzerini, Antonella Poggi
Abstract
Expressing negative conditions is a crucial feature of query languages for knowledge bases (KBs). Answering such queries over ontological KBs, however, is a very challenging task that becomes undecidable even for lightweight Description Logic (DL) ontologies. Such negative results hold even for Conjunctive Queries (CQs) equipped with basic forms of negative conditions such as the so-called safe negation or inequality atoms. One ontology language that is seemingly unaffected by these results is (the DL counterpart of) RDFS even if equipped with disjointness axioms. Answering CQs with inequalities over such ontologies is known to be Pi^p_2-complete, if the number of inequality atoms is unbounded, and NP-complete if we limit this number to one. Notably, these results leave open the cases of CQs with a fixed number greater than two of inequality atoms. Additionally, such a thorough analysis is missing for CQs with safe negation.
In this paper, we embark in a refined analysis of the combined complexity of answering CQs with inequality atoms and safe negation over RDFS ontologies augmented with disjointness axioms. Firstly, we provide a unified Pi^p_2 query answering algorithm for the general problem. Secondly, we confirm the generally held conjecture according to which answering CQs with two inequality atoms over such ontologies is already Pi^p_2-hard. This result closes an important gap in the current literature and has an impact on the widely influential problem of query containment. Lastly, for CQs with safe negation, we prove a behavior similar to that of CQs with inequality atoms. Specifically, we show that answering CQs with at most one negated atom can be done in NP, while allowing at most two negated atoms is sufficient to obtain Pi^p_2-hardness.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 262a4bb1-9384-4fe3-a62d-3c464ab7028fCited by top-tier papers1
Ask how each one uses itBuilds on1
Related papers
- Answering Queries with Negation over Existential RulesStefan Ellmauthaler, Markus Krötzsch, Stephan MennickeAAAI 2022 · 6 citations
- Resilient Logic Programs: Answer Set Programs Challenged by OntologiesSanja Lukumbuzya, Magdalena Ortiz, Mantas SimkusAAAI 2020 · 8 citations
- Ontology-Mediated Query Answering Using Graph Patterns with ConditionsPing Lu, Ting Deng, Haoyuan Zhang, Yufeng Jin et al.ICDE 2024
- The Price of Selfishness: Conjunctive Query Entailment for ALCSelf Is 2EXPTIME-HardBartosz Bednarczyk, Sebastian RudolphAAAI 2022 · 1 citation
- Revisiting Conjunctive Query Entailment for SYazmín Ibáñez-García, Jean Christoph Jung, Vincent Michielini, Filip MurlakAAAI 2026 · 1 citation
