10 integers. 3,628,800 possible arrangements. Here is one.
A shuffle poses a precise mathematical question: given n distinct objects, produce one of the n! possible orderings, each with identical probability. For 10 integers, that means 3,628,800 permutations. The sequence above was selected from that space with uniform probability, generated entirely inside your browser using the Fisher-Yates algorithm and the Web Cryptography API.
Ronald Fisher and Frank Yates described the original shuffling method in their 1938 book Statistical Tables for Biological, Agricultural and Medical Research. Donald Knuth later refined it for computer implementation in The Art of Computer Programming (1969). The modern version walks backward through the array. At each position, it selects a random element from the remaining unshuffled portion and swaps them. One pass through the data produces a perfect uniform shuffle in O(n) time using O(1) extra space.
The correctness proof shows that after processing position k, each of the k! possible sub-arrangements of the first k elements is equally likely. By induction, the final result covers all n! permutations with uniform probability. A common implementation error, the "naive shuffle," selects from the entire array at each step instead of the unprocessed portion. This produces nn swap sequences mapping onto n! permutations. Since nn is generally indivisible by n!, some permutations become more likely than others. The Fisher-Yates algorithm avoids this entirely.
Factorial growth outpaces every other common mathematical function. Ten items produce 3,628,800 arrangements. Twenty items produce over 2.4 quintillion. A standard deck of 52 cards generates approximately 8.07 \xC3\x97 10\xE2\x81\xB6\xE2\x81\xB7 possible orderings. That number exceeds the estimated count of atoms in the observable universe.
Consider: if every atom in the universe shuffled a deck once per nanosecond, and had been doing so since the Big Bang 13.8 billion years ago, the total shuffles performed would still be a vanishingly small fraction of 52!. Every shuffle you perform on this page almost certainly creates an arrangement that has never existed before and will never exist again.
A fixed point is a number that ends up in its original position after shuffling. Watch for the gold-ringed circles above: those are your fixed points. The expected number of fixed points is exactly 1, regardless of how many items you shuffle. Ten items, one expected fixed point. Ten thousand items, still one.
The probability that a specific element stays fixed is 1/n. Summed over n elements, the expected count equals 1. This result, connected to the mathematical concept of derangements studied by Leonhard Euler, means roughly 36.8% of all shuffles have zero fixed points, 36.8% have exactly one, 18.4% have exactly two, and the probabilities drop rapidly beyond.
Persi Diaconis and Dave Bayer proved in 1992 that a standard riffle shuffle of a 52-card deck requires exactly seven iterations to reach adequate randomization. A digital Fisher-Yates shuffle achieves what seven physical riffle shuffles approximate: perfect uniform randomization in one computational pass.
Have each student visit /sequence/1/10 and shuffle once. Then ask: did any two students produce the same order? With 3,628,800 possible arrangements, matching is extraordinarily unlikely. For a projector demonstration, open /sequence/1/52 and shuffle repeatedly. The vivid rings scatter into new patterns each time, making randomness immediately visual. The tool requires no accounts, sets no cookies, and stores no student data.
Send this link. They get the same range, their own unique permutation.
Daily Inspiration
Jury-selected work from the A' Design Award, presented fresh each morning.