Abstract
We present multikey quickselect: an efficient, in-place, easy-to-implement algorithm for the selection problem for strings. We analyze its expected cost under a uniform model, measured as the number of character comparisons and pointer swaps, depending on the alphabet cardinality. From the analysis, we derive a binary variant of the algorithm, which is more efficient when the range of values for the alphabet is known. This variant can also be applied to multikey quicksort.




Similar content being viewed by others
References
Bentley, J.L., McIlroy, M.D.: Engineering a sort function. Softw. Pract. Exp. 23(11), 1249–1265 (1993)
Bentley, J.L., Sedgewick, R.: Fast algorithms for sorting and searching strings. In: SODA’97: Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 360–369. Society for Industrial and Applied Mathematics, Philadelphia (1997)
Clément, J., Flajolet, P., Vallée, B.: Dynamical sources in information theory: a general analysis of trie structures. Algorithmica 29(1), 307–369 (2001)
Franceschini, G., Grossi, R.: A general technique for managing strings in comparison-driven data structures. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP’04: Proceedings of the 31st International Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 3142, pp. 606–617. Springer, Berlin/Heidelberg (2004)
Frias, L.: On the number of string lookups in BSTs (and related algorithms) with digital access. Technical report LSI-09-14-R, Universitat Politècnica de Catalunya, Departament de Llenguatges i Sistemes Informàtics (2009). http://www.lsi.upc.edu/dept/techreps/llistat_detallat.php?id=1053
Grossi, R., Italiano, G.F.: Efficient techniques for maintaining multidimensional keys in linked data structures. In: Wiedermann, J., van Emde Boas, P., Nielsen, M. (eds.) Automata, Languages and Programming, 26th International Colloquium, ICALP’99, Prague, Czech Republic, July 11–15, 1999. Lecture Notes in Computer Science, vol. 1644, pp. 372–381. Springer, Berlin/Heidelberg (1999)
Hildebrandt, P., Isbitz, H.: Radix exchange—an internal sorting method for digital computers. J. ACM 6(2), 156–163 (1959)
International Standard ISO/IEC 14882: Programming Languages—C++, 3rd edn. (2011). American National Standard Institute
Kärkkäinen, J., Rantala, T.: Engineering radix sort for strings. In: Amir, A., Turpin, A., Moffat, A. (eds.) String Processing and Information Retrieval, 15th International Symposium, SPIRE 2008, Melbourne, Australia, November 10–12, 2008. Lecture Notes in Computer Science, vol. 5280, pp. 3–14. Springer, Berlin/Heidelberg (2008)
Kim, E., Park, K.: Improving multikey quicksort for sorting strings with many equal elements. Inf. Process. Lett. 109(9), 454–459 (2009)
Mahmoud, H., Flajolet, P., Jacquet, P., Régnier, M.: Analytic variations on bucket selection and sorting. Acta Inform. 36(9–10), 735–760 (2000)
Mahmoud, H.M., Modarres, R., Smythe, R.T.: Analysis of quickselect: an algorithm for order statistics. RAIRO Theor. Inform. Appl. 29(4), 255–276 (1995)
Martínez, C., Roura, S.: Optimal sampling strategies in quicksort and quickselect. SIAM J. Comput. 31(3), 683–705 (2001)
Mcilroy, P.M., Bostic, K., Mcilroy, M.D.: Engineering radix sort. Comput. Syst. 6, 5–27 (1993)
Roura, S.: Digital access to comparison-based tree data structures and algorithms. J. Algorithms 40(1), 1–23 (2001)
Roura, S.: Improved master theorems for divide-and-conquer recurrences. J. ACM 48(2), 170–205 (2001)
Sinha, R., Wirth, A.: Engineering burstsort: towards fast in-place string sorting. In: McGeoch, C.C. (ed.) Experimental Algorithms, 7th International Workshop, WEA 2008, Provincetown, MA, USA, May 30–June 1, 2008. Lecture Notes in Computer Science, vol. 5038, pp. 14–27. Springer, Berlin/Heidelberg (2008)
Vallée, B., Clément, J., Fill, J.A., Flajolet, P.: The number of symbol comparisons in quicksort and quickselect. In: 36th International Colloquium on Automata, Languages and Programming (ICALP 2009). Lecture Notes in Computer Science, vol. 5555, pp. 750–763. Springer, Berlin/Heidelberg (2009)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Frias, L., Roura, S. Multikey Quickselect. Algorithmica 69, 958–973 (2014). https://doi.org/10.1007/s00453-013-9775-2
Received:
Accepted:
Published:
Issue date:
DOI: https://doi.org/10.1007/s00453-013-9775-2
