Analysis of Boyer and Moore's MJRTY algorithm

  • Authors:
  • Laurent Alonso;Edward M. Reingold

  • Affiliations:
  • INRIA-Lorraine and LORIA, Université Henri Poincaré-Nancy I, BP 239, 54506 Vandoeuvre-lès-Nancy, France;Department of Computer Science, Illinois Institute of Technology, 10 West 31st Street, Chicago, IL 60616-3729, USA

  • Venue:
  • Information Processing Letters
  • Year:
  • 2013

Quantified Score

Hi-index 0.89

Visualization

Abstract

Given a set of n elements each of which is either red or blue, Boyer and Moore@?s MJRTY algorithm uses pairwise equal/not equal color comparisons to determine the majority color. We analyze the average behavior of their algorithm, proving that if all 2^n possible inputs are equally likely, the average number of color comparisons used is n-2n/@p+O(1) with variance (@p-2)n/@p-2n/@p+O(1).