Efficient representation and counting of antipower factors in words
A k-antipower (for k≥2) is a concatenation of k distinct words of the same length. Fici et al. (ICALP 2016) initiated the study of antipowers occurring as fragments of a word, whereas Badkobeh et al. (Inf. Process. Lett., 2018) presented first algorithms computing such fragments. We address two open...
Gespeichert in:
Veröffentlicht in: | Information and computation 2022-07, Vol.286, p.104779, Article 104779 |
---|---|
Hauptverfasser: | , , , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | A k-antipower (for k≥2) is a concatenation of k distinct words of the same length. Fici et al. (ICALP 2016) initiated the study of antipowers occurring as fragments of a word, whereas Badkobeh et al. (Inf. Process. Lett., 2018) presented first algorithms computing such fragments. We address two open problems originating from the latter work and propose efficient algorithms for counting and reporting fragments being k-antipowers. For a length-n word, our algorithms cost O(nklogk) and O(nklogk+C) time, respectively, where C is the number of reported fragments. We also show that the number of different k-antipower factors of a length-n word can be computed in O(nk4logklogn) time. Finally, we present an improved data structure that checks whether a given fragment is a k-antipower for a given integer k≥2. Our main algorithmic tools are runs and maximal gapped repeats. |
---|---|
ISSN: | 0890-5401 1090-2651 |
DOI: | 10.1016/j.ic.2021.104779 |