Skip to main content
Log in

A priority queue in which initialization and queue operations takeO(loglogD) time

  • Published:
Mathematical systems theory Aims and scope Submit manuscript


Many computer algorithms have embedded in them a subalgorithm called a priority queue which produces on demand an element of extreme priority among elements in the queue. Queues on unrestricted priority domains have a running time of Θ(nlogn) for sequences ofn queue operations. We describe a simple priority queue over the priority domain {1,⋯,N} in which initialization, insertion, and deletion takeO(loglogD) time, whereD is the difference between the next lowest and next highest priority elements in the queue. In the case of initialization,D=Θ(N). Finding a least element, greatest element, and the neighbor in priority order of some specified element take constant time. We also consider dynamic space allocation for the data structures used. Space can be allocated in blocks of size Θ(N 1/p), for small integerp.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others


  1. A. V. Aho, J. E. Hopcroft, and J. D. Ullman.The Design and Analysis of Computer Algorithms. Addison-Wesley (1974)

  2. M. R. Brown. Implementation and analysis of binomial queue algorithms,SIAM J. Comput. 7, 298–319 (1978)

    Google Scholar 

  3. C. A. Crane. Linear lists and priority queues as balanced binary trees, (Ph.D. Thesis)STAN-CS-72-259, Computer Science Department. Stanford University (February 1972)

  4. D. B. Johnson. Efficient special purpose priority queues,Proc. 15th Annual Allerton Conference on Communication, Control, andComputing. Department of Electrical Engineering and the Coordinated Science Laboratory, University of Illinois, 1–7 (1977)

  5. D. B. Johnson. Efficient algorithms for shortest paths in sparse networks,J. ACM 24, 1–13 (1977)

    Google Scholar 

  6. D. B. Johnson. Priority queues with update and finding minimum spanning trees,Information Processing Letters 4, 53–57 (1975)

    Google Scholar 

  7. A. Jonassen and O.-J. Dahl. Analysis of an algorithm for priority queue administration,BIT 15, 409–422 (1975)

    Google Scholar 

  8. D. E. Knuth.The Art of Computer Programming, Volume 3/Sorting and Searching. Addison-Wesley (1973)

  9. D. E. Knuth.Notes on the van Emde Boas construction of priority deques: An instructive use of recursion (unpublished notes March 1977)

  10. P. Van Emde Boas. Preserving order in a forest in less than logarithmic time,Proc. Sixteenth IEEE Conference on Foundations of Computer Science. Berkeley, California, 75–84 (1975)

  11. P. Van Emde Boas, R. Kaas, and E. Zijlstra. Design and implementation of an efficient priority queue,Mathematical Systems Theory 10, 99–127 (1977)

    Google Scholar 

  12. P. Van Emde Boas. Preserving order in a forest in less than logarithmic time and linear space,Information Processing Letters 6, 80–82 (1977)

    Google Scholar 

Download references

Author information

Authors and Affiliations


Additional information

This research was supported by the National Science Foundation under grants MCS 77-21092 and MCS 80-002684.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Johnson, D.B. A priority queue in which initialization and queue operations takeO(loglogD) time. Math. Systems Theory 15, 295–309 (1981).

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: