Skip to main content

Interval Sorting

  • Conference paper
Automata, Languages and Programming (ICALP 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6198))

Included in the following conference series:

Abstract

In the interval sort problem, we are given an array A of n items and p ranges of ranks I 1 = [ℓ1,u 1], ..., I p  = [ℓ p ,u p ]. The goal is to rearrange the array so that A[ℓ t ..u t ] contains the ℓ t -th, ..., u t -th smallest elements of A in nondecreasing order, for all t, 1 ≤ t ≤ p, and A[u t  + 1..ℓ t + 1− 1] contains the (u t  + 1), ..., (ℓ t + 1− 1) smallest elements of A, for all t, 0 ≤ t ≤ p. That is, the array is sorted by blocks, with sorted and unsorted blocks alternating. One of the most interesting aspects of this research is the unification of several important and related problems (sorting, selection, multiple selection, partial sorting) under a single framework. Results on interval sorting generalize the results for any of these particular—and fundamental—problems.

We propose a divide-and-conquer algorithm, owing to quicksort and quickselect, named chunksort, to solve the problem. We give an exact expression for the average number of comparisons made by the basic variant of chunksort. Then we consider what is the expected optimal number of comparisons needed to solve an interval sort instance and we design a variant of chunksort that achieves near optimal expected performance, up to n + o(n) comparisons. In fact, we conjecture that the algorithm that we propose has actually optimal expected performance up to o(n) terms and provide some evidence for this conjecture.

This research was supported by the Spanish Min. of Science and Technology project TIN2007–66523 (FORMALISM) and the Catalonian Government program for research groups under contract 2009 SGR 1137.

We thank Amalia Duch for her useful comments and suggestions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Blum, M., Floyd, R., Pratt, V., Rivest, R., Tarjan, R.: Time bounds for selection. J. Comp. Syst. Sci. 7, 448–461 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  2. Hoare, C.: Find (Algorithm 65). Comm. ACM 4, 321–322 (1961)

    Article  Google Scholar 

  3. Hoare, C.: Quicksort. Computer Journal 5, 10–15 (1962)

    Article  MATH  MathSciNet  Google Scholar 

  4. Kaligosi, K., Mehlhorn, K., Munro, J., Sanders, P.: Towards optimal multiple selection. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 103–114. Springer, Heidelberg (2005)

    Google Scholar 

  5. Kuba, M.: On quickselect, partial sorting and multiple quickselect. Inform. Process. Lett. 99(5), 181–186 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  6. Martínez, C.: Partial quicksort. In: Arge, L., Italiano, G., Sedgewick, R. (eds.) Proc. of the 6th ACM-SIAM Workshop on Algorithm Engineering and Experiments (ALENEX) and the 1st ACM-SIAM Workshop on Analytic Algorithmics and Combinatorics (ANALCO), pp. 224–228 (2004)

    Google Scholar 

  7. Martínez, C., Panario, D., Viola, A.: Adaptive sampling for quickselect. In: Proc. of the 15th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 440–448 (2004)

    Google Scholar 

  8. Martínez, C., Roura, S.: Optimal sampling strategies in quicksort and quickselect. SIAM J. Comput. 31(3), 683–705 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  9. Mehlhorn, K.: Data Structures and Efficient Algorithms. Sorting and Searching, vol. 1. Springer, Heidelberg (1984)

    Google Scholar 

  10. Prodinger, H.: Multiple Quickselect — Hoare’s Find algorithm for several elements. Inform. Process. Lett. 56(3), 123–129 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  11. Yao, F.: Efficient dynamic programming using quadrangle inequalities. In: Proc. of the 12th Annual ACM Symposium on the Theory of Computing (STOC), pp. 429–435 (1980)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jiménez, R.M., Martínez, C. (2010). Interval Sorting . In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds) Automata, Languages and Programming. ICALP 2010. Lecture Notes in Computer Science, vol 6198. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14165-2_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14165-2_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14164-5

  • Online ISBN: 978-3-642-14165-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics