Paper record
W2105633925Breaking a Time-and-Space Barrier in Constructing Full-Text Indices
Wing-Kai Hon, Kunihiko Sadakane, Wing-Kin Ken Sung
- Year
- 2009
- Venue
- SIAM Journal on Computing
- References
- 29
- Cited by
- 83
Details and counts from OpenAlex.
Abstract
Suffix trees and suffix arrays are the most prominent full-text indices, and their construction algorithms are well studied. In the literature, the fastest algorithm runs in time, while it requires -bit working space, where n denotes the length of the text. On the other hand, the most space-efficient algorithm requires -bit working space while it runs in time. It was open whether these indices can be constructed in both time and -bit working space. This paper breaks the above time-and-space barrier under the unit-cost word RAM. We give an algorithm for constructing the suffix array, which takes time and -bit working space, for texts with constant-size alphabets. Note that both the time and the space bounds are optimal. For constructing the suffix tree, our algorithm requires time and -bit working space for any . Apart from that, our algorithm can also be adopted to build other existing full-text indices, such as compressed suffix tree, compressed suffix arrays, and FM-index. We also study the general case where the size of the alphabet is not constant. Our algorithm can construct a suffix array and a suffix tree using optimal -bit working space while running in time and time, respectively. These are the first algorithms that achieve time with optimal working space. Moreover, for the special case where , we can speed up our suffix array construction algorithm to the optimal .