Optimal Heaviest Induced Ancestors

We revisit the Heaviest Induced Ancestors (HIA) problem that was introduced by Gagie, Gawrychowski, and Nekrich [CCCG 2013] and has a number of applications in string algorithms. Let T_1 and T_2 be two rooted trees whose nodes have weights that are increasing in all root-to-leaf paths, and labels on the leaves, such that no two leaves of a tree have the same label. A pair of nodes (u, v)∈ T_1 × T_2 is induced if and only if there is a label shared by leaf-descendants of u and v. In an HIA query, given nodes x ∈ T_1 and y ∈ T_2, the goal is to find an induced pair of nodes (u, v) of the maximum total weight such that u is an ancestor of x and v is an ancestor of y. Let n be the upper bound on the sizes of the two trees. It is known that no data structure of size 𝒪̃(n) can answer HIA queries in o(log n / loglog n) time [Charalampopoulos, Gawrychowski, Pokorski; ICALP 2020]. This (unconditional) lower bound is a polyloglog n factor away from the query time of the fastest 𝒪̃(n)-size data structure known to date for the HIA problem [Abedin, Hooshmand, Ganguly, Thankachan; Algorithmica 2022]. In this work, we resolve the query-time complexity of the HIA problem for the near-linear space regime by presenting a data structure that can be built in 𝒪̃(n) time and answers HIA queries in 𝒪(log n/loglog n) time. As a direct corollary, we obtain an 𝒪̃(n)-size data structure that maintains the LCS of a static string and a dynamic string, both of length at most n, in time optimal for this space regime. The main ingredients of our approach are fractional cascading and the utilization of an 𝒪(log n/ loglog n)-depth tree decomposition.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/28/2021

Weighted Ancestors in Suffix Trees Revisited

The weighted ancestor problem is a well-known generalization of the pred...
research
06/05/2018

Tree Path Majority Data Structures

We present the first solution to τ-majorities on tree paths. Given a tre...
research
04/15/2022

Shortest Unique Palindromic Substring Queries in Semi-dynamic Settings

A palindromic substring T[i.. j] of a string T is said to be a shortest ...
research
06/03/2020

Dynamic Longest Common Substring in Polylogarithmic Time

The longest common substring problem consists in finding a longest strin...
research
06/21/2022

The Complexity of the Co-Occurrence Problem

Let S be a string of length n over an alphabet Σ and let Q be a subset o...
research
07/21/2022

Tight Bounds for Monotone Minimal Perfect Hashing

The monotone minimal perfect hash function (MMPHF) problem is the follow...
research
02/18/2023

Faster Wavelet Trees with Quad Vectors

Given a text, rank and select queries return the number of occurrences o...

Please sign up or login with your details

Forgot password? Click here to reset