# On Longest Common Property Preserved Substring Queries

**Authors:** Kazuki Kai, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, Masayuki, Takeda, Tomasz Kociumaka

arXiv: 1906.05486 · 2019-06-14

## TL;DR

This paper develops efficient online algorithms for identifying the longest common substrings with specific properties, such as being palindromes or Lyndon words, across multiple strings with minimal query time.

## Contribution

It introduces a unified, on-line approach for finding longest common property-preserving substrings, improving efficiency over previous off-line methods.

## Key findings

- Preprocessing time is O(n) for the data structure.
- Query answering takes O(|y| log σ) time with O(1) space.
- Supports multiple properties: square, periodic, palindrome, Lyndon.

## Abstract

We revisit the problem of longest common property preserving substring queries introduced by~Ayad et al. (SPIRE 2018, arXiv 2018). We consider a generalized and unified on-line setting, where we are given a set $X$ of $k$ strings of total length $n$ that can be pre-processed so that, given a query string $y$ and a positive integer $k'\leq k$, we can determine the longest substring of $y$ that satisfies some specific property and is common to at least $k'$ strings in $X$. Ayad et al. considered the longest square-free substring in an on-line setting and the longest periodic and palindromic substring in an off-line setting. In this paper, we give efficient solutions in the on-line setting for finding the longest common square, periodic, palindromic, and Lyndon substrings. More precisely, we show that $X$ can be pre-processed in $O(n)$ time resulting in a data structure of $O(n)$ size that answers queries in $O(|y|\log\sigma)$ time and $O(1)$ working space, where $\sigma$ is the size of the alphabet, and the common substring must be a square, a periodic substring, a palindrome, or a Lyndon word.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1906.05486/full.md

## Figures

2 figures with captions in the complete paper: https://tomesphere.com/paper/1906.05486/full.md

## References

19 references — full list in the complete paper: https://tomesphere.com/paper/1906.05486/full.md

---
Source: https://tomesphere.com/paper/1906.05486