*** Welcome to piglix ***

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

The Gilbert–Shannon–Reeds model may be defined in several equivalent ways.

Most similarly to the way humans shuffle cards, it can be defined as a random cut and riffle. The deck of cards is cut into two packets; if there are a total of n cards, then the probability of selecting k cards in the first deck and n − k in the second deck is . Then, one card at a time is repeatedly moved from the bottom of one of the packets to the top of the shuffled deck, such that if x cards remain in one packet and y cards remain in the other packet, then the probability of choosing a card from the first packet is x/(x + y) and the probability of choosing a card from the second packet is y/(x + y).

An alternative description can be based on a property of the model, that it generates a permutation of the initial deck in which each card is equally likely to have come from the first or the second packet. To generate a random permutation according to this model, begin by flipping a fair coin n times, to determine for each position of the shuffled deck whether it comes from the first packet or the second packet. Then split into two packets whose sizes are the number of tails and the number of heads flipped, and use the same coin flip sequence to determine from which packet to pull each card of the shuffled deck.


...
Wikipedia

...