Keywords and Synonyms
Sorting of multi-dimensional keys; Vector sorting
Problem Definition
The problem is to sort a set of strings into lexicographical order. More formally: A string over an alphabet Σ is a finite sequence \( { x_1 x_2 x_3 \dots x_k } \) where \( { x_i \in \Sigma } \) for \( { i = 1,\dots,k } \). The x i 's are called the characters of the string, and k is the length of the string. If the alphabet Σ is ordered, the lexicographical order on the set of strings over Σ is defined by declaring a string \( { x = x_1 x_2 x_3 \dots x_k } \) smaller than a string \( { y = y_1 y_2 y_3 \dots y_l } \) if either there exists a \( { j \ge 1 } \) such that \( { x_i = y_i } \) for \( { 1 \le i < j } \) and \( { x_j < y_j } \), or if \( { k < l } \) and \( { x_i = y_i } \) for \( { 1 \le i \le k } \). Given a set S of strings over some ordered alphabet, the problem is to sort S according to lexicographical order.
The input to the string sorting problem consists of an array of pointers...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Ferragina, personal communication.
Recommended Reading
Aggarwal, A., Vitter, J.S.: The input/output complexity of sorting and related problems. Commun. ACM 31, 1116–1127 (1988)
Andersson, A., Nilsson, S.: A new efficient radix sort. In: Proceedings of the 35th Annual Symposium on Foundations of Computer Science (FOCS '94), IEEE Comput. Soc. Press, pp. 714–721 (1994)
Andersson, A., Nilsson, S.: Implementing radixsort. ACM J. Exp. Algorithmics 3, 7 (1998)
Arge, L., Ferragina, P., Grossi, R., Vitter, J.S.: On sorting strings in external memory (extended abstract). In: Proceedings of the 29th Annual ACM Symposium on Theory of Computing (STOC '97), ACM, ed., pp. 540–548. ACM Press, El Paso (1997),
Bentley, J., Sedgewick, R.: Algorithm alley: Sorting strings with three-way radix quicksort. Dr. Dobb's J. Softw. Tools 23, 133–134, 136–138 (1998)
Bentley, J.L., McIlroy, M.D.: Engineering a sort function. Softw. Pract. Exp. 23, 1249–1265 (1993)
Fagerberg, R., Pagh, A., Pagh, R.: External string sorting: Faster and cache-oblivious. In: Proceedings of STACS '06. LNCS, vol. 3884, pp. 68–79. Springer, Marseille (2006)
Franceschini, G., Grossi, R.: A general technique for managing strings in comparison-driven data structures. In: Proceedings of the 31st International Colloquium on Automata, Languages and Programming (ICALP '04). LNCS, vol. 3142, pp. 606–617. Springer, Turku (2004)
Franceschini, G., Grossi, R.: Optimal in-place sorting of vectors and records. In: Proceedings of the 32nd International Colloquium on Automata, Languages and Programming (ICALP '05). LNCS, vol. 3580, pp. 90–102. Springer, Lisbon (2005)
Grossi, R., Italiano, G.F.: Efficient techniques for maintaining multidimensional keys in linked data structures. In: Proceedings of the 26th International Colloquium on Automata, Languages and Programming (ICALP '99). LNCS, vol. 1644, pp. 372–381. Springer, Prague (1999)
Han, Y., Thorup, M.: Integer sorting in \( { {O}(n\sqrt{\log\log n}) } \) expected time and linear space. In: Proceedings of the 43rd Annual Symposium on Foundations of Computer Science (FOCS '02), pp. 135–144. IEEE Computer Society Press, Vancouver (2002)
McIlroy, P.M., Bostic, K., McIlroy, M.D.: Engineering radix sort. Comput. Syst. 6, 5–27 (1993)
Mehlhorn, K.: Dynamic binary search. SIAM J. Comput. 8, 175–198 (1979)
Sedgewick, R.: Algorithms in Java, Parts 1–4, 3rd edn. Addison-Wesley, (2003)
Sedgewick, R., Bentley, J.: Fast algorithms for sorting and searching strings. In: Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA '97), ACM, ed., pp. 360–369. ACM Press, New Orleans (1997)
Sinha, R., Zobel, J., Ring, D.: Cache-efficient string sorting using copying. ACM J. Exp. Algorithmics. 11 (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag
About this entry
Cite this entry
Fagerberg, R. (2008). String Sorting. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30162-4_408
Download citation
DOI: https://doi.org/10.1007/978-0-387-30162-4_408
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-387-30770-1
Online ISBN: 978-0-387-30162-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering