Priority Queues, Pairing, and Adaptive Sorting

  • Authors:
  • Amr Elmasry

  • Affiliations:
  • -

  • Venue:
  • ICALP '02 Proceedings of the 29th International Colloquium on Automata, Languages and Programming
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce Binomialsort, an adaptive sorting algorithm that is optimal with respect to the number of inversions. The number of comparisons performed by Binomialsort, on an input sequence of length n that has I inversions, is at most 2n log I/n + O(n). The bound on the number of comparisons is further reduced to 1.89n log I/n + O(n) by using a new structure, which we call trinomial queues. The fact that the algorithm is simple and relies on fairly simple structures makes it a good candidate in practice.