Home
Scholarly Works
A characterization of the squares in a Fibonacci...
Journal article

A characterization of the squares in a Fibonacci string

Abstract

A (finite) Fibonacci string Fn is defined as follows: F0 = b, F1 = a; for every integer n ⩾ 2, Fn = Fn − 1Fn − 2. For n ⩾ 1, the length of Fn is denoted by ƒn = ¦Fn¦. The infinite Fibonacci string F is the string which contains every Fn, n ⩾ 1, as a prefix. Apart from their general theoretical importance, Fibonacci strings are often cited as worst-case examples for algorithms which compute all the repetitions or all the “Abelian squares” in a given string. In this paper we provide a characterization of all the squares in F, hence in every prefix Fn; this characterization naturally gives rise to a Θ(ƒn) algorithm which specifies all the squares of Fn in an appropriate encoding. This encoding is made possible by the fact that the squares of Fn occur consecutively, in “runs”, the number of which is Θ(ƒn). By contrast, the known general algorithms for the computation of the repetitions in an arbitrary string require Θ(ƒn log ƒn) time (and produce Θ(ƒn log ƒn) outputs) when applied to a Fibonacci string Fn.

Authors

Iliopoulos CS; Moore D; Smyth WF

Journal

Theoretical Computer Science, Vol. 172, No. 1-2, pp. 281–291

Publisher

Elsevier

Publication Date

February 10, 1997

DOI

10.1016/s0304-3975(96)00141-7

ISSN

0304-3975

Contact the Experts team