Computer Science · Computer Science Applications
Two-Pattern Strings III — Frequency of Occurrence and Substring Complexity
Frantisek Franek Ji, Ong Jiang W. F. Smyth
See on the mapAbstract
The two previous papers in this series introduced a class of infinite binary strings, called two-pattern strings, that constitute a significant generalization of, and include, the much-studied Sturmian strings. The class of two-pattern strings is a union of a sequence of increasing (with respect to inclusion) subclasses T Pλ of two-pattern strings of scope λ, λ = 1, 2, · · ·. Prefixes of two-pattern strings are interesting from the algorithmic point of view (their recognition, generation, and computation of repetitions and near-repetitions) and since they include prefixes of the Fibonnaci and the Sturmian strings, they merit investigation of how many finite two-pattern strings of a given size there are among all binary strings of the same length. In this paper we first consider the frequency fλ(n) of occurrence of two-pattern strings of length n and scope λ among all strings of length n on {a, b}: we show that limn→ ∞ fλ(n) = 0, but that for strings of lengths n ≤ 2λ, two-pattern strings of scope λ constitute more than one-quarter of all strings. Since the class of Sturmian strings is a subset of two-pattern