Further analysis of the remedian algorithm

  • Authors:
  • Domenico Cantone;Micha Hofri

  • Affiliations:
  • Dipartimento di Matematica e Informatica, University of Catania, Viale Andrea Doria 6, I-95125 Catania, Italy;Department of Computer Science, Worcester Polytechnic Institute, 100 Institute Road, Worcester, MA 01609-2280, USA

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2013

Quantified Score

Hi-index 5.23

Visualization

Abstract

We present an analysis of the remedian, an efficient, known algorithm, for the approximate median selection problem, that is easy to implement. The algorithm can be used for data in an array, as well as for streaming data. In an array it performs in-place, recursively dividing the candidate values into sets of size b, from which exact medians are selected for the next phase. On streaming data it performs a filter operation, requiring, by the time n items are processed, the storage of log"bn candidate entries. The contribution of the article is a precise characterization, combinatorial and asymptotic, of the accuracy of the algorithm, showing explicitly the role of the critical design parameter b. In addition, we compute the time and space costs of the algorithm, and present experimental illustrations of its accuracy.