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) Classification
Design Technique 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 SourceFisher-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 SourceReader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.