Gilbreath shuffle

From HandWiki
Short description: Method of shuffling a deck of cards

A Gilbreath shuffle is a way to shuffle a deck of cards, named after mathematician Norman Gilbreath (also known for Gilbreath's conjecture). 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.[1]

Description

A Gilbreath shuffle consists of the following two steps:[1]

  • Deal off any number of the cards from the top of a deck to form a second pile of cards.
  • Riffle the new pile with the remainder of the deck.

It differs from the more commonly used procedure of cutting a deck into two piles and then riffling the piles, in that the first step of dealing off cards reverses the order of the cards in the new pile, whereas cutting the deck would preserve this order.

Gilbreath's principle

Although seemingly highly random, Gilbreath shuffles preserve many properties of the initial deck. For instance, if the initial deck of cards alternates between black and red cards, then after a single Gilbreath shuffle the deck will still have the property that, if it is grouped into consecutive pairs of cards, each pair will have one black card and one red card. Similarly, if a Gilbreath shuffle is used on a deck of cards where every card has the same suit as the card four positions prior, and the resulting deck is grouped into consecutive sets of four cards, then each set will contain one card of each suit. This phenomenon is known as Gilbreath's principle and is the basis for several card tricks.[1]

Gilbreath permutations

Mathematically, Gilbreath shuffles can be described by Gilbreath permutations, permutations of the numbers from 1 to n that can be obtained by a Gilbreath shuffle with a deck of cards labeled with these numbers in order. Gilbreath permutations can be characterized by the property that every prefix contains a consecutive set of numbers.[1] For instance, the permutation (5,6,4,7,8,3,2,9,1,10) is a Gilbreath permutation for n = 10 that can be obtained by dealing off the first four or five cards and riffling them with the rest. Each of its prefixes (5), (5,6), (5,6,4), (5,6,4,7), etc. contain a set of numbers that (when sorted) form a consecutive subsequence of the numbers from 1 to 10. Equivalently, in terms of permutation patterns, the Gilbreath permutations are the permutations that avoid the two patterns 132 and 312.[2]

A Gilbreath shuffle may be uniquely determined by specifying which of the positions in the resulting shuffled deck are occupied by cards that were dealt off into the second pile, and which positions are occupied by cards that were not dealt off. Therefore, there are [math]\displaystyle{ 2^n }[/math] possible ways of performing a Gilbreath shuffle on a deck of [math]\displaystyle{ n }[/math] cards. However, each Gilbreath permutation may be obtained from two different Gilbreath shuffles, as the first position of the permutation may have come from either of the two piles. Therefore, there are [math]\displaystyle{ 2^{n-1} }[/math] distinct Gilbreath permutations.[1][3]

The cyclic Gilbreath permutations of order [math]\displaystyle{ n }[/math] are in one-to-one correspondence with the real numbers [math]\displaystyle{ c }[/math] for which the iteration [math]\displaystyle{ x\mapsto x^2+c }[/math] (starting from [math]\displaystyle{ x=0 }[/math]) underlying the Mandelbrot set is periodic with period [math]\displaystyle{ n }[/math]. In this correspondence, the permutation that corresponds to a given value [math]\displaystyle{ c }[/math] describes the numerical sorted order of the iterates for [math]\displaystyle{ c }[/math].[1] The number of cyclic Gilbreath permutations (and therefore also the number of real periodic points of the Mandelbrot set), for [math]\displaystyle{ n=1,2,3,\dots }[/math], is given by the integer sequence

1, 1, 1, 2, 3, 5, 9, 16, 28, 51, 93, 170, 315, 585, 1091, ... (sequence A000048 in the OEIS).

Ultimate Gilbreath principle

[math]\displaystyle{ \begin{matrix}1\\2\\3\\4\\5\\6\\7\\8\\9\\10\end{matrix} \to \begin{matrix}5\\6\\7\\8\\9\\10\end{matrix} \begin{matrix}4\\3\\2\\1\end{matrix} \to \begin{matrix}4\\5\\6\\3\\7\\2\\8\\9\\1\\10\end{matrix} }[/math]
Here is an example illustrating the theorem. For a ten-card deck, we can deal off four cards into a small pile on the table (one by one) and then riffle shuffle them to lead to the arrangement π above

A theorem called "the ultimate Gilbreath principle" states that, for a permutation [math]\displaystyle{ \pi }[/math] of [math]\displaystyle{ \{1, 2, 3,\dots, n\} }[/math], the following four properties are equivalent:[1]

  • [math]\displaystyle{ \pi }[/math] is a Gilbreath permutation.
  • For each [math]\displaystyle{ j }[/math], the top [math]\displaystyle{ j }[/math] cards [math]\displaystyle{ \pi(1),\dots \pi(j) }[/math] are distinct modulo [math]\displaystyle{ j }[/math].
  • For each [math]\displaystyle{ j }[/math] and [math]\displaystyle{ k }[/math] with [math]\displaystyle{ kj\le n }[/math], the [math]\displaystyle{ j }[/math] cards [math]\displaystyle{ \pi\bigl((k-1)j+1\bigr),\pi\bigl(k-1)j+2\bigr),\dots,\pi(kj) }[/math] are distinct modulo [math]\displaystyle{ j }[/math].
  • For each [math]\displaystyle{ j }[/math], the top [math]\displaystyle{ j }[/math] cards are consecutive in [math]\displaystyle{ 1,2,\dots, n }[/math].

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Diaconis, Persi; Graham, Ron (2012), "Chapter 5: From the Gilbreath Principle to the Mandelbrot Set", Magical Mathematics: the mathematical ideas that animate great magic tricks, Princeton University Press, pp. 61–83, http://assets.press.princeton.edu/chapters/s5_9510.pdf .
  2. Vella, Antoine (2002), "Pattern avoidance in permutations: linear and cyclic orders", Electronic Journal of Combinatorics 9 (2): R18, doi:10.37236/1690, http://www.combinatorics.org/Volume_9/Abstracts/v9i2r18.html . See in particular Proposition 3.3.
  3. (Vella 2002) credits this result on the number of Gilbreath permutations to "Restricted permutations", European Journal of Combinatorics 6 (4): 383–406, 1985, doi:10.1016/s0195-6698(85)80052-4 .