A Note on Crochemore's Repetitions Algorithm - A Fast Space-Efficient Approach
暂无分享,去创建一个
The space requirement of Crochemore's repetitions algorithm is generally estimated to be about 20mn bytes of memory, where n is the length of the input string and m the number of bytes required to store the integer n. The same algorithm can also be used in other contexts, for instance to compute the suffix tree of the input string in O(n log n) time for the purpose of data compression. In such contexts the large space requirement of the algorithm is a significant drawback. There are of course several newer space-efficient algorithms with the same time complexity that can compute suffix trees or arrays. However, in actual implementations, these algorithms may not be faster than Crochemore's. Therefore, we consider it interesting enough to describe a new approach based on the same mathematical principles and observations that were put forth in Crochemore's original paper, but whose space requirement is 10mn bytes. Additional advantages of the approach are the ease with which it can be implemented in C/C++ and the apparent speed of such an implementation in comparison to other implementations of the original algorithm.
[1] Eugene W. Myers,et al. Suffix arrays: a new method for on-line string searches , 1993, SODA '90.
[2] Maxime Crochemore,et al. An Optimal Algorithm for Computing the Repetitions in a Word , 1981, Inf. Process. Lett..
[3] Esko Ukkonen,et al. Constructing Suffix Trees On-Line in Linear Time , 1992, IFIP Congress.