Abstract
We revisit the classic algorithmic problem of computing a longest palidromic substring. This problem is solvable by a celebrated O(n)-time algorithm [Manacher, J. ACM 1975], where n is the length of the input string. For small alphabets, O(n) is not necessarily optimal in the word RAM model of computation: a string of length n over alphabet [0, σ) can be stored in O(n log σ/log n) space and read in O(n log σ/log n) time. We devise a simple O(n log σ/log n)-time algorithm for computing a longest palindromic substring. In particular, our algorithm works in sublinear time if σ = 2o(log n). Our technique relies on periodicity and on the O(n log σ/log n)-time constructible data structure of Kempa and Kociumaka [STOC 2019] that answers longest common extension queries in O(1) time.
Original language | English |
---|---|
Title of host publication | 33rd Annual Symposium on Combinatorial Pattern Matching (CPM 2022) |
Editors | Hideo Bannai, Jan Holub |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
Chapter | 20 |
Pages | 1-9 |
Number of pages | 9 |
ISBN (Electronic) | 9783959772341 |
DOIs | |
Publication status | Published - 2022 |
Event | 33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022 - Prague, Czech Republic Duration: 27 Jun 2022 → 29 Jun 2022 |
Publication series
Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 223 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022 |
---|---|
Country/Territory | Czech Republic |
City | Prague |
Period | 27/06/22 → 29/06/22 |
Bibliographical note
Funding Information:Panagiotis Charalampopoulos: Supported by the Israel Science Foundation, grant no. 810/21. Solon P. Pissis: Supported by the PANGAIA and ALPACA projects that have received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreements No 872539 and 956229, respectively. Jakub Radoszewski: Supported by the Polish National Science Center, grant no. 2018/31/D/ST6/03991.
Funding Information:
Funding Panagiotis Charalampopoulos: Supported by the Israel Science Foundation, grant no. 810/21. Solon P. Pissis: Supported by the PANGAIA and ALPACA projects that have received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreements No 872539 and 956229, respectively. Jakub Radoszewski: Supported by the Polish National Science Center, grant no. 2018/31/D/ST6/ 03991.
Publisher Copyright:
© Panagiotis Charalampopoulos, Solon P. Pissis, and Jakub Radoszewski; licensed under Creative Commons License CC-BY 4.0
Keywords
- longest common extension
- longest palindromic substring
- string algorithms