English

Minimal unique palindromic substrings after single-character substitution

Data Structures and Algorithms 2021-10-05 v2

Abstract

A palindrome is a string that reads the same forward and backward. A palindromic substring ww of a string TT is called a minimal unique palindromic substring (MUPS) of TT if ww occurs only once in TT and any proper palindromic substring of ww occurs at least twice in TT. MUPSs are utilized for answering the shortest unique palindromic substring problem, which is motivated by molecular biology [Inoue et al., 2018]. Given a string TT of length nn, all MUPSs of TT can be computed in O(n)O(n) time. In this paper, we study the problem of updating the set of MUPSs when a character in the input string TT is substituted by another character. We first analyze the number dd of changes of MUPSs when a character is substituted, and show that dd is in O(logn)O(\log n). Further, we present an algorithm that uses O(n)O(n) time and space for preprocessing, and updates the set of MUPSs in O(logσ+(loglogn)2+d)O(\log\sigma + (\log\log n)^2 + d) time where σ\sigma is the alphabet size. We also propose a variant of the algorithm, which runs in optimal O(1+d)O(1+d) time when the alphabet size is constant.

Keywords

Cite

@article{arxiv.2105.11693,
  title  = {Minimal unique palindromic substrings after single-character substitution},
  author = {Mitsuru Funakoshi and Takuya Mieno},
  journal= {arXiv preprint arXiv:2105.11693},
  year   = {2021}
}
R2 v1 2026-06-24T02:26:01.591Z