On the complexity of tree pattern containment with arithmetic comparisons

Foto N. Afrati, Sara Cohen*, Gabriel Kuper

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


In this paper we investigate the complexity of query containment problem for tree patterns (which express a fragment of XPath) with arbitrary arithmetic comparisons. We assume that attributes take values from a totally ordered domain and allow constraints that involve arithmetic comparisons. We show that the containment problem is Π2P-complete in the general case, but remains co-NP complete for tree patterns with left semi-interval (<, ≤, =) or right semi-interval (>, ≥, =) attribute constraints.

Original languageAmerican English
Pages (from-to)754-760
Number of pages7
JournalInformation Processing Letters
Issue number15
StatePublished - 15 Aug 2011

Bibliographical note

Funding Information:
E-mail addresses: afrati@softlab.ntua.gr (F.N. Afrati), sara@cs.huji.ac.il (S. Cohen), kuper@acm.org (G. Kuper). 1 Sara Cohen was partially supported by the Israel Science Foundation (Grant 143/09).


  • Arithmetic comparisons
  • Databases
  • Query containment
  • Tree patterns
  • XPath queries


Dive into the research topics of 'On the complexity of tree pattern containment with arithmetic comparisons'. Together they form a unique fingerprint.

Cite this