×

The tree inclusion problem: In optimal space and faster. (English) Zbl 1085.68566

Caires, Luís (ed.) et al., Automata, languages and programming. 32nd international colloquium, ICALP 2005, Lisbon, Portugal, July 11–15, 2005. Proceedings. Berlin: Springer (ISBN 3-540-27580-0/pbk). Lecture Notes in Computer Science 3580, 66-77 (2005).
Summary: Given two rooted, ordered, and labeled trees \(P\) and \(T\) the tree inclusion problem is to determine if \(P\) can be obtained from \(T\) by deleting nodes in \(T\). This problem has recently been recognized as an important query primitive in XML databases. P. Kilpeläinen and H. Mannila [SIAM J. Comput. 24, 340–356 (1995; Zbl 0827.68050)] presented the first polynomial time algorithm using quadratic time and space. Since then several improved results have been obtained for special cases when \(P\) and \(T\) have a small number of leaves or small depth. However, in the worst case these algorithms still use quadratic time and space. In this paper we present a new approach to the problem which leads to a new algorithm which uses optimal linear space and has subquadratic running time. Our algorithm improves all previous time and space bounds. Most importantly, the space is improved by a linear factor. This will make it possible to query larger XML databases and speed up the query time since more of the computation can be kept in main memory.
For the entire collection see [Zbl 1078.68001].

MSC:

68P05 Data structures
68P15 Database theory
68Q25 Analysis of algorithms and problem complexity

Citations:

Zbl 0827.68050
Full Text: DOI