perfect shuffle


Definition: Split a list of elements (or deck of cards) exactly in half then precisely interleave the two halves.

Generalization (I am a kind of ...)
deterministic algorithm.

See also ideal random shuffle.

Author: PEB

More information

Historical Note
For several years I defined "perfect shuffle" to mean an algorithm that randomly shuffles (permutes) elements with a uniform chance of getting any particular permutation. I now call that an "ideal random shuffle", after Oleg, since "perfect shuffle" has been far more widely used for decades to mean the above (see for instance, Donald E. Knuth, "The Art of Computer Programming", 2nd edition, Vol 3, Exercises for Sect. 5.3.4, number 13, page 237).

Go to the Dictionary of Algorithms and Data Structures home page.

If you have suggestions, corrections, or comments, please get in touch with Paul Black.

Entry modified 9 January 2009.
HTML page formatted Wed Mar 13 12:42:46 2019.

Cite this as:
Paul E. Black, "perfect shuffle", in Dictionary of Algorithms and Data Structures [online], Paul E. Black, ed. 9 January 2009. (accessed TODAY) Available from: