A characterization of the squares in a Fibonacci string

被引:60
作者
Iliopoulos, CS
Moore, D
Smyth, WF
机构
[1] CURTIN UNIV TECHNOL,SCH COMP,PERTH,WA 6001,AUSTRALIA
[2] MCMASTER UNIV,DEPT COMP SCI & SYST,HAMILTON,ON L8S 4K1,CANADA
关键词
D O I
10.1016/S0304-3975(96)00141-7
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
A (finite) Fibonacci string F-n is defined as follows: F-0 = b, F-1 = a; for every integer n greater than or equal to 2, F-n = Fn-1Fn-2. For n greater than or equal to 1, the length of F-n is denoted by f(n) = /F-n/. The infinite Fibonacci string F is the string which contains every F-n, n greater than or equal to 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 F-n; this characterization naturally gives rise to a Theta(f(n)) algorithm which specifies all the squares of F-n in an appropriate encoding. This encoding is made possible by the fact that the squares of F-n occur consecutively, in ''runs'', the number of which is Theta(f(n)). By contrast, the known general algorithms for the computation of the repetitions in an arbitrary string require Theta(f(n) log f(n)) time (and produce Theta(f(n) log f(n)) outputs) when applied to a Fibonacci string F-n.
引用
收藏
页码:281 / 291
页数:11
相关论文
共 16 条
[1]  
AHO AV, 1988, HDB THEORETICAL COMP
[2]   OPTIMAL OFF-LINE DETECTION OF REPETITIONS IN A STRING [J].
APOSTOLICO, A ;
PREPARATA, FP .
THEORETICAL COMPUTER SCIENCE, 1983, 22 (03) :297-315
[3]  
COMMINGS LJ, IN PRESS J COMBIN MA
[4]   AN OPTIMAL ALGORITHM FOR COMPUTING THE REPETITIONS IN A WORD [J].
CROCHEMORE, M .
INFORMATION PROCESSING LETTERS, 1981, 12 (05) :244-250
[5]   A COMBINATORIAL PROPERTY OF THE FIBONACCI WORDS [J].
DELUCA, A .
INFORMATION PROCESSING LETTERS, 1981, 12 (04) :193-195
[6]  
DICKSON LE, 1971, HIST THEORY NUMBERS
[7]  
ILIOPOULOS CS, UNPUB COVERS CIRCULA
[8]  
ILIOPOULOS CS, 1993, P 4 ANN S COMB PATT, P54
[9]  
KNUTH DE, 1971, ART COMPUTER PROGRAM
[10]  
KNUTH DE, 1977, SIAM J COMPUT, V6, P322