,
Jonas Ellert
,
Tatiana Starikovskaya
Creative Commons Attribution 4.0 International license
Palindromes are non-empty strings that read the same forward and backward. We study the problem of recognizing so-called k-palindromic strings, which can be represented as the concatenation of exactly k palindromes. [Rubinchik and Shur, MFCS 2020] showed that the problem is solvable in linear space and time. We present a read-only algorithm that recognizes all k-palindromic prefixes of a string T of length n in O(n ⋅ 6^{k²} ⋅ log^k n) time and O(6^{k²} ⋅ log^k n) space. As a corollary, we also obtain a read-only algorithm for computing the palindromic length of T, i.e., the smallest k such that T is k-palindromic, in O(n ⋅ 6^{k²} ⋅ log^⌈k/2⌉ n) time and O(6^{k²} ⋅ log^⌈k/2⌉ n) space.
@InProceedings{bathie_et_al:LIPIcs.ISAAC.2025.9,
author = {Bathie, Gabriel and Ellert, Jonas and Starikovskaya, Tatiana},
title = {{Small Space Encoding and Recognition of k-Palindromic Prefixes}},
booktitle = {36th International Symposium on Algorithms and Computation (ISAAC 2025)},
pages = {9:1--9:16},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-408-6},
ISSN = {1868-8969},
year = {2025},
volume = {359},
editor = {Chen, Ho-Lin and Hon, Wing-Kai and Tsai, Meng-Tsung},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ISAAC.2025.9},
URN = {urn:nbn:de:0030-drops-249178},
doi = {10.4230/LIPIcs.ISAAC.2025.9},
annote = {Keywords: palindromic length, read-only algorithms, palindromes}
}