The complexity of XPath query evaluation

In this paper, we study the precise complexity of XPath 1.0 query processing. Even though heavily used by its incorporation into a variety of XML-related standards, the precise cost of evaluating an XPath query is not yet wellunderstood. The first polynomial-time algorithm for XPath processing (with respect to combined complexity) was proposed only recently, and even to this day all major XPath engines take time exponential in the size of the input queries. From the standpoint of theory, the precise complexity of XPath query evaluation is open, and it is thus unknown whether the query evaluation problem can be parallelized.In this work, we show that both the data complexity and the query complexity of XPath 1.0 fall into lower (highly parallelizable) complexity classes, but that the combined complexity is PTIME-hard. Subsequently, we study the sources of this hardness and identify a large and practically important fragment of XPath 1.0 for which the combined complexity is LOGCFL-complete and, therefore, in the highly parallelizable complexity class NC2.

[1]  Luc Segoufin,et al.  Typing and querying XML documents: some complexity bounds , 2003, PODS.

[2]  Georg Gottlob,et al.  XPath query evaluation: improving time and space efficiency , 2003, Proceedings 19th International Conference on Data Engineering (Cat. No.03CH37405).

[3]  P. Wadler Two semantics for XPath , 2000 .

[4]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[5]  Ivan Hal Sudborough Time and Tape Bounded Auxiliary Pushdown Automata , 1977, MFCS.

[6]  H. James Hoover,et al.  Limits to Parallel Computation: P-Completeness Theory , 1995 .

[7]  David S. Johnson,et al.  A Catalog of Complexity Classes , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[8]  H. Venkateswaran,et al.  Properties that characterize LOGCFL , 1987, J. Comput. Syst. Sci..

[9]  Allan Borodin,et al.  Two Applications of Inductive Counting for Complementation Problems , 1989, SIAM J. Comput..

[10]  Stephen A. Cook,et al.  Problems Complete for Deterministic Logarithmic Space , 1987, J. Algorithms.