Years and Authors of Summarized Original Work
1997; Bentley, Sedgewick
Problem Definition
The problem is to sort a set of strings into lexicographical order. More formally: A string over an alphabet\(\varSigma\)is a finite sequence \(x_{1}x_{2}x_{3}\ldots x_{k}\)where \(x_{i} \in \varSigma\)fori = 1, …, k.Thex i s are called the characters of the string, and k is the length of the string. If the alphabet \(\varSigma\)is ordered, the lexicographical order on the set of strings over \(\varSigma\)is defined by declaring a string \(x = x_{1}x_{2}x_{3}\ldots x_{k}\)smaller than a string \(y = y_{1}y_{2}y_{3}\ldots y_{l}\)if either there exists a j ≥ 1 such that \(x_{i} = y_{i}\)for 1 ≤ i < j and \(x_{j} <y_{j}\)or if k < l and \(x_{i} = y_{i}\)for 1 ≤ i ≤ 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 to the strings to be sorted. The output is a...
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Recommended Reading
Aggarwal A, Vitter JS (1988) The input/output complexity of sorting and related problems. Commun ACM 31:1116–1127
Andersson A, Nilsson S (1994) A new efficient radix sort. In: Proceedings of the 35th annual symposium on foundations of computer science (FOCS’94), Santa Fe. IEEE Computer Society Press, pp 714–721
Andersson A, Nilsson S (1998) Implementing radixsort. ACM J Exp Algorithmics 3:7
Arge L, Ferragina P, Grossi R, Vitter JS (1997) On sorting strings in external memory (extended abstract). In: Proceedings of the 29th annual ACM symposium on theory of computing (STOC’97), El Paso. ACM, pp 540–548
Bentley J, Sedgewick R (1998) Algorithm alley: sorting strings with three-way radix quicksort. Dr Dobb’s J Softw Tools 23:133–134, 136–138
Bentley JL, McIlroy MD (1993) Engineering a sort function. Softw Pract Exp 23:1249–1265
Fagerberg R, Pagh A, Pagh R (2006) External string sorting: faster and cache-oblivious. In: Proceedings of the 23rd annual symposium on theoretical aspects of computer science (STACS’06), Marseille. LNCS, vol 3884. Springer, pp 68–79
Franceschini G, Grossi R (2004) 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), Turku. LNCS, vol 3142. Springer, pp 606–617
Franceschini G, Grossi R (2005) Optimal in-place sorting of vectors and records. In: Proceedings of the 32nd international colloquium on automata, languages and programming (ICALP’05), Lisbon. LNCS, vol 3580. Springer, pp 90–102
Grossi R, Italiano GF (1999) Efficient techniques for maintaining multidimensional keys in linked data structures. In: Proceedings of the 26th international colloquium on automata, languages and programming (ICALP’99), Prague. LNCS, vol 1644. Springer, pp 372–381
Han Y, Thorup M (2002) 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), Vancouver. IEEE Computer Society Press, pp 135–144
McIlroy PM, Bostic K, McIlroy MD (1993) Engineering radix sort. Comput Syst 6:5–27
Mehlhorn K (1979) Dynamic binary search. SIAM J Comput 8:175–198
Sedgewick, R (2003) Algorithms in Java, Parts 1–4, 3rd edn. Addison-Wesley, Boston
Sedgewick R, Bentley J (1997) Fast algorithms for sorting and searching strings. In: Proceedings of the 8th annual ACM-SIAM symposium on discrete algorithms (SODA’97), New Orleans. ACM, pp 360–369
Sinha R, Zobel J, Ring D (2006) Cache-efficient string sorting using copying. ACM J Exp Algorithmics 11: Article No. 1.2
Acknowledgements
Research supported by Danish Council for Independent Research, Natural Sciences.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer Science+Business Media New York
About this entry
Cite this entry
Fagerberg, R. (2016). String Sorting. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_408
Download citation
DOI: https://doi.org/10.1007/978-1-4939-2864-4_408
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4939-2863-7
Online ISBN: 978-1-4939-2864-4
eBook Packages: Computer ScienceReference Module Computer Science and Engineering