Riffle shuffle permutation
In the mathematics of permutations and the study of shuffling playing cards, a riffle shuffle permutation is one of the permutations of a set of [math]\displaystyle{ n }[/math] items that can be obtained by a single riffle shuffle, in which a sorted deck of [math]\displaystyle{ n }[/math] cards is cut into two packets and then the two packets are interleaved (e.g. by moving cards one at a time from the bottom of one or the other of the packets to the top of the sorted deck). Beginning with an ordered set (1 rising sequence), mathematically a riffle shuffle is defined as a permutation on this set containing 1 or 2 rising sequences.[1] The permutations with 1 rising sequence are the identity permutations.
As a special case of this, a [math]\displaystyle{ (p,q) }[/math]-shuffle, for numbers [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] with [math]\displaystyle{ p+q=n }[/math], is a riffle in which the first packet has [math]\displaystyle{ p }[/math] cards and the second packet has [math]\displaystyle{ q }[/math] cards.[2]
Combinatorial enumeration
Since a [math]\displaystyle{ (p,q) }[/math]-shuffle is completely determined by how its first [math]\displaystyle{ p }[/math] elements are mapped, the number of [math]\displaystyle{ (p,q) }[/math]-shuffles is [math]\displaystyle{ \binom{p+q}{p}. }[/math]
However, the number of distinct riffles is not quite the sum of this formula over all choices of [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math] adding to [math]\displaystyle{ n }[/math] (which would be [math]\displaystyle{ 2^n }[/math]), because the identity permutation can be represented in multiple ways as a [math]\displaystyle{ (p,q) }[/math]-shuffle for different values of [math]\displaystyle{ p }[/math] and [math]\displaystyle{ q }[/math]. Instead, the number of distinct riffle shuffle permutations of a deck of [math]\displaystyle{ n }[/math] cards, for [math]\displaystyle{ n=1,2,3,\dots }[/math], is
More generally, the formula for this number is [math]\displaystyle{ 2^n-n }[/math]; for instance, there are 4503599627370444 riffle shuffle permutations of a 52-card deck.
The number of permutations that are both a riffle shuffle permutation and the inverse permutation of a riffle shuffle is[3] [math]\displaystyle{ \binom{n+1}{3}+1. }[/math] For [math]\displaystyle{ n=1,2,3,\dots }[/math], this is
and for [math]\displaystyle{ n=52 }[/math] there are exactly 23427 invertible shuffles.
Random distribution
The Gilbert–Shannon–Reeds model describes a random probability distribution on riffle shuffles that is a good match for observed human shuffles.Cite error: Closing </ref>
missing for <ref>
tag
Perfect shuffles
A perfect shuffle is a riffle in which the deck is split into two equal-sized packets, and in which the interleaving between these two packets strictly alternates between the two. There are two types of perfect shuffle, an in shuffle and an out shuffle, both of which can be performed consistently by some well-trained people. When a deck is repeatedly shuffled using these permutations, it remains much less random than with typical riffle shuffles, and it will return to its initial state after only a small number of perfect shuffles. In particular, a deck of 52 playing cards will be returned to its original ordering after 52 in shuffles or 8 out shuffles. This fact forms the basis of several magic tricks.[4]
Algebra
Riffle shuffles may be used to define the shuffle algebra. This is a Hopf algebra where the basis is a set of words, and the product is the shuffle product denoted by the sha symbol ш, the sum of all riffle shuffles of two words.
In exterior algebra, the wedge product of a [math]\displaystyle{ p }[/math]-form and a [math]\displaystyle{ q }[/math]-form can be defined as a sum over [math]\displaystyle{ (p,q) }[/math]-shuffles.[2]
See also
- Gilbreath permutations, the permutations formed by reversing one of the two packets of cards before riffling them
References
- ↑ "Shuffling cards and stopping times", The American Mathematical Monthly 93 (5): 333–348, 1986, doi:10.2307/2323590, https://statweb.stanford.edu/~cgates/PERSI/papers/aldous86.pdf
- ↑ 2.0 2.1 Weibel, Charles (1994). An Introduction to Homological Algebra, p. 181. Cambridge University Press, Cambridge.
- ↑ Atkinson, M. D. (1999), "Restricted permutations", Discrete Mathematics 195 (1–3): 27–38, doi:10.1016/S0012-365X(98)00162-9.
- ↑ "The mathematics of perfect shuffles", Advances in Applied Mathematics 4 (2): 175–196, 1983, doi:10.1016/0196-8858(83)90009-X.
Original source: https://en.wikipedia.org/wiki/Riffle shuffle permutation.
Read more |