[Paper Review] Heaviest Induced Ancestors and Longest Common Substrings
This paper introduces data structures for efficiently solving heaviest induced ancestor (HIA) queries on two weighted trees with the same leaf set, using a geometric range-query interpretation. It applies this to build an LZ-compressed index that finds the longest common substring between a pattern and a string in O(m log²n) time with O(n log N) space, significantly improving upon previous quadratic-time approaches for large patterns.
Suppose we have two trees on the same set of leaves, in which nodes are weighted such that children are heavier than their parents. We say a node from the first tree and a node from the second tree are induced together if they have a common leaf descendant. In this paper we describe data structures that efficiently support the following heaviest-induced-ancestor query: given a node from the first tree and a node from the second tree, find an induced pair of their ancestors with maximum combined weight. Our solutions are based on a geometric interpretation that enables us to find heaviest induced ancestors using range queries. We then show how to use these results to build an LZ-compressed index with which we can quickly find with high probability a longest substring common to the indexed string and a given pattern.
Motivation & Objective
- To design efficient data structures for heaviest induced ancestor (HIA) queries on two weighted trees sharing the same leaf set.
- To exploit the geometric interpretation of induced ancestors to support range queries over leaf position mappings.
- To apply HIA data structures to build a compressed index for fast longest common substring (LCS) queries in LZ77-compressed strings.
- To reduce the time complexity of LCS queries from O(m² log log n) to O(m log²n) for patterns of length m.
- To achieve subquadratic query time while maintaining compressed space usage proportional to n log N, where n is the number of LZ77 phrases.
Proposed method
- Model the problem as a range emptiness query on an n×n grid, where each cell (x,y) marks a leaf that is the x-th in T₁ and y-th in T₂.
- Use heavy-path decomposition of both trees to reduce the number of ancestor pairs to consider, limiting to O(log²n) pairs per leaf.
- Construct skyline lists for each pair of heavy paths, storing only non-dominated ancestor pairs (u₁,u₂) that are induced and maximal in depth or weight.
- Employ perfect hash tables to store only non-empty skyline lists, enabling efficient lookup during HIA queries.
- Use range-emptiness data structures with O(log log n) query time and O(n log log n) space, or O(log³n (log log n)²) time with O(n) space.
- Apply the HIA data structure to LCS queries by building two Patricia tries: one for reversed prefixes and one for suffixes, using Karp-Rabin hashing and centroid decomposition for efficient LCP computation.
Experimental results
Research questions
- RQ1Can heaviest induced ancestor queries between two weighted trees be supported efficiently using geometric range queries?
- RQ2What is the trade-off between space and query time for HIA data structures in the context of tree cross products?
- RQ3Can HIA data structures be leveraged to accelerate longest common substring (LCS) queries in LZ-compressed strings?
- RQ4Is it possible to reduce the query time for LCS from quadratic to linear dependence on pattern length m?
- RQ5Can the space usage of the resulting compressed index be kept within O(n log N) while achieving subquadratic query time?
Key findings
- An O(n log²n)-space data structure supports HIA queries in O(log n log log n) time, enabling efficient LCS computation in compressed strings.
- The paper achieves an O(m log²n)-time algorithm for finding the longest common substring between a pattern P and an LZ77-compressed string S, with O(n log N) space.
- By using a more space-efficient HIA structure, the query time can be reduced to O(m log n log log n) at the cost of increasing space to O(n(log N + log²n)).
- The approach uses Karp-Rabin hashing and centroid-decomposed Patricia tries to compute LCPs for all pattern splits in O(m log n) time, enabling linear dependence on m.
- The method achieves high-probability correctness for LCS queries, relying on randomized techniques to ensure accurate LCP estimation.
- The full version of the paper further eliminates the log log n factor in query time, suggesting potential for even tighter bounds.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.