Two Algorithms for Locating Ancestors of a Large Set of Vertices in a Tree.

A lot of tree-shaped data exists: XML documents, abstract syntax trees, hierarchies, etc. To accelerate query processing on trees stored in a relational database a pre-post-ordering can be used. It works well for locating ancestors of a single or few vertices because pre-post-ordering avoids recursive table access. However, it is slow if it comes to locating ancestors of hundreds or thousands of vertices because ancestors of each of the input vertices are located sequentially. In this paper, two novel algorithms (sort-tilt-scan and single-pass-scan) for solving this problem are proposed and compared with a naïve approach. While the sort-tilt-scan improves the performance by a constant factor, the single-pass-scan achieves a better complexity class. The performance gain is achieved because of a single table scan which can locate all result vertices by a single run. Using generated data, this paper demonstrates that the single-pass-scan is orders of magnitude faster than the naïve approach.

Read the full publication
Two Algorithms for Locating Ancestors of a Large Set of Vertices in a Tree.

Dr. Alexander Zeier

Co-Author