Dynamic Longest Common Substring in Polylogarithmic Time

The longest common substring problem consists in finding a longest string that appears as a (contiguous) substring of two input strings. We consider the dynamic variant of this problem, in which we are to maintain two dynamic strings S and T, each of length at most n, that undergo substitutions of letters, in order to be able to return a longest common substring after each substitution. Recently, Amir et al. [ESA 2019] presented a solution for this problem that needs only 𝒪̃(n^2/3) time per update. This brought the challenge of determining whether there exists a faster solution with polylogarithmic update time, or (as is the case for other dynamic problems), we should expect a polynomial (conditional) lower bound. We answer this question by designing a significantly faster algorithm that processes each substitution in amortized log^𝒪(1) n time with high probability. Our solution relies on exploiting the local consistency of the parsing of a collection of dynamic strings due to Gawrychowski et al. [SODA 2018], and on maintaining two dynamic trees with labeled bicolored leaves, so that after each update we can report a pair of nodes, one from each tree, of maximum combined weight, which have at least one common leaf-descendant of each color. We complement this with a lower bound of Ω(log n/ loglog n) for the update time of any polynomial-size data structure that maintains the LCS of two dynamic strings, and the same lower bound for the update time of any data structure of size 𝒪̃(n) that maintains the LCS of a static and a dynamic string. Both lower bounds hold even allowing amortization and randomization.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/09/2022

Cartesian Tree Subsequence Matching

Park et al. [TCS 2020] observed that the similarity between two (numeric...
research
12/19/2021

Conditional Lower Bounds for Dynamic Geometric Measure Problems

We give new polynomial lower bounds for a number of dynamic measure prob...
research
02/02/2023

Optimal Heaviest Induced Ancestors

We revisit the Heaviest Induced Ancestors (HIA) problem that was introdu...
research
05/01/2022

Dynamic data structures for parameterized string problems

We revisit classic string problems considered in the area of parameteriz...
research
01/01/2022

Dynamic Least-Squares Regression

A common challenge in large-scale supervised learning, is how to exploit...
research
01/13/2022

Dynamic Local Searchable Symmetric Encryption

In this article, we tackle for the first time the problem of dynamic mem...
research
02/22/2022

How Fast Can We Play Tetris Greedily With Rectangular Pieces?

Consider a variant of Tetris played on a board of width w and infinite h...

Please sign up or login with your details

Forgot password? Click here to reset