Abstract

A kk-antipower (for k≥2k \ge 2) is a concatenation of kk pairwise distinct words of the same length. The study of fragments of a word being antipowers was initiated by Fici et al. (ICALP 2016) and first algorithms for computing such fragments were presented by Badkobeh et al. (Inf. Process. Lett., 2018). We address two open problems posed by Badkobeh et al. We propose efficient algorithms for counting and reporting fragments of a word which are kk-antipowers. They work in O(nklog⁡k)\mathcal{O}(nk \log k) time and O(nklog⁡k+C)\mathcal{O}(nk \log k + C) time, respectively, where CC is the number of reported fragments. For k=o(n/log⁡n)k=o(\sqrt{n/\log n}), this improves the time complexity of O(n2/k)\mathcal{O}(n^2/k) of the solution by Badkobeh et al. We also show that the number of different kk-antipower factors of a word of length nn can be computed in O(nk4log⁡klog⁡n)\mathcal{O}(nk^4 \log k \log n) time. Our main algorithmic tools are runs and gapped repeats. Finally we present an improved data structure that checks, for a given fragment of a word and an integer kk, if the fragment is a kk-antipower. This is a full and extended version of a paper from LATA 2019. In particular, all results about counting different antipowers factors are completely new compared with the LATA proceedings version.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.