×

An elegant algorithm for the construction of suffix arrays. (English) Zbl 1361.68071

Summary: The suffix array is a data structure that finds numerous applications in string processing problems for both linguistic texts and biological data. It has been introduced as a memory efficient alternative for suffix trees. The suffix array consists of the sorted suffixes of a string. There are several linear time suffix array construction algorithms (SACAs) known in the literature. However, one of the fastest algorithms in practice has a worst case run time of \(O(n^2)\). The problem of designing practically and theoretically efficient techniques remains open.
In this paper we present an elegant algorithm for suffix array construction which takes linear time with high probability; the probability is on the space of all possible inputs. Our algorithm is one of the simplest of the known SACAs and it opens up a new dimension of suffix array construction that has not been explored until now. Our algorithm is easily parallelizable. We offer parallel implementations on various parallel models of computing. We prove a lemma on the \(\ell\)-mers of a random string which might find independent applications. We also present another algorithm that utilizes the above algorithm. This algorithm is called RadixSA and has a worst case run time of \(O(n\log n)\). RadixSA introduces an idea that may find independent applications as a speedup technique for other SACAs. An empirical comparison of RadixSA with other algorithms on various datasets reveals that our algorithm is one of the fastest algorithms to date. The C++ source code is freely available at http://www.engr.uconn.edu/~man09004/radixSA.zip.

MSC:

68P05 Data structures
68W10 Parallel algorithms in computer science
68W40 Analysis of algorithms
PDFBibTeX XMLCite
Full Text: DOI arXiv

References:

[1] Baron, D.; Bresler, Y., Antisequential suffix sorting for bwt-based data compression, IEEE Trans. Comput., 54, 4, 385-397 (2005)
[2] Buhler, J.; Tompa, M., Finding motifs using random projections, (RECOMB (2001)), 69-76
[3] Burkhardt, S.; Kärkkäinen, J., Fast lightweight suffix array construction and checking, (Baeza-Yates, R.; Chávez, E.; Crochemore, M., Combinatorial Pattern Matching. Combinatorial Pattern Matching, Lecture Notes in Computer Science, vol. 2676 (2003), Springer: Springer Berlin/Heidelberg), 55-69 · Zbl 1279.68065
[4] Burrows, M.; Wheeler, D., A block-sorting lossless data compression algorithm (1994), Tech. Rep. 124
[5] Cole, R., Parallel merge sort, SIAM J. Comput., 17, 4, 770-785 (1988) · Zbl 0651.68077
[6] Horowitz, E.; Sahni, S.; Rajasekaran, S., Computer Algorithms (2008), Silicon Press
[7] Itoh, H.; Tanaka, H., An efficient method for in memory construction of suffix arrays, (Proceedings of the Sixth Symposium on String Processing and Information Retrieval (1999), IEEE Computer Society), 81-88
[8] Kaklamanis, C.; Krizanc, D.; Narayanan, L.; Tsantilas, T., Randomized sorting and selection on mesh-connected processor arrays (preliminary version), (Proceedings of the Third Annual ACM Symposium on Parallel Algorithms and Architectures. Proceedings of the Third Annual ACM Symposium on Parallel Algorithms and Architectures, SPAA ’91 (1991), ACM: ACM New York, NY, USA), 17-28
[9] Kärkkäinen, J.; Sanders, P., Simple linear work suffix array construction, (ICALP (2003)), 943-955 · Zbl 1039.68042
[10] Kim, D.; Sim, J.; Park, H.; Park, K., Linear-time construction of suffix arrays, (CPM (2003)), 186-199 · Zbl 1279.68068
[11] Kim, D.; Jo, J.; Park, H., A fast algorithm for constructing suffix arrays for fixed size alphabets, (Ribeiro, C. C.; Martins, S. L., Proceedings of the 3rd Workshop on Experimental and Efficient Algorithms (WEA 2004) (2004), Springer-Verlag: Springer-Verlag Berlin), 301-314
[12] Ko, P.; Aluru, S., Space efficient linear time construction of suffix arrays, (CPM (2003)), 200-210 · Zbl 1279.68069
[13] Kurtz, S., Reducing the space requirement of suffix trees, Softw. Pract. Exp., 29, 13, 1149-1171 (1999)
[14] LaMarca, A.; Ladner, R. E., The influence of caches on the performance of sorting, (Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms. Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’97 (1997), Society for Industrial and Applied Mathematics: Society for Industrial and Applied Mathematics Philadelphia, PA, USA), 370-379 · Zbl 1321.68122
[15] Larsson, J.; Sadakane, K., Faster suffix sorting (1999), Department of Computer Science, Lund University: Department of Computer Science, Lund University Sweden, Tech. Rep. LU-CS-TR:99-214 [LUNFD6/(NFCS-3140)/1-20/(1999)] · Zbl 1144.68022
[16] Larsson, N.; Sadakane, K., Faster suffix sorting, Theor. Comput. Sci., 387, 3, 258-272 (2007) · Zbl 1144.68022
[17] Manber, U.; Myers, G., Suffix arrays: a new method for on-line string searches, (Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms. Proceedings of the First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’90 (1990), Society for Industrial and Applied Mathematics: Society for Industrial and Applied Mathematics Philadelphia, PA, USA), 319-327 · Zbl 0800.68364
[18] Manzini, G.; Ferragina, P., Engineering a lightweight suffix array construction algorithm, Algorithmica, 40, 33-50 (2004) · Zbl 1082.68867
[19] Mori, Y., Short description of improved two-stage suffix sorting algorithm (2005)
[20] Nong, G.; Zhang, S.; Chan, W., Linear suffix array construction by almost pure induced-sorting, (Data Compression Conference (2009)), 193-202
[21] Osiński, S.; Weiss, D., jsuffixarrays: suffix arrays for java (2002-2011)
[22] Puglisi, S.; Smyth, W.; Turpin, A., A taxonomy of suffix array construction algorithms, ACM Comput. Surv., 39, 2 (2007)
[23] Rajasekaran, S.; Sen, S., Optimal and practical algorithms for sorting on the pdm, IEEE Trans. Comput., 57, 4, 547-561 (2008) · Zbl 1373.68205
[24] Reif, J.; Valiant, L., A logarithmic time sort for linear size networks, J. ACM, 34, 1, 60-76 (1987)
[25] Schürmann, K.-B.; Stoye, J., An incomplex algorithm for fast suffix array construction, Softw. Pract. Exp., 37, 3, 309-329 (2007)
[26] Seward, J., On the performance of bwt sorting algorithms, (Proceedings of the Conference on Data Compression. Proceedings of the Conference on Data Compression, DCC ’00 (2000), IEEE Computer Society: IEEE Computer Society Washington, DC, USA), 173-182
[27] Szpankowski, W., Average Case Analysis of Algorithms on Sequences (2001), John Wiley & Sons, Inc. · Zbl 0969.00028
[28] Thompson, C.; Kung, H. T., Sorting on a mesh-connected parallel computer, Commun. ACM, 20, 4, 263-271 (1977) · Zbl 0349.68020
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.