Practical algorithms for generating a random ordering of the elements of a weighted set

  • Authors:
  • Kevin J. Lang

  • Affiliations:
  • Yahoo! Research

  • Venue:
  • FUN'12 Proceedings of the 6th international conference on Fun with Algorithms
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper discusses the problem of efficiently generating a random ordering of the elements of an n-element weighted set, where the elements' weights are interpreted as relative probabilities. The paper reviews the current status of this problem, which includes a purely theoretical algorithm with the optimal O(n) cost, then presents several new algorithms that are simple, practical and nearly optimal, including one with an expected cost of O(n loglogn) on worst-case inputs, and another one with an expected cost of O(n) when the weights are randomly chosen from distributions that are believed to be ubiquitous in the real world. It is still an open question whether there exists a practical algorithm with O(n) expected cost on worst case inputs.