Fisher–Yates shuffle

 

Title: Fisher–Yates shuffle
Author: Manuel Eberl
Submission date: 2016-09-30
Abstract:

This work defines and proves the correctness of the Fisher–Yates algorithm for shuffling – i.e. producing a random permutation – of a list. The algorithm proceeds by traversing the list and in each step swapping the current element with a random element from the remaining list.

BibTeX:
@article{Fisher_Yates-AFP,
  author  = {Manuel Eberl},
  title   = {Fisher–Yates shuffle},
  journal = {Archive of Formal Proofs},
  month   = sep,
  year    = 2016,
  note    = {\url{http://isa-afp.org/entries/Fisher_Yates.shtml},
            Formal proof development},
  ISSN    = {2150-914x},
}
License: BSD License