Double-Ended Palindromic Trees: A Linear-Time Data Structure and Its Applications

10/05/2022
by   Qisheng Wang, et al.
0

The palindromic tree (a.k.a. eertree) is a linear-size data structure that provides access to all palindromic substrings of a string. In this paper, we propose a generalized version of eertree, called double-ended eertree, which supports linear-time online double-ended queue operations on the stored string. At the heart of our construction, is a class of substrings, called surfaces, of independent interest. Namely, surfaces are neither prefixes nor suffixes of any other palindromic substrings and characterize the link structure of all palindromic substrings in the eertree. As an application, we develop a framework for range queries involving palindromes on strings, including counting distinct palindromic substrings, and finding the longest palindromic substring, shortest unique palindromic substring and shortest absent palindrome of any substring. In particular, offline queries only use linear space. Apart from range queries, we enumerate palindromic rich strings with a given word in linear time on the length of the given word.

READ FULL TEXT

page 1

page 2

page 3

page 4

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
03/31/2022

Suffix tree-based linear algorithms for multiple prefixes, single suffix counting and listing problems

Given two strings T and S and a set of strings P, for each string p ∈ P,...
research
03/14/2019

Shortest Unique Palindromic Substring Queries on Run-Length Encoded Strings

For a string S, a palindromic substring S[i..j] is said to be a shortest...
research
07/01/2021

Compression by Contracting Straight-Line Programs

In grammar-based compression a string is represented by a context-free g...
research
07/20/2023

Efficient algorithms for enumerating maximal common subsequences of two strings

We propose efficient algorithms for enumerating maximal common subsequen...
research
04/12/2018

Fast Prefix Search in Little Space, with Applications

It has been shown in the indexing literature that there is an essential ...
research
02/18/2021

Range Minimum Queries in Minimal Space

We consider the problem of computing a sequence of range minimum queries...

Please sign up or login with your details

Forgot password? Click here to reset