Riffle shuffle permutation

Last updated

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 items that can be obtained by a single riffle shuffle, in which a sorted deck of 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.

Contents

As a special case of this, a -shuffle, for numbers and with , is a riffle in which the first packet has cards and the second packet has cards. [2]

Combinatorial enumeration

Since a -shuffle is completely determined by how its first elements are mapped, the number of -shuffles is

However, the number of distinct riffles is not quite the sum of this formula over all choices of and adding to (which would be ), because the identity permutation can be represented in multiple ways as a -shuffle for different values of and . Instead, the number of distinct riffle shuffle permutations of a deck of cards, for , is

1, 2, 5, 12, 27, 58, 121, 248, 503, 1014, ... (sequence A000325 in the OEIS)

More generally, the formula for this number is ; 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]

For , this is

1, 2, 5, 11, 21, 36, 57, 85, 121, 166, 221, ... (sequence A050407 in the OEIS)

and for 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. [4] In this model, the identity permutation has probability of being generated, and all other riffle permutations have equal probability 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. [5]

Permutation patterns

A pattern in a permutation is a smaller permutation formed from a subsequence of some values in the permutation by reducing these values to the range from 1 to 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. [3] Thus, for instance, they are a subclass of the vexillary permutations, which have 2143 as their only minimal forbidden pattern. [6]

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. [7]

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 -form and a -form can be defined as a sum over -shuffles. [2]

See also

Related Research Articles

In mathematics, a combination is a selection of items from a set that has distinct members, such that the order of selection does not matter. For example, given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a k-combination of a set S is a subset of k distinct elements of S. So, two combinations are identical if and only if each combination has the same members. If the set has n elements, the number of k-combinations, denoted as , is equal to the binomial coefficient

Shuffling Procedure used to randomize a deck of playing cards

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.

Persi Diaconis American mathematician and statistician

Persi Warren Diaconis is an American mathematician of Greek descent and former professional magician. He is the Mary V. Sunseri Professor of Statistics and Mathematics at Stanford University.

In probability theory, de Finetti's theorem states that exchangeable observations are conditionally independent relative to some latent variable. An epistemic probability distribution could then be assigned to this variable. It is named in honor of Bruno de Finetti.

In combinatorial mathematics, the Bell numbers count the possible partitions of a set. These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan. In an example of Stigler's law of eponymy, they are named after Eric Temple Bell, who wrote about them in the 1930s.

The principle of indifference is a rule for assigning epistemic probabilities. The principle of indifference states that in the absence of any relevant evidence, agents should distribute their credence equally among all the possible outcomes under consideration.

Inclusion–exclusion principle Counting technique in combinatorics

In combinatorics, a branch of mathematics, the inclusion–exclusion principle is a counting technique which generalizes the familiar method of obtaining the number of elements in the union of two finite sets; symbolically expressed as

In combinatorics, Bertrand's ballot problem is the question: "In an election where candidate A receives p votes and candidate B receives q votes with p > q, what is the probability that A will be strictly ahead of B throughout the count?" The answer is

In computer science, patience sorting is a sorting algorithm inspired by, and named after, the card game patience. A variant of the algorithm efficiently computes the length of a longest increasing subsequence in a given array.

Shuffling machine Machine for shuffling playing cards

A shuffling machine is a machine for randomly shuffling packs of playing cards.

In the game of bridge mathematical probabilities play a significant role. Different declarer play strategies lead to success depending on the distribution of opponent's cards. To decide which strategy has highest likelihood of success, the declarer needs to have at least an elementary knowledge of probabilities.

In probability theory, the mixing time of a Markov chain is the time until the Markov chain is "close" to its steady state distribution.

Faro shuffle Perfectly interleaved playing card 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 the table interleaved. Diaconis, Graham, and Kantor also call this the technique, when used in magic.

Fisher–Yates shuffle Algorithm for generating a random permutation of a finite set

The Fisher–Yates shuffle is an algorithm for generating a random permutation of a finite sequence—in plain terms, the algorithm shuffles the sequence. The algorithm effectively puts all the elements into a hat; it continually determines the next element by randomly drawing an element from the hat until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely. The modern version of the algorithm is efficient: it takes time proportional to the number of items being shuffled and shuffles them in place.

Edgar Nelson Gilbert was an American mathematician and coding theorist, a longtime researcher at Bell Laboratories whose accomplishments include the Gilbert–Varshamov bound in coding theory, the Gilbert–Elliott model of bursty errors in signal transmission, and the Erdős–Rényi model for random graphs.

In combinatorial mathematics, a Baxter permutation is a permutation which satisfies the following generalized pattern avoidance property:

A Gilbreath shuffle is a way to shuffle a deck of cards, named after mathematician Norman Gilbreath. Gilbreath's principle describes the properties of a deck that are preserved by this type of shuffle, and a Gilbreath permutation is a permutation that can be formed by a Gilbreath shuffle.

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 that forms the basis for a recommendation that a deck of cards should be riffled seven times in order to thoroughly randomize it. It is named after the work of Edgar Gilbert, Claude Shannon, and J. Reeds, reported in a 1955 technical report by Gilbert and in a 1981 unpublished manuscript of Reeds.

In the theory of permutation patterns, a skew-merged permutation is a permutation that can be partitioned into an increasing sequence and a decreasing sequence. They were first studied by Stankova (1994) and given their name by Atkinson (1998).

Norman Laurence Gilbreath is an American magician and author known for originating the Gilbreath shuffle. He is also known for Gilbreath's conjecture concerning prime numbers.

References

  1. Aldous, David; Diaconis, Persi (1986), "Shuffling cards and stopping times" (PDF), The American Mathematical Monthly , 93 (5): 333–348, doi:10.2307/2323590, JSTOR   2323590, MR   0841111
  2. 1 2 Weibel, Charles (1994). An Introduction to Homological Algebra, p. 181. Cambridge University Press, Cambridge.
  3. 1 2 Atkinson, M. D. (1999), "Restricted permutations", Discrete Mathematics, 195 (1–3): 27–38, doi: 10.1016/S0012-365X(98)00162-9 , MR   1663866 .
  4. Diaconis, Persi (1988), Group representations in probability and statistics, Institute of Mathematical Statistics Lecture Notes—Monograph Series, 11, Hayward, CA: Institute of Mathematical Statistics, ISBN   0-940600-14-5, MR   0964069 .
  5. Kolata, Gina (January 9, 1990), "In Shuffling Cards, 7 Is Winning Number", New York Times .
  6. Claesson, Anders (2004), Permutation patterns, continued fractions, and a group determined by an ordered set, Ph.D. thesis, Department of Mathematics, Chalmers University of Technology, CiteSeerX   10.1.1.103.2001 .
  7. Diaconis, Persi; Graham, R. L.; Kantor, William M. (1983), "The mathematics of perfect shuffles", Advances in Applied Mathematics, 4 (2): 175–196, CiteSeerX   10.1.1.77.7769 , doi:10.1016/0196-8858(83)90009-X, MR   0700845 .