TOPICS
Search

Gilbreath Principle


The Gilbreath principle is a card-shuffling theorem that guarantees prescribed labels in consecutive blocks after a suitable shuffle. Start with N=mr cards whose labels repeat 1, 2, ..., m in that order, where m>=2 and r>=1 are integers. Reverse the order of the first k cards, where k is an integer with 0<=k<=N, and then perform a riffle shuffle of that packet with the remaining cards, preserving the order within each of these two packets. Each successive, nonoverlapping block of m cards, counted from the top, then contains each label exactly once (Diaconis and Graham 2015, p. 66; Numberphile 2016).

For m=2, the initial labels can be red and black, and each successive pair after the shuffle has one card of each color. This is Gilbreath's first principle (Gilbreath 1958). The repeated-label version is his second principle (Diaconis and Graham 2015, pp. 62 and 66).

After such a shuffle, the original positions of the first j output cards form a contiguous block of j positions in the original deck. A prefix of length tm therefore has exactly t of each label for 1<=t<=r. Comparing prefixes of lengths tm and (t-1)m proves the block property. With all N cards distinguished, allowing every cut k and every order-preserving interleaving gives 2^(N-1) distinct output permutations (Diaconis and Graham 2015, pp. 68-69 and 80-81).


See also

Riffle Shuffle

Explore with Wolfram|Alpha

References

Diaconis, P. and Graham, R. Magical Mathematics: The Mathematical Ideas That Animate Great Magic Tricks. Princeton, NJ: Princeton University Press, 2015.Gilbreath, N. "Magnetic Colors." Linking Ring 38, 60, 1958.Numberphile. "Shuffling Card Trick." Mar. 2, 2016. https://www.youtube.com/watch?v=WYsP1PhoAZc.

Cite this as:

Weisstein, Eric W. "Gilbreath Principle." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/GilbreathPrinciple.html

Subject classifications