We present a simple algorithm which for an explicitly given input string p a t (a pattern) and a standard Sturmian word x described by the recurrences of size n computes, in time O (| p a t | + n), the set of all occurrences of p a t in x as a single arithmetic progression (modulo the length of x). The algorithm can be extended to the case when some letters of the pattern are replaced by a don't care symbol. In this case the set of all occurrences does not need to be a single arithmetic progression and our algorithm produces linearly many (with respect to the size of p a t) arithmetic progressions. It is an example of fast computations for the input given in a compressed form. In our special case the length of the standard Sturmian word x is usually exponential with respect to the size of the input. © 2009 Elsevier B.V. All rights reserved.
CITATION STYLE
Baturo, P., & Rytter, W. (2009). Compressed string-matching in standard Sturmian words. Theoretical Computer Science, 410(30–32), 2804–2810. https://doi.org/10.1016/j.tcs.2009.03.007
Mendeley helps you to discover research relevant for your work.