Longest Palindromic Substring in Sublinear Time

Panagiotis Charalampopoulos*, Solon P. Pissis, Jakub Radoszewski

*Corresponding author for this work

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

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 languageEnglish
Title of host publication33rd Annual Symposium on Combinatorial Pattern Matching (CPM 2022)
EditorsHideo Bannai, Jan Holub
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Chapter20
Pages1-9
Number of pages9
ISBN (Electronic)9783959772341
DOIs
Publication statusPublished - 2022
Event33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022 - Prague, Czech Republic
Duration: 27 Jun 202229 Jun 2022

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume223
ISSN (Print)1868-8969

Conference

Conference33rd Annual Symposium on Combinatorial Pattern Matching, CPM 2022
Country/TerritoryCzech Republic
CityPrague
Period27/06/2229/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

Fingerprint

Dive into the research topics of 'Longest Palindromic Substring in Sublinear Time'. Together they form a unique fingerprint.

Cite this