Space Efficient Linear Time Construction of Suffix Arrays
We present a linear time algorithm to sort all the suffixes of a string over a large alphabet of integers. The sorted order of suffixes of a string is also called suffix array, a data structure introduced by Manber and Myers that has numerous applications in pattern matching, string processing, and computational biology. Though the suffix tree of a string can be constructed in linear time and the sorted order of suffixes derived from it, a direct algorithm for suffix sorting is of great interest due to the space requirements of suffix trees. Our result improves upon the best known direct algorithm for suffix sorting, which takes O(n log n) time. We also show how to construct suffix trees in linear time from our suffix sorting result. Apart from being simple and applicable for alphabets not necessarily of fixed size, this method of constructing suffix trees is more space efficient.
KeywordsLinear Time Linear Time Algorithm Suffix Tree Direct Algorithm Suffix Array
Unable to display preview. Download preview PDF.
- [AKO02]M. I. Abouelhoda, S. Kurtz, and E. Ohlebusch. The enhanced suffix array and its applications to genome analysis. In 2nd Workshop on Algorithms in Bioinformatics, pages 449–63, 2002.Google Scholar
- [AOK02]M. I. Abouelhoda, E. Ohlebusch, and S. Kurtz. Optimal exact string matching based on suffix arrays. In International Symposium on String Processing and Information Retrieval, pages 31–43. IEEE, 2002.Google Scholar
- [FM96]M. Farach and S. Muthukrishnan. Optimal logarithmic time randomized suffix tree construction. In Proc. of 23rd International Colloquium on Automata Languages and Programming, 1996.Google Scholar
- [IT99]H. Itoh and H. Tanaka. An efficient method for in memory construction of suffix array. In International Symposium on String Processing and Information Retrieval, pages 81–88. IEEE, 1999.Google Scholar
- [KLA+01]T. Kasai, G. Lee, H. Arimura, S. Arikawa, and K. Park. Linear-time longest-common-prefix computation in suffix arrays and its applications. In 12th Annual Symposium, Combinatorial Pattern Matching, pages 181–92, 2001.Google Scholar
- [KS03]J. Kärkkänen and P. Sanders. Simpler linear work suffix array construction. In International Colloquium on Automata, Languages and Programming, page to appear, 2003.Google Scholar
- [KSPP03]D. K. Kim, J. S. Sim, H. Park, and K. Park. Linear-time construction of suffix arrays. In 14th Annual Symposium, Combinatorial Pattern Matching, 2003.Google Scholar
- [LS99]N. J. Larsson and K. Sadakane. Faster suffix sorting. Technical Report LU-CS-TR:99-214, LUNDFD6/(NFCS-3140)/1-20/(1999), Department of Computer Science, Lund University, Sweden, May 1999.Google Scholar
- [Wei73]P. Weiner. Linear pattern matching algorithms. In 14th Symposium on Switching and Automata Theory, pages 1–11. IEEE, 1973.Google Scholar