Shortest Unique Palindromic Substring Queries in Semi-dynamic Settings

04/15/2022
by   Takuya Mieno, et al.
0

A palindromic substring T[i.. j] of a string T is said to be a shortest unique palindromic substring (SUPS) in T for an interval [p, q] if T[i.. j] is a shortest one such that T[i.. j] occurs only once in T, and [i, j] contains [p, q]. The SUPS problem is, given a string T of length n, to construct a data structure that can compute all the SUPSs for any given query interval. It is known that any SUPS query can be answered in O(α) time after O(n)-time preprocessing, where α is the number of SUPSs to output [Inoue et al., 2018]. In this paper, we first show that α is at most 4, and the upper bound is tight. Also, we present an algorithm to solve the SUPS problem for a sliding window that can answer any query in O(loglog W) time and update data structures in amortized O(logσ) time, where W is the size of the window, and σ is the alphabet size. Furthermore, we consider the SUPS problem in the after-edit model and present an efficient algorithm. Namely, we present an algorithm that uses O(n) time for preprocessing and answers any k SUPS queries in O(log nloglog n + kloglog n) time after single character substitution. As a by-product, we propose a fully-dynamic data structure for range minimum queries (RmQs) with a constraint where the width of each query range is limited to polylogarithmic. The constrained RmQ data structure can answer such a query in constant time and support a single-element edit operation in amortized constant time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/30/2019

Compact Data Structures for Shortest Unique Substring Queries

Given a string T of length n, a substring u = T[i.. j] of T is called a ...
research
10/05/2022

Internal Longest Palindrome Queries in Optimal Time

Palindromes are strings that read the same forward and backward. Problem...
research
05/25/2021

Minimal unique palindromic substrings after single-character substitution

A palindrome is a string that reads the same forward and backward. A pal...
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
02/02/2023

Optimal Heaviest Induced Ancestors

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

Efficient exact enumeration of single-source geodesics on a non-convex polyhedron

In this paper, we consider enumeration of geodesics on a polyhedron, whe...
research
04/28/2018

Heavy Hitters over Interval Queries

Heavy hitters and frequency measurements are fundamental in many network...

Please sign up or login with your details

Forgot password? Click here to reset