An elegant algorithm for the construction of suffix arrays

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(n2). 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 ℓ-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.

[1]  Ellis Horowitz,et al.  Computer Algorithms / C++ , 2007 .

[2]  Kunihiko Sadakane,et al.  Faster suffix sorting , 2007, Theoretical Computer Science.

[3]  Juha Kärkkäinen,et al.  Fast Lightweight Suffix Array Construction and Checking , 2003, CPM.

[4]  David S. L. Wei,et al.  Computer Algorithms , 1998, Scalable Comput. Pract. Exp..

[5]  Leslie G. Valiant,et al.  A logarithmic time sort for linear size networks , 1982, STOC.

[6]  Sanguthevar Rajasekaran,et al.  Optimal and Practical Algorithms for Sorting on the PDM , 2008, IEEE Transactions on Computers.

[7]  Eugene W. Myers,et al.  Suffix arrays: a new method for on-line string searches , 1993, SODA '90.

[8]  Srinivas Aluru,et al.  Space efficient linear time construction of suffix arrays , 2003, J. Discrete Algorithms.

[9]  Yoram Bresler,et al.  Antisequential suffix sorting for BWT-based data compression , 2005, IEEE Transactions on Computers.

[10]  Hozumi Tanaka,et al.  An efficient method for in memory construction of suffix arrays , 1999, 6th International Symposium on String Processing and Information Retrieval. 5th International Workshop on Groupware (Cat. No.PR00268).

[11]  Jens Stoye,et al.  An incomplex algorithm for fast suffix array construction , 2007, ALENEX/ANALCO.

[12]  William F. Smyth,et al.  A taxonomy of suffix array construction algorithms , 2007, CSUR.

[13]  Pang Ko,et al.  Linear Time Construction of Suffix Arrays , 2002 .

[14]  Christos Kaklamanis,et al.  Randomized sorting and selection on mesh-connected processor arrays (preliminary version) , 1991, SPAA '91.

[15]  Stefan Kurtz,et al.  Reducing the space requirement of suffix trees , 1999, Softw. Pract. Exp..

[16]  Richard E. Ladner,et al.  The influence of caches on the performance of sorting , 1997, SODA '97.

[17]  Peter Sanders,et al.  Simple Linear Work Suffix Array Construction , 2003, ICALP.

[18]  D. J. Wheeler,et al.  A Block-sorting Lossless Data Compression Algorithm , 1994 .

[19]  Ge Nong,et al.  Linear Suffix Array Construction by Almost Pure Induced-Sorting , 2009, 2009 Data Compression Conference.

[20]  Dong Kyue Kim,et al.  A Fast Algorithm for Constructing Suffix Arrays for Fixed-Size Alphabets , 2004, WEA.

[21]  H. T. Kung,et al.  Sorting on a mesh-connected parallel computer , 1976, STOC '76.

[22]  Jeremy Buhler,et al.  Finding motifs using random projections , 2001, RECOMB.

[23]  W. Szpankowski Average Case Analysis of Algorithms on Sequences , 2001 .

[24]  Giovanni Manzini,et al.  Engineering a Lightweight Suffix Array Construction Algorithm , 2002, ESA.

[25]  Julian Seward On the performance of BWT sorting algorithms , 2000, Proceedings DCC 2000. Data Compression Conference.

[26]  Richard Cole,et al.  Parallel merge sort , 1988, 27th Annual Symposium on Foundations of Computer Science (sfcs 1986).