Riffle Shuffle Permutation
   HOME

TheInfoList



OR:

In the mathematics of
permutation In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
s and the study of
shuffling Shuffling is a procedure used to randomize a deck of playing cards to provide an element of chance in card games. Shuffling is often followed by a cut, to help ensure that the shuffler has not manipulated the outcome. __TOC__ Techniques Overha ...
playing card A playing card is a piece of specially prepared card stock, heavy paper, thin cardboard, plastic-coated paper, cotton-paper blend, or thin plastic that is marked with distinguishing motifs. Often the front (face) and back of each card has a fi ...
s, a riffle shuffle permutation is one of the
permutation In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
s of a set of n items that can be obtained by a single
riffle shuffle Shuffling is a procedure used to randomize a deck of playing cards to provide an element of chance in card games. Shuffling is often followed by a cut, to help ensure that the shuffler has not manipulated the outcome. __TOC__ Techniques Overha ...
, in which a sorted deck of n 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. The permutations with 1 rising sequence are the identity permutations. As a special case of this, a (p,q)-shuffle, for numbers p and q with p+q=n, is a riffle in which the first packet has p cards and the second packet has q cards.Weibel, Charles (1994). ''An Introduction to Homological Algebra'', p. 181. Cambridge University Press, Cambridge.


Combinatorial enumeration

Since a (p,q)-shuffle is completely determined by how its first p elements are mapped, the number of (p,q)-shuffles is \binom. However, the number of distinct riffles is not quite the sum of this formula over all choices of p and q adding to n (which would be 2^n), because the
identity permutation In mathematics, a permutation group is a group ''G'' whose elements are permutations of a given set ''M'' and whose group operation is the composition of permutations in ''G'' (which are thought of as bijective functions from the set ''M'' to it ...
can be represented in multiple ways as a (p,q)-shuffle for different values of p and q. Instead, the number of distinct riffle shuffle permutations of a deck of n cards, for n=1,2,3,\dots, is More generally, the formula for this number is 2^n-n; 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. \binom+1. For n=1,2,3,\dots, this is and for n=52 there are exactly 23427 invertible shuffles.


Random distribution

The
Gilbert–Shannon–Reeds model In the mathematics of shuffling playing cards, the Gilbert–Shannon–Reeds model is a probability distribution on riffle shuffle permutations that has been reported to be a good match for experimentally observed outcomes of human shuffling, and th ...
describes a random
probability distribution In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon i ...
on riffle shuffles that is a good match for observed human shuffles. In this model, the
identity permutation In mathematics, a permutation group is a group ''G'' whose elements are permutations of a given set ''M'' and whose group operation is the composition of permutations in ''G'' (which are thought of as bijective functions from the set ''M'' to it ...
has probability (n+1)/2^n of being generated, and all other riffle permutations have equal probability 1/2^n of being generated. Based on their analysis of this model, mathematicians have recommended that a deck of 52 cards be given seven riffles in order to thoroughly randomize it.


Permutation patterns

A
pattern A pattern is a regularity in the world, in human-made design, or in abstract ideas. As such, the elements of a pattern repeat in a predictable manner. A geometric pattern is a kind of pattern formed of geometric shapes and typically repeated l ...
in a permutation is a smaller permutation formed from a subsequence of some k values in the permutation by reducing these values to the range from 1 to k while preserving their order. Several important families of permutations can be characterized by a finite set of forbidden patterns, and this is true also of the riffle shuffle permutations: they are exactly the permutations that do not have 321, 2143, and 2413 as patterns. Thus, for instance, they are a subclass of the
vexillary permutation In mathematics, a vexillary permutation is a permutation ''μ'' of the positive integers containing no subpermutation isomorphic to the permutation (2143); in other words, there do not exist four numbers ''i'' < ''j'' < ''k''&nb ...
s, which have 2143 as their only minimal forbidden pattern.


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 The faro shuffle (American), weave shuffle (British), or dovetail shuffle is a method of shuffling playing cards, in which half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to th ...
and an
out shuffle The faro shuffle (American), weave shuffle (British), or dovetail shuffle is a method of shuffling playing cards, in which half of the deck is held in each hand with the thumbs inward, then cards are released by the thumbs so that they fall to th ...
, 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..


Algebra

Riffle shuffles may be used to define the
shuffle algebra In mathematics, a shuffle algebra is a Hopf algebra with a basis corresponding to words on some set, whose product is given by the shuffle product ''X'' ⧢ ''Y'' of two words ''X'', ''Y'': the sum of all ways of interlacing them. The interlacing i ...
. This is a
Hopf algebra Hopf is a German surname. Notable people with the surname include: *Eberhard Hopf (1902–1983), Austrian mathematician *Hans Hopf (1916–1993), German tenor *Heinz Hopf (1894–1971), German mathematician *Heinz Hopf (actor) (1934–2001), Swedis ...
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 In mathematics, the exterior algebra, or Grassmann algebra, named after Hermann Grassmann, is an algebra that uses the exterior product or wedge product as its multiplication. In mathematics, the exterior product or wedge product of vectors is ...
, the wedge product of a p-form and a q-form can be defined as a sum over (p,q)-shuffles.


See also

* Gilbreath permutations, the permutations formed by reversing one of the two packets of cards before riffling them


References

{{reflist Card shuffling Permutation patterns