King's College London

Research portal

Linear-Time Computation of Shortest Covers of All Rotations of a String

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

Maxime Crochemore, Costas S. Iliopoulos, Jakub Radoszewski, Wojciech Rytter, Juliusz Straszyński, Tomasz Waleń, Wiktor Zuba

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
ISBN (Electronic)9783959772341
DOIs
Published1 Jun 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/202229/06/2022

Bibliographical note

Funding Information: Funding Jakub Radoszewski: Supported by the Polish National Science Center, grant no. 2018/31/D/ ST6/03991. Juliusz Straszyński: Supported by the Polish National Science Center, grant no. 2018/31/D/ST6/ 03991. Tomasz Waleń: Supported by the Polish National Science Center, grant no. 2018/31/D/ST6/03991. Wiktor Zuba: Supported by the Netherlands Organisation for Scientific Research (NWO) through Gravitation-grant NETWORKS-024.002.003. Publisher Copyright: © Maxime Crochemore, Costas S. Iliopoulos, Jakub Radoszewski, Wojciech Rytter, Juliusz Straszyski, Tomasz Wale, and Wiktor Zuba; licensed under Creative Commons License CC-BY 4.0

King's Authors

Abstract

We show that lengths of shortest covers of all rotations of a length-n string over an integer alphabet can be computed in O(n) time in the word-RAM model, thus improving an O(nlog n)-time algorithm from Crochemore et al. (Theor. Comput. Sci., 2021). Similarly as Crochemore et al., we use a relation of covers of rotations of a string S to seeds and squares in S3. The crucial parameter of a string S is the number ξ(S) of primitive covers of all rotations of S. We show first that the time complexity of the algorithm from Crochemore et al. can be slightly improved which results in time complexity Θ(ξ(S)). However, we also show that in the worst case ξ(S) is Ω(|S|log |S|). This is the main difficulty in obtaining a linear time algorithm. We overcome it and obtain yet another application of runs in strings.

View graph of relations

© 2020 King's College London | Strand | London WC2R 2LS | England | United Kingdom | Tel +44 (0)20 7836 5454