Skip to main content

Equivalence Between Priority Queues and Sorting

2002; Thorup

  • Reference work entry
Encyclopedia of Algorithms
  • 262 Accesses

Keywords and Synonyms

Heap          

Problem Definition

A priority queue is an abstract data structure that maintains a set Q of elements, each with an associated value called a key, under the following set of operations [4,7].

insert \( { (Q, x, k) } \)::

Inserts element x with key k into Q.

find-min \( { (Q) } \)::

Returns an element of Q with the minimum key, but does not change Q.

delete \( { (Q, x, k) } \)::

Deletes element x with key k from Q.

Additionally, the following operations are often supported.

delete-min \( { (Q) } \)::

Deletes an element with the minimum key value from Q, and returns it.

decrease-key \( { (Q, x, k) } \)::

Decreases the current key \( { k^{\prime} } \) of x to k assuming \( { k < k^{\prime} } \).

meld \( { (Q_{1}, Q_{2}) } \)::

Given priority queues Q 1 and Q 2, returns the priority queue \( { Q_{1} \cup Q_{2} } \).

Observe that a delete-min can be implemented as a find-min followed by a delete, a decrease-key as a delete followed by an insert, and a meldas...

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 399.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Alstrup, S., Husfeldt, T., Rauhe, T., Thorup, M.: Black box for constant-time insertion in priority queues (note). ACM TALG 1(1), 102–106 (2005)

    Article  MathSciNet  Google Scholar 

  2. Andersson, A.: Faster deterministic sorting and searching in linear space. In: Proc. 37th FOCS, 1998, pp. 135–141

    Google Scholar 

  3. Andersson, A., Hagerup, T., Nilsson, S., Raman, R.: Sorting in linear time? J. Comp. Syst. Sci. 57, 74–93 (1998). Announced at STOC'95

    Article  MathSciNet  MATH  Google Scholar 

  4. Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge, MA (2001)

    MATH  Google Scholar 

  5. Fredman, M., Willard, D.: Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci. 47, 424–436 (1993). Announced at STOC'90

    Article  MathSciNet  MATH  Google Scholar 

  6. Fredman, M., Willard, D.: Trans‐dichotomous algorithms for minimum spanning trees and shortest paths. J. Comput. Syst. Sci. 48, 533–551 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  7. Fredman, M., Tarjan, R.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  8. Han, Y.: Improved fast integer sorting in linear space. Inf. Comput. 170(8), 81–94 (2001). Announced at STACS'00 and SODA'01

    Article  MATH  Google Scholar 

  9. Han, Y.: Deterministic sorting in \( { O(n \log\log{n}) } \) time and linear space. J. Algorithms 50(1), 96–105 (2004). Announced at STOC'02

    Article  MathSciNet  MATH  Google Scholar 

  10. Han, Y., Thorup, M.: Integer sorting in \( { O(n\sqrt{\log\log{n}}) } \) expected time and linear space. In: Proc. 43rd FOCS, 2002, pp. 135–144

    Google Scholar 

  11. Mendelson, R., Tarjan, R., Thorup, M., Zwick, U.: Melding priority queues. ACM TALG 2(4), 535–556 (2006). Announced at SODA'04

    Article  MathSciNet  Google Scholar 

  12. Pagh, A., Pagh, R., Thorup, M.: On adaptive integer sorting. In: Proc. 12th ESA, 2004, pp. 556–579

    Google Scholar 

  13. Thorup, M.: Faster deterministic sorting and priority queues in linear space. In: Proc. 9th SODA, 1998, pp. 550–555

    Google Scholar 

  14. Thorup, M.: On RAM priority queues. SIAM J. Comput. 30(1), 86–109 (2000). Announced at SODA'96

    Article  MathSciNet  MATH  Google Scholar 

  15. Thorup, M.: Equivalence between priority queues and sorting. In: Proc. 43rd FOCS, 2002, pp. 125–134

    Google Scholar 

  16. Thorup, M.: Randomized sorting in \( { O(n\log\log n) } \) time and linear space using addition, shift, and bit-wise boolean operations. J. Algorithms 42(2), 205–230 (2002). Announced at SODA'97

    Article  MathSciNet  MATH  Google Scholar 

  17. Thorup, M.: Integer priority queues with decrease key in constant time and the single source shortest paths problem. J. Comput. Syst. Sci. (special issue on STOC'03) 69(3), 330–353 (2004)

    Google Scholar 

  18. Vollmer, H.: Introduction to circuit complexity: a uniform approach. Springer, New York (1999)

    Book  Google Scholar 

  19. Willard, D.: Examining computational geometry, van Emde Boas trees, and hashing from the perspective of the fusion tree. SIAM J. Comput. 29(3), 1030–1049 (2000). Announced at SODA'92

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag

About this entry

Cite this entry

Chowdhury, R. (2008). Equivalence Between Priority Queues and Sorting. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30162-4_127

Download citation

Publish with us

Policies and ethics