Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Fisher-Yates Shuffle

Sorting Algorithm

The Fisher-Yates shuffle is an algorithm for shuffling a finite sequence, taking a list of all the sequence's elements and continually drawing the next element of the shuffled output at random from the elements remaining. It produces an unbiased permutation, meaning every possible permutation is equally likely, and the modern version runs in time proportional to the number of items being shuffled and rearranges them in place. It is named after Ronald Fisher and Frank Yates, who first described it, and is also known as the Knuth shuffle after Donald Knuth; a variant called Sattolo's algorithm generates random cyclic permutations instead of random permutations.

Facts
Time Complexity
Time Complexity (category)
Linear Time -- O(n) 1
Classification
Design Technique
Randomized 1
Connections

In Field

Source Fisher-Yates shuffle (Wikipedia)

Uses Design Technique

Sources
1. Fisher-Yates Shuffle (Wikipedia)
  • Wikipedia infobox: time complexity linear
    linear
  • Wikipedia: design technique randomized
    randomized
View the Source
Fisher-Yates shuffle (Wikipedia)
  • In Field: Algorithms and Complexity Theory, Lead sentence
    Fisher-Yates shuffle is an algorithm for shuffling a finite sequence.
  • In Group: Shuffling and Permutation Generation Algorithms, Lead section
    is an algorithm for shuffling a finite sequence
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.