# Efficient Representation and Counting of Antipower Factors in Words

**Authors:** Tomasz Kociumaka, Jakub Radoszewski, Wojciech Rytter, Juliusz, Straszy\'nski, Tomasz Wale\'n, Wiktor Zuba

arXiv: 1812.08101 · 2020-05-12

## TL;DR

This paper introduces efficient algorithms for counting and reporting antipower fragments in words, improving previous complexities and providing new methods for analyzing antipower factors with practical data structures.

## Contribution

The paper presents new algorithms for antipower fragment analysis, including counting, reporting, and computing the number of antipower factors with improved time complexities.

## Key findings

- Algorithms operate in $	ilde{O}(nk)$ time for counting and reporting.
- Number of antipower factors can be computed in $	ilde{O}(nk^4)$ time.
- New data structures enable quick verification of antipower fragments.

## Abstract

A $k$-antipower (for $k \ge 2$) is a concatenation of $k$ 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 $k$-antipowers. They work in $\mathcal{O}(nk \log k)$ time and $\mathcal{O}(nk \log k + C)$ time, respectively, where $C$ is the number of reported fragments. For $k=o(\sqrt{n/\log n})$, this improves the time complexity of $\mathcal{O}(n^2/k)$ of the solution by Badkobeh et al. We also show that the number of different $k$-antipower factors of a word of length $n$ can be computed in $\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 $k$, if the fragment is a $k$-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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1812.08101/full.md

## Figures

14 figures with captions in the complete paper: https://tomesphere.com/paper/1812.08101/full.md

## References

23 references — full list in the complete paper: https://tomesphere.com/paper/1812.08101/full.md

---
Source: https://tomesphere.com/paper/1812.08101