The magic of a number system

  • Authors:
  • Amr Elmasry;Claus Jensen;Jyrki Katajainen

  • Affiliations:
  • Max-Planck Institut für Informatik, Saarbrücken, Germany;The Royal Library, Copenhagen, Denmark;Department of Computer Science, University of Copenhagen, Denmark

  • Venue:
  • FUN'10 Proceedings of the 5th international conference on Fun with algorithms
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce a new number system that supports increments with a constant number of digit changes. We also give a simple method that extends any number system supporting increments to support decrements using the same number of digit changes. In the new number system the weight of the ith digit is 2i-1, and hence we can implement a priority queue as a forest of heap-ordered complete binary trees. The resulting data structure guarantees O(1) worst-case cost per insert and O(lg n) worst-case cost per delete, where n is the number of elements stored.