English

Online Detection of Repetitions with Backtracking

Data Structures and Algorithms 2015-05-04 v3

Abstract

In this paper we present two algorithms for the following problem: given a string and a rational e>1e > 1, detect in the online fashion the earliest occurrence of a repetition of exponent e\ge e in the string. 1. The first algorithm supports the backtrack operation removing the last letter of the input string. This solution runs in O(nlogm)O(n\log m) time and O(m)O(m) space, where mm is the maximal length of a string generated during the execution of a given sequence of nn read and backtrack operations. 2. The second algorithm works in O(nlogσ)O(n\log\sigma) time and O(n)O(n) space, where nn is the length of the input string and σ\sigma is the number of distinct letters. This algorithm is relatively simple and requires much less memory than the previously known solution with the same working time and space. a string generated during the execution of a given sequence of nn read and backtrack operations.

Keywords

Cite

@article{arxiv.1412.4471,
  title  = {Online Detection of Repetitions with Backtracking},
  author = {Dmitry Kosolobov},
  journal= {arXiv preprint arXiv:1412.4471},
  year   = {2015}
}

Comments

12 pages, 5 figures, accepted to CPM 2015