SlideShare a Scribd company logo
Everyday I'm Shuffling 
Judge Conference – GP Madrid 
14/11/2014 
by Pedro Gonçalves, L2
Table of Contents 
● What “shuffling” means 
● Pile Shuffling 
● Overhand Shuffling 
● Riffle Shuffling 
● Musings on shuffling 
● Bibliography 
● Acknowledgements 
Judge Conference – GP Madrid 
14/11/2014
Shuffling 
Judge Conference – GP Madrid 
14/11/2014
Shuffling 
● CR 701.16a 
“To shuffle a library or a face-down pile of cards, 
randomize the cards within it so that no player knows 
their order.” 
Judge Conference – GP Madrid 
14/11/2014
Shuffling 
● CR 701.16a 
“To shuffle a library or a face-down pile of cards, 
randomize the cards within it so that no player knows 
their order.” 
● How can we guarantee the randomness of the cards in a 
library? 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling 
● Cards are simply dealt out into a number of piles, then the 
piles are stacked on top of each other. 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling 
● Cards are simply dealt out into a number of piles, then the 
piles are stacked on top of each other. 
● It does NOT randomize the cards, the process is 
completely deterministic. 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling 
● Cards are simply dealt out into a number of piles, then the 
piles are stacked on top of each other. 
● It does NOT randomize the cards, the process is 
completely deterministic. 
● May be useful to check the deck's legality (by counting 
the cards). 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling 
● Cards are simply dealt out into a number of piles, then the 
piles are stacked on top of each other. 
● It does NOT randomize the cards, the process is 
completely deterministic. 
● May be useful to check the deck's legality (by counting 
the cards). 
● Can be used by less honest players to try to cheat – for 
example, using the so called “Double Nickel”. 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling – Double Nickel 
● You “shuffle” in 5 piles of cards for 2 times, starting with a 
deck with all the lands/spells previously stacked. 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel
Pile Shuffling – Double Nickel 
● You “shuffle” in 5 piles of cards for 2 times, starting with a 
deck with all the lands/spells previously stacked. 
● Lands and spells are distributed in such a way to avoid 
'mana screw' and 'mana flood', regardless of where the 
deck is cut. 
Judge Conference – GP Madrid 
14/11/2014
Pile Shuffling – Double Nickel 
● You “shuffle” in 5 piles of cards for 2 times, starting with a 
deck with all the lands/spells previously stacked. 
● Lands and spells are distributed in such a way to avoid 
'mana screw' and 'mana flood', regardless of where the 
deck is cut. 
● It looks like there is no discernible pattern, but it is clear 
that there was a library manipulation. 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● A group of cards on the bottom (or top) 
of the deck is lifted sideways out of the 
deck, and then placed on the top (or 
bottom). 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● A group of cards on the bottom (or top) 
of the deck is lifted sideways out of the 
deck, and then placed on the top (or 
bottom). 
● Is this really an actual randomization 
method? 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● A group of cards on the bottom (or top) 
of the deck is lifted sideways out of the 
deck, and then placed on the top (or 
bottom). 
● Is this really an actual randomization 
method? YES! 
● Jonasson (2006) proved this is an actual randomization 
method. 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● A group of cards on the bottom (or top) 
of the deck is lifted sideways out of the 
deck, and then placed on the top (or 
bottom). 
● Is this really an actual randomization 
method? YES! 
● Jonasson (2006) proved this is an actual randomization 
method. 
● However, the same paper concludes that, in order to 
shuffle a deck with n cards, we need approximately n2 
log(n) movements. 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 
n2 log(n) 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 
n2 log(n) 5902.207 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 60 
n2 log(n) 5902.207 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 60 
n2 log(n) 5902.207 14739.640 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 60 99 
n2 log(n) 5902.207 14739.640 
Judge Conference – GP Madrid 
14/11/2014
Overhand Shuffling 
● However, the same paper concludes 
that, in order to shuffle a deck with n 
cards, we need approximately n2 log(n) 
movements. 
● In practice, this is not an effective 
shuffling method: 
n 40 60 99 
n2 log(n) 5902.207 14739.640 45036.767 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling 
● 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. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling 
● 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. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling 
● 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. 
● There's a risk of damage to the cards – 
casinos replace their cards often, but 
Magic cards (as well as other TCGs' 
cards) are less replaceable. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling 
● 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. 
● There's a risk of damage to the cards – 
casinos replace their cards often, but 
Magic cards (as well as other TCGs' 
cards) are less replaceable. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● The Gilbert-Shannon-Reeds model, as described in 
Gilbert (1955) and Reeds (1981), is a good model for how 
people usually riffle shuffle. (Diaconis,1988) 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● The Gilbert-Shannon-Reeds model, as described in 
Gilbert (1955) and Reeds (1981), is a good model for how 
people usually riffle shuffle. (Diaconis,1988) 
● The deck is split into 2 halves, choosing the cut point with 
according to a binomial distribution. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● The Gilbert-Shannon-Reeds model, as described in 
Gilbert (1955) and Reeds (1981), is a good model for how 
people usually riffle shuffle. (Diaconis,1988) 
● The deck is split into 2 halves, choosing the cut point with 
according to a binomial distribution. 
● Choose a card from the bottom of one half of the deck, 
with a probability that is proportional to the number of 
cards in that half – if the 1st half has A cards and the 2nd 
half has B cards, the probability of getting a card from the 
1st half is A/(A+B). 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
n 40 60 99 
1.5 log2(n) 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
n 40 60 99 
1.5 log2(n) 7.982 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
n 40 60 99 
1.5 log2(n) 7.982 8.860 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
n 40 60 99 
1.5 log2(n) 7.982 8.860 9.944 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● How can we measure the effectiveness of a riffle shuffle? 
● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) 
n 40 60 99 
1.5 log2(n) 7.982 8.860 9.944 
● Notice that players don't usually shuffle that much. 
(Although they should!) 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● In the remarkable paper Trailing the Dovetail Shuffle to its 
Lair (1992), Bayer and Diaconis improved Aldous's result. 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● In the remarkable paper Trailing the Dovetail Shuffle to its 
Lair (1992), Bayer and Diaconis improved Aldous's result. 
● The total variation distance, ||Qm – U||, between the GSR 
and the uniform distributions is: 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling - GSR 
● In the remarkable paper Trailing the Dovetail Shuffle to its 
Lair (1992), Bayer and Diaconis improved Aldous's result. 
● The total variation distance, ||Qm – U||, between the GSR 
and the uniform distributions is: 
with 
n 〈 n 
∥Qm−U∥=Σr=1 
r−1〉∣(2m+n−r 
n ) 
2nm − 1 
n!∣ 
〈 n 
r 
(−1) j (n+1 
r−1〉==0 
j 
Σj )(r− j )n 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling – ||Qm – U|| for 40 cards 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling – ||Qm – U|| for 40 cards 
1 2 3 4 5 6 7 
1 1 1 0.9909 0.7688 0.444 0.2230 
8 9 10 11 12 13 14 
0.1153 0.0582 0.0292 0.0146 0.0073 0.0036 0.0018 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling – ||Qm – U|| for 60 cards 
1 2 3 4 5 6 7 
1 1 1 1 0.9764 0.7132 0.4062 
8 9 10 11 12 13 14 
0.2069 0.1052 0.0530 0.0266 0.0133 0.0066 0.0033 
Judge Conference – GP Madrid 
14/11/2014
Riffle Shuffling – ||Qm – U|| for 99 cards 
1 2 3 4 5 6 7 
1 1 1 1 1 0.9801 0.7401 
8 9 10 11 12 13 14 
0.4260 0.2200 0.1115 0.0556 0.0277 0.0138 0.0069 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
● Pile shuffling is an isomorphism. From Wikipedia: 
“isomorphic objects may be considered the same as long 
as one considers only these properties and their 
consequences.” 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
● Pile shuffling is an isomorphism. From Wikipedia: 
“isomorphic objects may be considered the same as long 
as one considers only these properties and their 
consequences.” 
● Can we do a random pile shuffle? 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
● Pile shuffling is an isomorphism. From Wikipedia: 
“isomorphic objects may be considered the same as long 
as one considers only these properties and their 
consequences.” 
● Can we do a random pile shuffle? 
● Some people can perform a perfect riffle shuffle, which is 
equally useless for shuffling purposes! 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
● Pile shuffling is an isomorphism. From Wikipedia: 
“isomorphic objects may be considered the same as long 
as one considers only these properties and their 
consequences.” 
● Can we do a random pile shuffle? 
● Some people can perform a perfect riffle shuffle, which is 
equally useless for shuffling purposes! 
● Other potential problems with riffle shuffling: bottom/top 
cards, clumps due to humidity (!) 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – Technical details 
● Pile shuffling is an isomorphism. From Wikipedia: 
“isomorphic objects may be considered the same as long 
as one considers only these properties and their 
consequences.” 
● Can we do a random pile shuffle? 
● Some people can perform a perfect riffle shuffle, which is 
equally useless for shuffling purposes! 
● Other potential problems with riffle shuffling: bottom/top 
cards, clumps due to humidity (!) 
● Actual randomness vs. de facto randomness 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
● Less shuffling effects, better sleeves, teaching the players 
how to shuffle properly. 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
● Less shuffling effects, better sleeves, teaching the players 
how to shuffle properly. 
● Could Pile shuffle be considered Slow Play? 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
● Less shuffling effects, better sleeves, teaching the players 
how to shuffle properly. 
● Could Pile shuffle be considered Slow Play? 
● World Record for memorizing a 52-card deck: 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
● Less shuffling effects, better sleeves, teaching the players 
how to shuffle properly. 
● Could Pile shuffle be considered Slow Play? 
● World Record for memorizing a 52-card deck: 21,19s! 
Judge Conference – GP Madrid 
14/11/2014
Musings on shuffling – General details 
● Is Riffle shuffle practical enough for tournaments? 
● Mash shuffling can be considered a rough approximation 
to a riffle shuffle. 
● Less shuffling effects, better sleeves, teaching the players 
how to shuffle properly. 
● Could Pile shuffle be considered Slow Play? 
● World Record for memorizing a 52-card deck: 21,19s! 
● Should Battle of Wits be legal? 
Judge Conference – GP Madrid 
14/11/2014
Bibliography 
● Flores, Micheal J. (2009). How to Cheat. Five with Flores. 
http://fivewithflores.com/2009/05/how-to-cheat/ Retrieved 
05/09/2014 
● Jonasson, J. (2006). The Overhand Shuffle Mixes in O(n2 
log(n)) Steps. The Annals of Applied Probability, vol.16, 
#1, pp. 231-243 
● Gilbert, E. (1955) Theory of Shuffling. Technical 
memorandum, Bell Laboratories 
● Reeds, J. (1981) Unpublished manuscript. 
● Diaconis, P.(1988) Group Representations in Probability 
and Statistics. IMS, Hayward, California
Bibliography 
● Aldous, D. (1983). Random walk on finite groups and 
rapidly growing Markov Chains. Semináire de Probabilités 
XVII. Lecture Notes in Math. 986 pp.243-297. Springer 
● Bayer, D. Diaconis, P. (1992) Trailing the Dovetail Shuffle 
to its Lair. The Annals of Applied Probability, vol.2, #2, pp. 
294-313 
● Levin, D. Peres, Y. Wilmer, E (2008). Markov Chains and 
Mixing Times. American Mathematical Society 
● http://en.wikipedia.org/wiki/Shuffling Retrieved 12/11/2014 
Judge Conference – GP Madrid 
14/11/2014
Acknowledgements 
● To the Portuguese Judges, for listenening patiently to an 
earlier version of this presentation. 
● To Frederico Bastos, Frank Karsten and Luís Gobern, for 
providing some feedback from a player's perspective. 
● To the organizers of this conference, for the opportunity to 
give the presentation. 
● To everyone in the audience, for your attention. 
Judge Conference – GP Madrid 
14/11/2014 
THANK YOU!!!

More Related Content

More from mlo825

Bribery and improperly determining a winner
Bribery and improperly determining a winnerBribery and improperly determining a winner
Bribery and improperly determining a winner
mlo825
 
Slow play and stalling
Slow play and stallingSlow play and stalling
Slow play and stalling
mlo825
 
David gutesa dcims2
David gutesa   dcims2David gutesa   dcims2
David gutesa dcims2
mlo825
 
Dustin de leeuv writing useful reviews
Dustin de leeuv  writing useful reviewsDustin de leeuv  writing useful reviews
Dustin de leeuv writing useful reviews
mlo825
 
Jack Doyle soft skills
Jack Doyle soft skillsJack Doyle soft skills
Jack Doyle soft skills
mlo825
 
Norman ralph judge development
Norman ralph   judge developmentNorman ralph   judge development
Norman ralph judge development
mlo825
 
Stefan ladstader the exemplar program
Stefan ladstader  the exemplar programStefan ladstader  the exemplar program
Stefan ladstader the exemplar program
mlo825
 
Christian busquieal and javier alvarez modern presentation
Christian busquieal and javier alvarez   modern presentationChristian busquieal and javier alvarez   modern presentation
Christian busquieal and javier alvarez modern presentation
mlo825
 
Adam cetnerowski gtd
Adam cetnerowski   gtdAdam cetnerowski   gtd
Adam cetnerowski gtd
mlo825
 
Body language judge seminar
Body language judge seminarBody language judge seminar
Body language judge seminar
mlo825
 
Europe eas t
Europe eas tEurope eas t
Europe eas t
mlo825
 
Beat the test
Beat the testBeat the test
Beat the test
mlo825
 
Working with t.o.2
Working with t.o.2Working with t.o.2
Working with t.o.2
mlo825
 
Mentoring level 1_judges
Mentoring level 1_judgesMentoring level 1_judges
Mentoring level 1_judges
mlo825
 
The stack and state based actions v2
The stack and state based actions v2The stack and state based actions v2
The stack and state based actions v2
mlo825
 
Seminar 421 v1.1 230814
Seminar 421 v1.1 230814Seminar 421 v1.1 230814
Seminar 421 v1.1 230814
mlo825
 
Seminar disqualifications v1.1 230814
Seminar disqualifications v1.1 230814Seminar disqualifications v1.1 230814
Seminar disqualifications v1.1 230814
mlo825
 
Seminar teamleading v1.1 230814
Seminar teamleading v1.1 230814Seminar teamleading v1.1 230814
Seminar teamleading v1.1 230814
mlo825
 

More from mlo825 (18)

Bribery and improperly determining a winner
Bribery and improperly determining a winnerBribery and improperly determining a winner
Bribery and improperly determining a winner
 
Slow play and stalling
Slow play and stallingSlow play and stalling
Slow play and stalling
 
David gutesa dcims2
David gutesa   dcims2David gutesa   dcims2
David gutesa dcims2
 
Dustin de leeuv writing useful reviews
Dustin de leeuv  writing useful reviewsDustin de leeuv  writing useful reviews
Dustin de leeuv writing useful reviews
 
Jack Doyle soft skills
Jack Doyle soft skillsJack Doyle soft skills
Jack Doyle soft skills
 
Norman ralph judge development
Norman ralph   judge developmentNorman ralph   judge development
Norman ralph judge development
 
Stefan ladstader the exemplar program
Stefan ladstader  the exemplar programStefan ladstader  the exemplar program
Stefan ladstader the exemplar program
 
Christian busquieal and javier alvarez modern presentation
Christian busquieal and javier alvarez   modern presentationChristian busquieal and javier alvarez   modern presentation
Christian busquieal and javier alvarez modern presentation
 
Adam cetnerowski gtd
Adam cetnerowski   gtdAdam cetnerowski   gtd
Adam cetnerowski gtd
 
Body language judge seminar
Body language judge seminarBody language judge seminar
Body language judge seminar
 
Europe eas t
Europe eas tEurope eas t
Europe eas t
 
Beat the test
Beat the testBeat the test
Beat the test
 
Working with t.o.2
Working with t.o.2Working with t.o.2
Working with t.o.2
 
Mentoring level 1_judges
Mentoring level 1_judgesMentoring level 1_judges
Mentoring level 1_judges
 
The stack and state based actions v2
The stack and state based actions v2The stack and state based actions v2
The stack and state based actions v2
 
Seminar 421 v1.1 230814
Seminar 421 v1.1 230814Seminar 421 v1.1 230814
Seminar 421 v1.1 230814
 
Seminar disqualifications v1.1 230814
Seminar disqualifications v1.1 230814Seminar disqualifications v1.1 230814
Seminar disqualifications v1.1 230814
 
Seminar teamleading v1.1 230814
Seminar teamleading v1.1 230814Seminar teamleading v1.1 230814
Seminar teamleading v1.1 230814
 

Pedro gonçalves mtg shuffle-madrid

  • 1. Everyday I'm Shuffling Judge Conference – GP Madrid 14/11/2014 by Pedro Gonçalves, L2
  • 2. Table of Contents ● What “shuffling” means ● Pile Shuffling ● Overhand Shuffling ● Riffle Shuffling ● Musings on shuffling ● Bibliography ● Acknowledgements Judge Conference – GP Madrid 14/11/2014
  • 3. Shuffling Judge Conference – GP Madrid 14/11/2014
  • 4. Shuffling ● CR 701.16a “To shuffle a library or a face-down pile of cards, randomize the cards within it so that no player knows their order.” Judge Conference – GP Madrid 14/11/2014
  • 5. Shuffling ● CR 701.16a “To shuffle a library or a face-down pile of cards, randomize the cards within it so that no player knows their order.” ● How can we guarantee the randomness of the cards in a library? Judge Conference – GP Madrid 14/11/2014
  • 6. Pile Shuffling Judge Conference – GP Madrid 14/11/2014
  • 7. Pile Shuffling ● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other. Judge Conference – GP Madrid 14/11/2014
  • 8. Pile Shuffling ● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other. ● It does NOT randomize the cards, the process is completely deterministic. Judge Conference – GP Madrid 14/11/2014
  • 9. Pile Shuffling ● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other. ● It does NOT randomize the cards, the process is completely deterministic. ● May be useful to check the deck's legality (by counting the cards). Judge Conference – GP Madrid 14/11/2014
  • 10. Pile Shuffling ● Cards are simply dealt out into a number of piles, then the piles are stacked on top of each other. ● It does NOT randomize the cards, the process is completely deterministic. ● May be useful to check the deck's legality (by counting the cards). ● Can be used by less honest players to try to cheat – for example, using the so called “Double Nickel”. Judge Conference – GP Madrid 14/11/2014
  • 11. Pile Shuffling – Double Nickel ● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked. Judge Conference – GP Madrid 14/11/2014
  • 12. Pile Shuffling – Double Nickel
  • 13. Pile Shuffling – Double Nickel
  • 14. Pile Shuffling – Double Nickel
  • 15. Pile Shuffling – Double Nickel
  • 16. Pile Shuffling – Double Nickel
  • 17. Pile Shuffling – Double Nickel
  • 18. Pile Shuffling – Double Nickel ● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked. ● Lands and spells are distributed in such a way to avoid 'mana screw' and 'mana flood', regardless of where the deck is cut. Judge Conference – GP Madrid 14/11/2014
  • 19. Pile Shuffling – Double Nickel ● You “shuffle” in 5 piles of cards for 2 times, starting with a deck with all the lands/spells previously stacked. ● Lands and spells are distributed in such a way to avoid 'mana screw' and 'mana flood', regardless of where the deck is cut. ● It looks like there is no discernible pattern, but it is clear that there was a library manipulation. Judge Conference – GP Madrid 14/11/2014
  • 20. Overhand Shuffling Judge Conference – GP Madrid 14/11/2014
  • 21. Overhand Shuffling ● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom). Judge Conference – GP Madrid 14/11/2014
  • 22. Overhand Shuffling ● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom). ● Is this really an actual randomization method? Judge Conference – GP Madrid 14/11/2014
  • 23. Overhand Shuffling ● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom). ● Is this really an actual randomization method? YES! ● Jonasson (2006) proved this is an actual randomization method. Judge Conference – GP Madrid 14/11/2014
  • 24. Overhand Shuffling ● A group of cards on the bottom (or top) of the deck is lifted sideways out of the deck, and then placed on the top (or bottom). ● Is this really an actual randomization method? YES! ● Jonasson (2006) proved this is an actual randomization method. ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. Judge Conference – GP Madrid 14/11/2014
  • 25. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. Judge Conference – GP Madrid 14/11/2014
  • 26. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: Judge Conference – GP Madrid 14/11/2014
  • 27. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 n2 log(n) Judge Conference – GP Madrid 14/11/2014
  • 28. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 n2 log(n) 5902.207 Judge Conference – GP Madrid 14/11/2014
  • 29. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 60 n2 log(n) 5902.207 Judge Conference – GP Madrid 14/11/2014
  • 30. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 60 n2 log(n) 5902.207 14739.640 Judge Conference – GP Madrid 14/11/2014
  • 31. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 60 99 n2 log(n) 5902.207 14739.640 Judge Conference – GP Madrid 14/11/2014
  • 32. Overhand Shuffling ● However, the same paper concludes that, in order to shuffle a deck with n cards, we need approximately n2 log(n) movements. ● In practice, this is not an effective shuffling method: n 40 60 99 n2 log(n) 5902.207 14739.640 45036.767 Judge Conference – GP Madrid 14/11/2014
  • 33. Riffle Shuffling Judge Conference – GP Madrid 14/11/2014
  • 34. Riffle Shuffling ● 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. Judge Conference – GP Madrid 14/11/2014
  • 35. Riffle Shuffling ● 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. Judge Conference – GP Madrid 14/11/2014
  • 36. Riffle Shuffling ● 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. ● There's a risk of damage to the cards – casinos replace their cards often, but Magic cards (as well as other TCGs' cards) are less replaceable. Judge Conference – GP Madrid 14/11/2014
  • 37. Riffle Shuffling ● 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. ● There's a risk of damage to the cards – casinos replace their cards often, but Magic cards (as well as other TCGs' cards) are less replaceable. Judge Conference – GP Madrid 14/11/2014
  • 38. Riffle Shuffling - GSR Judge Conference – GP Madrid 14/11/2014
  • 39. Riffle Shuffling - GSR ● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988) Judge Conference – GP Madrid 14/11/2014
  • 40. Riffle Shuffling - GSR ● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988) ● The deck is split into 2 halves, choosing the cut point with according to a binomial distribution. Judge Conference – GP Madrid 14/11/2014
  • 41. Riffle Shuffling - GSR ● The Gilbert-Shannon-Reeds model, as described in Gilbert (1955) and Reeds (1981), is a good model for how people usually riffle shuffle. (Diaconis,1988) ● The deck is split into 2 halves, choosing the cut point with according to a binomial distribution. ● Choose a card from the bottom of one half of the deck, with a probability that is proportional to the number of cards in that half – if the 1st half has A cards and the 2nd half has B cards, the probability of getting a card from the 1st half is A/(A+B). Judge Conference – GP Madrid 14/11/2014
  • 42. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? Judge Conference – GP Madrid 14/11/2014
  • 43. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': Judge Conference – GP Madrid 14/11/2014
  • 44. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) Judge Conference – GP Madrid 14/11/2014
  • 45. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) n 40 60 99 1.5 log2(n) Judge Conference – GP Madrid 14/11/2014
  • 46. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) n 40 60 99 1.5 log2(n) 7.982 Judge Conference – GP Madrid 14/11/2014
  • 47. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) n 40 60 99 1.5 log2(n) 7.982 8.860 Judge Conference – GP Madrid 14/11/2014
  • 48. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) n 40 60 99 1.5 log2(n) 7.982 8.860 9.944 Judge Conference – GP Madrid 14/11/2014
  • 49. Riffle Shuffling - GSR ● How can we measure the effectiveness of a riffle shuffle? ● Aldous (1983) arrives at a 'cutoff point': 1.5 log2(n) n 40 60 99 1.5 log2(n) 7.982 8.860 9.944 ● Notice that players don't usually shuffle that much. (Although they should!) Judge Conference – GP Madrid 14/11/2014
  • 50. Riffle Shuffling - GSR ● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result. Judge Conference – GP Madrid 14/11/2014
  • 51. Riffle Shuffling - GSR ● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result. ● The total variation distance, ||Qm – U||, between the GSR and the uniform distributions is: Judge Conference – GP Madrid 14/11/2014
  • 52. Riffle Shuffling - GSR ● In the remarkable paper Trailing the Dovetail Shuffle to its Lair (1992), Bayer and Diaconis improved Aldous's result. ● The total variation distance, ||Qm – U||, between the GSR and the uniform distributions is: with n 〈 n ∥Qm−U∥=Σr=1 r−1〉∣(2m+n−r n ) 2nm − 1 n!∣ 〈 n r (−1) j (n+1 r−1〉==0 j Σj )(r− j )n Judge Conference – GP Madrid 14/11/2014
  • 53. Riffle Shuffling – ||Qm – U|| for 40 cards Judge Conference – GP Madrid 14/11/2014
  • 54. Riffle Shuffling – ||Qm – U|| for 40 cards 1 2 3 4 5 6 7 1 1 1 0.9909 0.7688 0.444 0.2230 8 9 10 11 12 13 14 0.1153 0.0582 0.0292 0.0146 0.0073 0.0036 0.0018 Judge Conference – GP Madrid 14/11/2014
  • 55. Riffle Shuffling – ||Qm – U|| for 60 cards 1 2 3 4 5 6 7 1 1 1 1 0.9764 0.7132 0.4062 8 9 10 11 12 13 14 0.2069 0.1052 0.0530 0.0266 0.0133 0.0066 0.0033 Judge Conference – GP Madrid 14/11/2014
  • 56. Riffle Shuffling – ||Qm – U|| for 99 cards 1 2 3 4 5 6 7 1 1 1 1 1 0.9801 0.7401 8 9 10 11 12 13 14 0.4260 0.2200 0.1115 0.0556 0.0277 0.0138 0.0069 Judge Conference – GP Madrid 14/11/2014
  • 57. Musings on shuffling – Technical details Judge Conference – GP Madrid 14/11/2014
  • 58. Musings on shuffling – Technical details ● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.” Judge Conference – GP Madrid 14/11/2014
  • 59. Musings on shuffling – Technical details ● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.” ● Can we do a random pile shuffle? Judge Conference – GP Madrid 14/11/2014
  • 60. Musings on shuffling – Technical details ● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.” ● Can we do a random pile shuffle? ● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes! Judge Conference – GP Madrid 14/11/2014
  • 61. Musings on shuffling – Technical details ● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.” ● Can we do a random pile shuffle? ● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes! ● Other potential problems with riffle shuffling: bottom/top cards, clumps due to humidity (!) Judge Conference – GP Madrid 14/11/2014
  • 62. Musings on shuffling – Technical details ● Pile shuffling is an isomorphism. From Wikipedia: “isomorphic objects may be considered the same as long as one considers only these properties and their consequences.” ● Can we do a random pile shuffle? ● Some people can perform a perfect riffle shuffle, which is equally useless for shuffling purposes! ● Other potential problems with riffle shuffling: bottom/top cards, clumps due to humidity (!) ● Actual randomness vs. de facto randomness Judge Conference – GP Madrid 14/11/2014
  • 63. Musings on shuffling – General details Judge Conference – GP Madrid 14/11/2014
  • 64. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? Judge Conference – GP Madrid 14/11/2014
  • 65. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. Judge Conference – GP Madrid 14/11/2014
  • 66. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. ● Less shuffling effects, better sleeves, teaching the players how to shuffle properly. Judge Conference – GP Madrid 14/11/2014
  • 67. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. ● Less shuffling effects, better sleeves, teaching the players how to shuffle properly. ● Could Pile shuffle be considered Slow Play? Judge Conference – GP Madrid 14/11/2014
  • 68. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. ● Less shuffling effects, better sleeves, teaching the players how to shuffle properly. ● Could Pile shuffle be considered Slow Play? ● World Record for memorizing a 52-card deck: Judge Conference – GP Madrid 14/11/2014
  • 69. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. ● Less shuffling effects, better sleeves, teaching the players how to shuffle properly. ● Could Pile shuffle be considered Slow Play? ● World Record for memorizing a 52-card deck: 21,19s! Judge Conference – GP Madrid 14/11/2014
  • 70. Musings on shuffling – General details ● Is Riffle shuffle practical enough for tournaments? ● Mash shuffling can be considered a rough approximation to a riffle shuffle. ● Less shuffling effects, better sleeves, teaching the players how to shuffle properly. ● Could Pile shuffle be considered Slow Play? ● World Record for memorizing a 52-card deck: 21,19s! ● Should Battle of Wits be legal? Judge Conference – GP Madrid 14/11/2014
  • 71. Bibliography ● Flores, Micheal J. (2009). How to Cheat. Five with Flores. http://fivewithflores.com/2009/05/how-to-cheat/ Retrieved 05/09/2014 ● Jonasson, J. (2006). The Overhand Shuffle Mixes in O(n2 log(n)) Steps. The Annals of Applied Probability, vol.16, #1, pp. 231-243 ● Gilbert, E. (1955) Theory of Shuffling. Technical memorandum, Bell Laboratories ● Reeds, J. (1981) Unpublished manuscript. ● Diaconis, P.(1988) Group Representations in Probability and Statistics. IMS, Hayward, California
  • 72. Bibliography ● Aldous, D. (1983). Random walk on finite groups and rapidly growing Markov Chains. Semináire de Probabilités XVII. Lecture Notes in Math. 986 pp.243-297. Springer ● Bayer, D. Diaconis, P. (1992) Trailing the Dovetail Shuffle to its Lair. The Annals of Applied Probability, vol.2, #2, pp. 294-313 ● Levin, D. Peres, Y. Wilmer, E (2008). Markov Chains and Mixing Times. American Mathematical Society ● http://en.wikipedia.org/wiki/Shuffling Retrieved 12/11/2014 Judge Conference – GP Madrid 14/11/2014
  • 73. Acknowledgements ● To the Portuguese Judges, for listenening patiently to an earlier version of this presentation. ● To Frederico Bastos, Frank Karsten and Luís Gobern, for providing some feedback from a player's perspective. ● To the organizers of this conference, for the opportunity to give the presentation. ● To everyone in the audience, for your attention. Judge Conference – GP Madrid 14/11/2014 THANK YOU!!!