an:07286746
Zbl 07286746
Abedin, Paniz; Hooshmand, Sahar; Ganguly, Arnab; Thankachan, Sharma V.
The heaviest induced ancestors problem revisited
EN
Navarro, Gonzalo (ed.) et al., 29th annual symposium on
combinatorial pattern matching, CPM 2018, July 2--4, 2018, Qingdao, China. Wadern: Schloss Dagstuhl -- Leibniz Zentrum f??r Informatik (ISBN 978-3-95977-074-3). LIPIcs -- Leibniz International Proceedings in Informatics 105, Article 20, 13 p. (2018).
2018
a
68W32
data structure; string algorithms; orthogonal range queries
Summary: We revisit the heaviest induced ancestors problem, which has several interesting applications in string matching. Let \(\mathcal{T}_1\) and \(\mathcal{T}_2\) be two weighted trees, where the weight \(\mathsf{W}(u)\) of a node \(u\) in either of the two trees is more than the weight of \(u\)'s parent. Additionally, the leaves in both trees are labeled and the labeling of the leaves in \(\mathcal{T}_2\) is a permutation of those in \(\mathcal{T}_1\). A node \(x\in \mathcal{T}_1\) and a node \(y\in\mathcal{T}_2\) are induced, iff their subtree have at least one common leaf label. A heaviest induced ancestor query \(\mathsf{HIA}(u_1,u_2)\) is: given a node \(u_1\in\mathcal{T}_1\) and a node \(u_2\in \mathcal{T}_2\), output the pair \((u_1^*,u_2^*)\) of induced nodes with the highest combined weight \(\mathsf{W}(u^*_1)+ \mathsf{W}(u^*_2)\), such that \(u_1^*\) is an ancestor of \(u_1\) and \(u^*_2\) is an ancestor of \(u_2\). Let \(n\) be the number of nodes in both trees combined and \(\varepsilon>0\) be an arbitrarily small constant. \textit{T. Gagie} et al. [``Heaviest induced ancestors andlongest common substring'', Preprint, \url{arXiv:1305.3164}] introduced this problem and proposed three solutions with the following space-time trade-offs: \begin{itemize} \item an \(O(n \log^2n)\)-word data structure with \(O(\log n\log\log n)\) query time \item an \(O(n\log n)\)-word data structure with \(O(\log^2 n)\) query time \item an \(O(n)\)-word data structure with \(O(\log^{3+\varepsilon}n)\) query time.\end{itemize} In this paper, we revisit this problem and present new data structures, with improved bounds. Our results are as follows. \begin{itemize} \item an \(O(n\log n)\)-word data structure with \(O(\log n\log\log n)\) query time \item an \(O(n)\)-word data structure with \(O(\frac{\log^2 n}{\log\log n})\) query time.\end{itemize} As a corollary, we also improve the LZ compressed index of Gagie et al. [loc. cit.] for answering longest common substring (LCS) queries. Additionally, we show that the LCS after one edit problem of size \(n\) [\textit{A. Amir} et al., Algorithmica 82, No. 12, 3707--3743 (2020; Zbl 07272778)] can also be reduced to the heaviest induced ancestors problem over two trees of \(n\) nodes in total. This yields a straightforward improvement over its current solution of \(O(n\log^3 n)\) space and \(O(\log^3 n)\) query time.
For the entire collection see [Zbl 1390.68025].
Reviewer (Berlin)
Zbl 07272778