Internal Longest Palindrome Queries in Optimal Time

10/05/2022
by   Kazuki Mitani, et al.
0

Palindromes are strings that read the same forward and backward. Problems of computing palindromic structures in strings have been studied for many years with a motivation of their application to biology. The longest palindrome problem is one of the most important and classical problems regarding palindromic structures, that is, to compute the longest palindrome appearing in a string T of length n. The problem can be solved in 𝒪(n) time by the famous algorithm of Manacher [Journal of the ACM, 1975]. In this paper, we consider the problem in the internal model. The internal longest palindrome query is, given a substring T[i..j] of T as a query, to compute the longest palindrome appearing in T[i.. j]. The best known data structure for this problem is the one proposed by Amir et al. [Algorithmica, 2020], which can answer any query in 𝒪(log n) time. In this paper, we propose a linear-size data structure that can answer any internal longest palindrome query in constant time. Also, given the input string T, our data structure can be constructed in 𝒪(n) time.

READ FULL TEXT

page 1

page 2

page 3

page 4

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/2021

Internal Shortest Absent Word Queries in Constant Time and Linear Space

Given a string T of length n over an alphabet Σ⊂{1,2,…,n^O(1)} of size σ...
research
06/25/2018

Fast entropy-bounded string dictionary look-up with mismatches

We revisit the fundamental problem of dictionary look-up with mismatches...
research
07/27/2020

Internal Quasiperiod Queries

Internal pattern matching requires one to answer queries about factors o...
research
09/17/2020

1D and 2D Flow Routing on a Terrain

An important problem in terrain analysis is modeling how water flows acr...
research
04/23/2018

Longest Common Factor Made Fully Dynamic

In the longest common factor (LCF) problem, we are given two strings S a...
research
06/13/2019

On Longest Common Property Preserved Substring Queries

We revisit the problem of longest common property preserving substring q...

Please sign up or login with your details

Forgot password? Click here to reset