Reminder that you can watch Art's magic math videos on your free trial to The Great Courses Plus: ow.ly/I5fV30rDCPO Or if that is too much fun: watch me shuffle a deck of cards 52 times LIVE.www.patreon.com/posts/50353681
I know this is a bit more applied than what you normally cover, but what are the odds of "accidentally" performing a farrow shuffle? You've definitely shown the effects of biased starting conditions but I was really hoping you could get an estimate of the odds of performing a farrow shuffle on any presorted deck (not just new deck order, i.e., number of bridge games that start with a presorted deck) to really drive home how unlikely dreams run was. I know you like pure maths better but a bit of human nature is always interesting.
@@matthewfrederick3291 yh i honestly was expecting the odds of getting 1-2 perfect shuffles to be the end of the video rather than looking at all the cycles of the shuffles. the actual probability of this occuring needs to be calculated
in 15:12 you said "riffle shuffle" instead of "Faro shuffle". It doesn't matter in this situation or is that the first mistake I spot on your videos before someone else?
Your number seemed too low for me, but then I double checked. using the odds given and the population of the world over time, I arrived at a figure of 9.6 million hands of bridge per old person per second. Simply immaculate.
My man learned how to do a perfect faro shuffle just because people questioned his other odds video regarding a supposed perfect bridge deal. Dedication.
I'd not be surprised if at least half of these perfect deals were orchestrated by one member of the group just trying to add some excitement to their friends' lives.
I know Matt is really trying to popularize his coined phrase of 1 in 3.1E19 as "The Ten Billion Human Second Century", but I much prefer 1 in 2.0E22 as being formally recognized as a "Dream Come True".
An American friend of mine wants to call 1 in 3.1 x 10^19 the "Theoretical Upper Limit of Sustained Activity", or TULSA for short. Yes, my friend is from Oklahoma.
When Matt was saying "its obviously not going to happen here" but you've watched Matt Parker enough to know there is some sort of tomfoolery going here I didn't expect that tomfoolery to be the answer so well played my good sir
I was very confused when he cut the deck without taking a careful look because I suspected that would mess up the order. As he later explained, it didn't.
If the cards are shuffled by humans then the deals are never random. I've been playing competition bridge for over 45 years and there was a huge change in the game when the competitions moved to computer generated random hands.
@@Pattonator14 Another long time bridge player here: The main difference is suit distributon. Hand shuffle tends to give more even deals regarding suits. As in you rarely get more than five to six of any given suit and usually at least two of each of the remaining three. Whereas computer generated shuffles tends to much more often give longer suits of seven and even eight and more often your hand can have zero of a suite. The reason behind this is the way bridge is played and how tournament bridge is organised. When a game is finished the dealt hands get put into a folder that has four individual pockets; one for each position. Then the folder is sendt to the next table and they play the same game and so on. At the end of the tournament the cards are put in their respective pockets habitually. Now, in bridge it is wery common to play 'suit by suit'. Or at least it is very common to play two, three or more rounds of the same suit before moving on to the next one. Since Bridge trick scoring is tracked with the actual cards; each player put the played card in front of them, either north/south or east/west depending on who got the trick, the suits often get bundled. So when the next tournament is about to start and the players remove the cards from the folders, in this bundle style from the last time they were played, and put them on top of each other the cards would be wery not random. Shuffle a few times and still many of the cards of a given suite would be spaced out by four. This causes the distribution to be unnaturaly even compared to true randomness. Of course; This could be solved by doing a casino shuffle. But nobody got time for that.
@@SuperPhexx oo ty for the response! That makes a lot of sense. I'm pretty pedantic about shuffling and even I usually only end up doing 3/4 of the required 7 riffle shuffles for randomness so I can see how that would come. I've played bridge and a bunch of other tricktaking games (shoutout to Skat!) casually with family and would think that it would be more fun/interesting with the less even suits?
As someone knew how to do a faro shuffle already and who noticed him doing it at the beginning of the video, I was impressed when he flipped over the cards and they were all arranged perfectly. I was thinking, "there's no way he's going to do a perfect faro shuffle twice while talking," but he did it. It's really hard to do, and I'm impressed.
It’s more than that I’m afraid. Much deeper. Mathematicians wake up one morning and have a sublime enlightened awakening. A realisation that their profession is not a science nor does it have any strong connections with reality and truth. Any connections with reality or truth are not only coincidental, but based on self confirming axiomatic neuroticism. By lunch time they accept the fact that they are deranged clowns urinating in a circus rink. ....it’s all down hill from there I’m afraid
I think it is important to note that long term bridge players are so good at shuffling that they could very well do perfect consecutive faroh shuffles without doing it on purpose.
@@tafazzi-on-discord Yes, but if they didn't really think about that, didn't do it professionally, but just... played bridge A LOT, this would make sense. And that's the situations where all of these incidents seem to pop up.
I don't know if it's regional, but here in Russia cards (at least in casual games) are shuffled just by randomly taking a bunch of cards and tossing it back into the stack over and over and over like a dozen times in quick succession without even looking at it, the sloppier the better. I always assumed this is the only way you shuffle, when I learned how most shuffles are done it just blew my mind, these are not random at all.
Anticipating an influx this month of local newspapers reporting that a perfect bridge deal occurred because Matt's viewers are going to pull this trick on their friends and attain local fame.
It’s hard to do and look natural. Not impossible with practice, but you’re going to need to do it first try or people are going to wonder why you keep pulling out new decks.
Yeah, it seems fairly clear. Perfect rifle shuffles happen all the time, particularly if the cards are stiff (new or sleeved), or the person doing it is decent at making an even split. Matt does the obvious one-by-one interleaving, but a good old face down on the table-rifle shuffle will do.
There's was a hilarious counter to the double nickel. If you 'shuffled' their deck correctly after they'd double nickel'd, you'd separate their lands and spells.
I remember once I built a deck, shuffled by making stacks and placing them in order, and then found all lands stacked on top of each other... oops. I've always taken more care in shuffling since then.
Any type of card competition should require a "sluff" shuffle("sluff" them on the table like you're mixing grandma's gravy I don't know what the actual name is). Way too many ways too false shuffle that look fair and as we saw cutting does nothing.
TL;DR: You can move a card in any position to any other position using a combination of at most 6 in- and out-shuffles. Make a directed graph with 52 vertices (1 for each position in the deck) and two edges out (1 for in shuffle, and 1 for out shuffle). Running the Floyd-Warshall algorithm will find the shortest path between each pair. The longest of the shortest distances will be the maximum number of shuffles needed to move a card from any position to any other position. EDIT: I coded it up and you can move a card from any position to any other position with at most 6 in- or out-shuffles. Some interesting things I found while doing this: - Moving a card from the top, to the bottom is an example of needing the maximum 6 shuffles. - Cards in some positions can move to any other position in at most 5 shuffles, e.g. the card second from the top. A magician could potentially use this to shave off one shuffle from the trick, in some cases. - - Proof that a card in a given position needs at least 5 shuffles in the worst case to move to another given position: There are 52 positions in the deck, and the shuffles must be able to reach each one. There are two different shuffles, and in the best case they make sure the card ends up in a position it hasn't been in before. With no shuffles we reach 1 position, the starting position. With one shuffle we reach at most 2 new positions from the starting position, covering 2+1=3 in total. With two shuffles, we can reach at most 2 new positions, from each of the 2 previous positions, after one shuffle, giving us 4 new positions or 2^2. In general after the k'th shuffle we reach at most 2^k new positions, covering 2^0+2^1+2^2+...+2^k total positions. This is also known to be 2^(k+1) -1. With four shuffles this gives us a total of at most 2^(4+1) -1 = 31 positions covered in total, which is not enough. (Shuffling 5 times gives us at most 2^6 -1 = 63 positions, which could be enough, if each position is unique. However, it seems from my code that the top card, in some cases needs 6 shuffles to move to a certain position, so there must be several different shuffles leading to the same position.)
It is also important to note that, since the cards exist physically, there is *technically* no luck involved, it's all predetermined by the movement and stack of the cards. Minecraft drops, however, are things spawned from nothing. There is no existing finite set of minecraft drops to shuffle and choose from. Each instance is literally a computer-generated dice-roll. The closest thing to "shuffling" is merely *how* Java calculates random numbers, but that is far far far more vast than a deck of cards.
Another case (for first games of the night) which might cause a deck to be perfectly organized, is when someone organizes them on purpose to count and make sure it's a full deck.
"Do I owe dream an apology" this is hilarious now that he's (dream) come out and said that he was running a modded version of the game in one of the most insulting "apologies" I've seen in a long time
@@AureliusR he made a pastbin link post on Twitter that was effectively a ‘twitlonger’ where he explained that he was admitting to having been using a modified version of the game without his knowledge. There are dozens of holes in his apology and he plays the whole thing like a victim of his own fame. It was pretty disgusting. He since deleted the tweet and blamed pastbin, but it’s very easy to find online
Let's just admire the three geared picture in the background. I like to think that Matt was so impressed by the picture when he saw it on a school, he said, "Can i have this?" and framed the picture on his wall. PS: humble pi; splendid book
It's quite common, when playing "friendly" bridge, if a deal is passed out, that is no one bids, the hands are collected, not shuffled but only cut, then redealt in some sort of group way such as 3 cards at a time. Since the hands, when collected, would have been sorted by each player into suits, this redeal can produce some interesting distributions. In competition bridge passed out hands are recorded as a zero score to both pairs.
In the french game of 'Tarot', which is a similar trick-taking game with actual trump cards where cards are always dealt 3 at a time, it is customary, for that very reason, to only sort one's hand once someone has actually bidded in the auction phase.
This is why in the first paper accusing dream they devoted a lot of it to analyzing if there was a bug in the minecraft code that could make the RNG behave less than randomly without outside interference. The conclusion was that it wasn't possible that it could happen for *both* the blaze rods *and* the pearl barters as the systems used for each were distinct.
The other thing was that it was effectively impossible to set up the number generator in a controlled way because they pulled a random number generator that is also pulled and updated by all of the lava blocks whenever they release a particle.
RNG manipulation is very common on every game up to the SNES era and some Playstation/N64 games but anything more modern tends to have a RNG that while not great is just too hard to setup correctly and reliably. Yeah there are ways to abuse RNG if it is saved by triggering RNG events to change the seed (works in Pokemon with save states in an emulator, opening bad changes the seed). For PC games you can typically abuse reloads except for xcom where you need to use up the seed first.
Antoine Chauvet also, it was in 1.16, which breaks most RNG manipulation. Even if you could do that for blaze rod and/or ender pearl drops, you’d have to make a careful setup using huge machines, while Dream simply did an otherwise normal speedrun
@@meneldal What does it say about XCom that it's RNG gets looked at that precisely? A 99% shotgun blast at point blank range being dodged will do that to you I guess...
As someone with a keen interest in magic tricks, in particular card magic, the second you said they started with a fresh deck I knew this would be about faro shuffling.
I didn't have your knowledge of magic tricks, but I did know that a fresh deck comes in a specific order (with the card suits all grouped together and the cards in a specific order), and figured that would be important to the story--which it was. (If I'm starting a new card game, I always "wash" shuffle the deck first just to make sure the deck is sufficiently randomized at the start of play, since even with previously-used decks, previous games may have caused the deck to clump in very not-random ways.)
Fittingly, the audio was shuffled in the first render, but all it took was a second render to make it perfect! (The story doesn't say whether they were "in" or "out" renders)
This happened to me and friends on a canal boat in 1981. We had just sorted the cards to check we had a full pack, but we were two mathematicians and two engineers. So were were less amazed and worked out what had happened.
Interesting side conversation, there was a story some decade or so ago that I was going through in college maths about professional bridge players (that seems to be lost in the internet ether but I would love to see again). In the community there is a belief that intuition and experience play a bigger role than good statistical decision making. Turns out there's a reason for this. In professional bridge, or at least at the time, shuffling was done at the table by the players, and universally no one was shuffling enough. So all the numbers people were figuring intuitively were actually the product of non-random clumps of suits pretty equally distributed about the board (because in general there are those same clumps pre-shuffling). When put to the test with a card shuffler, that 'intuition' turned out to be a disservice.
I learned this exact story in one of my classes!! In 1992 Persi Diaconis and Dave Bayer proved in their paper "Trailing the Dovetail Shuffle to its Lair" that [3/2 log_2 n + ø] is sufficient to randomize a deck of n cards. So for a deck of 52 cards, you need 7 shuffles! Up until then they had only been shuffling 4 times and after the change the players complained that "the cards weren't coming out right"
Just goes to show how fundamental group theory is. It just shows up when you analyze probability and combinatorics casually, and makes the understanding of the mechanics much clearer if you know the theory behind
You can really tell how skilled he is as a math communicator. I failed every level of high school math (although the first couple weren't for lack of understanding! I love algebra) and yet he makes these complicated math concepts not just easy to understand, but actively fun to learn about.
As a lil baby undergraduate math student, its fun seeing stuff like this, applying basic abstract algebra in real life. It is like I get to quiz myself as the video goes.
I used to be able to do that trick on purpose as the set up is fairly easy if you have enough practice. Starting with 26 cards makes it easier in my personal experience, but I learned in the times before TH-cam tutorials so a professional would be a better teacher.
@@akatoshslayer7599 Nice, I do enjoy card magic too. Yes, it is a fairly common trick for people that do "playing card demonstrations", obviously 99% doesn't cut it on an actual card table, but it's fun. If you haven't, just watch how Richard Turner does it, that may as well be his weakest trick hah the guy is a legend.
I like how the image says on top right corner, "Education works best when all the parts are working." but then the gears are impossible to rotate, which means they are all working in oposite directions xD
Matt has described it before as a pretty accurate depiction of education; "Teachers" and "students" mesh and turn, and then "parents" show up and block the whole mechanism.
Yeah it was an official promo poster for one of the school districts (I think it was, if not the national educational department) over there in the UK. Mathematicians saw it and rightly ran all over it with ridicule, and apparently Matt keeps it as an ironic joke, because funny.
Matt keeps it because he says it's actually entirely accurate: Everything WOULD work just fine, if it weren't for parents getting in there and jamming it all up
Two perfectly interleaved shuffles on a new deck, and cut however many times you like. Hey presto! I learned about this back when I was a kid playing around with magic tricks.
@@marcelobulhoes6180 I think maybe such an obviously fake shuffle in front of a bunch of guys with guns may give one quite narrow odds of seeing another sunrise.
@@marcelobulhoes6180 I think the point went way over your head, but the bullet that Wild Bill Quickdraw would fire at you when he thinks you're trying to stack the deck definitely wouldn't go over your head.
Funnily enough the science of Discworld already mentioned those "impossible" hands in 1999 in passing. Your illustration of likely ways for it to happen was pretty cool
by the way, this table at 18:14 is similar to the cases of a 3x3 Rubik's Cube, scrambling it by a specific set of moves until it returns to it's original state.
Quite frankly, I still think the best explanation would have been for him to say that he clearly forgot to revert the drops from his Manhunt series (not sure whether that’s pumped, but who cares). The fact that he was arrogant enough to claim that it wad all real is shocking.
people observing true random tend to develop narratives to explain why it appears not random, bc we're bad at gauging random things & good at pattern recognition & creativity. that or he's cursed ^^
This is a really good way of showing the distinction between mathematical probability and real-life events. Because Minecraft is a computer game, the theoretical probability of Dream's run is exactly the same as the real-life probability. As shown in this video, there are too many extraneous variables in real-life to assume theoretical probability = actual probability in this case.
That is not true. Video games all use pseudo-random number generators. If someone were able to determine what in-game actions or otherwise influence the pseudo-random number generator in order to get better outcomes, it would be possible to manipulate it just like this. Many old video game speedruns, such as ones on NES, SNES, and N64, rely on PRNG manipulation to get extremely unlikely events to occur consistently.
@@Ohrami My guess is that Dream couldn't (legitimately) explain how those unlikely outcomes had happened. If he'd explained that "Well, the process isn't really as random as it looks; if you do X, Y and Z before doing action A that results in loot, then it drops from loot table B which has C% chance of dropping the desired item D", and other players were able to verify that this was the case, and a similar thing happened for action E dropping item F more often, then the speedrun would have stood. Exploiting in-game mechanics for one's own benefit is generally considered not cheating by default. But this doesn't seem to have been what happened with Dream's runs.
@@MarsJenkarIt's also a humbling lesson for all of us, you can never 100% trust your own memory and you should never lash out at someone that is trying to correct you.
As soon as you said it takes 52 In shuffles to get back to the start, I knew it would be another video and that I will inevitably watch the whole thing.
When I was in uni, we spent an entirely inappropriate mount of time playing bridge. I recall a number of anomalous hands including at least one perfect hand occurring over the course of a couple of weeks. Being engineers, we got to discussing the mathematics of the occurrence and basically discovered the permutation features you discussed here. After that we got a lot more diligent about shuffling, including multi-way cuts and recombining partial shuffles to make sure the deck was sufficiently randomized. And every *new* deck wass the subject of a 52-card pickup game before the first deal :)
Fantastic video. You are thorough in your analysis. As the video progressed several “ah but what abouts” occurred to me only to have you address them right away. Perfect. Accept my like!
Dear sir Matt, I am researching on Riemann hypothesis for the last 3 years and successfully I have found a formula for 'a' in Zeta(a+ib) in terms of 'b' and some hard looking definite integrals which are in terms of 'a' and 'b'which I was not able to solve so I am challenging you to solve those integrals . I am really a big fan of you so that's why I am presenting this problem to you. I used Riemann xi function and Riemann functional equation for Zeta function to find the formula for 'a'. Please make a video on those integrals. Integrals are:- 1)integral from 1 to infinity of x^((a-2)/2)*f(x)*cos(ln(x)*b/2) + x^(-a-1)*f(x)*cos(ln(x)*b/2) 2)integral from 1 to infinity of x^((a-2)/2)*f(x)*sin(ln(x)*b/2) - x^(-a-1)*f(x)*sin(ln(x)*b/2) Where f(x) = summation from n=1 to infinity of e^(-(n^2)*π*x)
Also known as the Vegas Wash. Destroying any possible order that the players could use is fairly vital to casinos, so they wash the deck, then do multiple riffle shuffles and cuts before the game starts.
If you can define your shuffle card by card, you can repeat a single shuffle and only get back after 72930 repetitions by using cycles of 1, 2, 3, 5, 11, 13, and 17 cards respectively.
This reminds me of Rubik’s cube, if you do same movement across 4 edges, it’ll repeat. I forgot how many cycles were needed, but I tried left edge up, top edge right, right edge down, and bottom edge left. It’s really fascinating how many things are related
There was a time when I was a computer undergrad when I made a C++ algorithm that found cycles in any arbitrary graph where every node had at most one link. It would be pretty easy to adapt that to this particular episode's topic, since all one would have to do is put numbers 1 through 52 into an array, do some in and out shuffles, and make a directional link from indexes of the original array to the transformed array, multiply the lengths of unique cycles, and iterate through any range of in and out shuffles. I'll probably be doing this in the near future. Thank you Matt for your amazing and very interesting videos! The last few have really been piquing my curiosity lately.
Someone should really get Persi Diaconis on the case. His famous paper with Dave Bayer called "Trailing the Dovetail Shuffle to Its Lair" is about this exact sort of thing. He proves that a certain method of performing dovetail shuffles (aka riffle shuffles) described by Gilbert, Shannon, and Reeds is optimal for randomizing the deck, and that for games like Bridge, if you start with a sorted deck, it takes about seven of these optimal shuffles to make the deck suitably random to play Bridge (at least for casual purposes; not really for money). However, he also points out that real shuffles are not optimal, and that most people are far more likely to cut the deck nearly in half and perform a nearly Faro shuffle than they are to make a lopsided cut or to shuffle big clumps in. Even in his optimal shuffle, the in and out Faro shuffles are the most probable shuffles, but their probability is still extremely low because there are so many other shuffles that can be performed. Real people do not follow the optimal binomial distribution he describes, instead being too biased toward middle-of-the-road shuffles similar to the Faro shuffle. Even so, it turns out that real people tend to shuffle well enough to sufficiently randomize a deck in at most seven shuffles, with the possible exception of skilled shufflers, who paradoxically are the worst shufflers in the world, because they most reliably shuffle the same way each time.
Also if it was an old deck the thing you always do before playing, at least in my family, is check that you have all the cards (by arranging them in suit order)
The fact that bridge puts the suits together is probably a major factor. This increases the chances of a luck shuffle. Also I used to play cards a bit. I loved trying to do a pharoh shuffle and though I never checked I am sure i got them pretty often.
The longest cycle you can get for a given permutation on 52 cards is a cycle that is composed of sub-cycles of length 4, 5, 7, 9, 11 and 13 (+3 extra cards) for a total length of 180,180.
I'm glad Matt has finally cracked the algorithm. You literally just have to put Dream in the thumbnail and you get a countably infinite amount of views.
not only that but the title could feasably still be about minecraft. personally I forgot that bridge was a game and thought it was referring to some new controversy about minecraft luck, this time with someone trading piglins in a bridge bastion
Unfortunately dream has found a way to get uncountable infinite views. It’s only a matter of time between a channel that specializes speedrunning reactions to fortnite unboxing in mindcraft makeup tutorials discovers views in the complex plane.
@@Llanowar_Kitten I don't think I can give a video .31415926535 views. It's just regular countable infinity. You can keep counting countable infinity, it starts at 1 and keeps going forever (1, 2, 3, 4, etc etc). Meanwhile uncountable infinite starts at 0.00(infinite amount of zero's)001. You can never actually be done counting even the first number, because you can keep adding zero's forever.
Speaking of minecraft.. you may be interested to learn in the math and reverse engineering that has been done to get a new world record speedrun in the game. A youtuber named Mathew Bolan takes advantage of the Java random number generator being a Linear Congruetial Generator and the number of times this gets called to relate different structure generation in a minecraft world (has several slide decks going into more detail on his channel). In particular, there's a place overlooked in the code where part of the "randomness" is zeroed out, making the correlation obvious even without knowing the world's "seed". This is a well known topic with this sort of randomization, but it's a fun practical application of the math and vulnerability of Java.random() at work! The new world record looks at a bone structure generated in the Nether at the initial spawn "chunk" 0,0- with that, they plug in optimal coordinates later in the run to beat the whole game in under 10 minutes. Personally, I find it a beautiful convergence of math, programming, gaming, and speedrunning, so it seems like a perfect topic for the channel :)
Given the popularity of Minecraft, I figured it wouldn't be too long before speedrunners just reverse engineered the RNG itself. I find the cleverest part not to be the reverse engineering itself, but how you apply it to figure out where you are in the random sequence.
From No Game No Life: “What's the probability of drawing the ace of spades from a deck with no jokers? Normally it would be 1/52. But what if its a brand new deck? The position of cards in a new deck are typically identical, so that means if you take out the jokers and draw the card at the very bottom, it’s the ace of spades almost 100% of the time. Oh that’s right! I didn’t say a word about it being a new deck. Rather, you didn’t ask. Being aware of that simple fact would've turned your 1.92% chance to 100%.” - Sora
Just to chuck my spanner in the works. There are plenty of social bridge players who don't shuffle at all, they just cut. The key to this is to understand that bridge tricks are retained by the winner of each trick through each hand, the cards are not discarded. That confirms the trick count at the end of the hand. Many players will also arrange the tricks in suit order: Clubs, Diamonds, Heart, Spades. Then each of the four arranged piles of cards are stacked in the same order around the table. That deck then contains large numbers of cards, suited in sets of four. In order to break the pattern a little, the deck is cut. Then the cards are dealt in packets, 4,3,3 & 3. The 4-packet progresses around the players, so all get 13 cards. It makes for many more Slam possibilities, as well as awkward distributions.
He didn't do it as a sleight though. You can do this the way he did it pretty quickly. Learning to do it in a way that is not seen is a whole different skill and takes years to master.
I'm surprised that Matt didn't try the Thue-Morse sequence (aka the Fair-Share sequence) to see how long it would take to restore the deck to its original state. He made a video on the sequence in November 2015.
Just to note, the longest cycle you can expect to find will have length 180,180 - which is the value of the Landau function on 52. There many not be actually be an element in the group generated by I and O Faro Shuffles which actually has this length, however. That group has order 2^(26) * 26! or 2.71*10^34 - so an exhaustive search for such an element is not practical (presumably there's some clever way to figure one out but I can't think of it).
I once wrote a python script that would take a rubick's cube algorithim and would tell you how many times you would have to perform that sequence before you ended up back where you started
I’m not sure if this is the case worldwide, but here in the United States, dealers are taught to do almost exactly what you’re showing when you shuffle. At dealer school, the pit boss will have you shuffle over and over until you are as close to 1-1 on each side of the shuffle (no clumps). Your explanation is the most likely for sure.
In whist (at least the version I use to play), cards are dealt 4-5-4. This deal tends to more easily create long colors, as the game night carries on and cards tend to be more sorted than random due to former rounds, but I am not sure if it changes anything for the very first deal, in terms of combinatorics.
I'm glad I subscribed to this channel. I hit the button when I saw this channel featured in a collab with Steve Mould on the "I Made A Water Computer And It Actually Works" video.
Ngl it's actually quite sad seeing part of the Minecraft community still cannot tell how profit-driven Dream is. I really missed the old contents from enthusiasts like Sethbling... :c
Question- I come up with a different answer (even less probable) using this method... the first card we don't care about, it should never feature, it is a marker so 52/52 The second card need only be a different suit from the first card, so that is 39 in 51, the third card needs to be a different suit from the first two- 26 in 50, the 4th card needs to be different from the rest so that is 13 in 49 then things change... the 5th card being dealt perhaps better expressed as 12 in 48 (there are 12 spades, and you need to get one of them, out of the 48 cards left in the deck), and so for the 6th card it is 12 in 47, 7th is 12 in 46, 8th is 12 in 45 (i.e. if you have gotten to that point there are 45 cards left, and you have still 12 left of that suit ), and you can then carry on all the way to the last card. using the same method, so 11/44, 10/40 etc. Multiply all that together you get 4.47X10^-28 Interestingly only 50 cards actually impact your probability, because the first one could be anything, and the last one mist be correct if all the other steps are right where am I going wrong?
Your method is correct but your outcome is not. This is probably the more intuitive way to calculate it then what Matt did ( at least to me) but also alot more typing. Wich is where your mistake must have been: incorrectly putting in a number in your calculator.
Matt, in the early history of Magic:The Gathering as a professional competition, you were allowed to "shuffle" by pretending to deal out hands and then stacking those on top of each other, basically allowing perfect Pharoah shuffles but where you are splitting the pile into 4 or 5 or 7. I would be really interested in hearing about the cycles in those kinds of set ups, which were used to ensure that the "randomisation" part of the game didn't happen. If you are interested in more background I could get you in touch with some people. Thanks for the great video!
I did the 8 shuffle perfect faro thing when I was a child- around 10 or so just to see what happened to the order of cards in a new deck. I knew at an intuitive level that eventually the perfect order would recur, but not how many it would take.
I remember teaching an example sheet question in the Cambridge Maths Tripos on in- and out- shuffles (written by Prof Tom Korner). It's a question of writing down the cycle decomposition of the permutation that each shuffle implements, just as you did in the video.
So...I finally got around to reading (or rather listening to) your book. One question. How many more do you go planned? I enjoyed it greatly. Your dry (not so dry?) math-y nerd-y humor and the facts really go well together. Certainly need a specific type of audience, but for those interested, it’s certainly a great read.
A long time ago I was at a party with 5 people. Four of them wanted to play bridge. I didn't but agreed to shuffle one deck while they played the other. Since I was bored... Well, you get the idea. After they looked at their cards I counted to three before one of them declared foul play.
You should have also included in this the relationship of "in" and "out" shuffling and how you can place the top card anywhere you like in the deck. This has a close relationship with binary numbers, and has some very basic use in card magic.
You should follow this up with the best return of randomness for riffle shuffles assuming they aren't perfect inside or outside faro shuffles. For games of poker, 51 shuffles is supposed to be the best because it is one less than the inside faro, but it's also unlikely for each hand. 7 is considered the next best, and 3 is the best for a friendly game amongst friends striking a balance between fair shuffling resulting in high entropy without taking up a lot of time... So it seems to me the should be a way to classify the entropy of a deck and the ideal number of shuffles for creating high entropy with the fewest number of shuffles. Perhaps dividing the deck into approximate thirds and some new way to riffle the three subdecks would accomplish this faster? I think there are several more videos which could be researched on the topic of card shuffling.
Matt's actually one of the reason i started studying statistics (best choice of my life ngl) and damn he rekindles this flame with every video. Like...thats so cool. Being so obsessed with shuffling cards back and forth is exactly the passion we all need :D
A thought I had while watching this is that if you used a "perfect" shuffling machine (that is, it shuffles a deck cut in halves, perfectly interlaced from one half each card) you would have a simple and likely "accidental" scenario where the machine was setting up a sleight-of-hand Faro deal every time. In other words, the more "perfect" a shuffling machine (assuming you cut the deck in half perfectly and start with a brand new deck or it's set up in any other multitude of ways as mentioned in the video), the worse it is at it's job of providing a fairly shuffled deck.
Here in Belgium at least, when we deal all the cards we don’t usually give each player one card until they run out, but rather four four five. It tends to enable slightly better gameplay than a random shuffle and deal. Cards are played by suit so they’re picked up by suit in a generally sorted order, increasing the odds of getting thirteen of a suit. It happened to me once or twice, we call it solo slim. Though, that is just one of four players having all of one suit. But then often the others also have many.
Reminder that you can watch Art's magic math videos on your free trial to The Great Courses Plus: ow.ly/I5fV30rDCPO
Or if that is too much fun: watch me shuffle a deck of cards 52 times LIVE.www.patreon.com/posts/50353681
thank you for making a good video
I know this is a bit more applied than what you normally cover, but what are the odds of "accidentally" performing a farrow shuffle? You've definitely shown the effects of biased starting conditions but I was really hoping you could get an estimate of the odds of performing a farrow shuffle on any presorted deck (not just new deck order, i.e., number of bridge games that start with a presorted deck) to really drive home how unlikely dreams run was. I know you like pure maths better but a bit of human nature is always interesting.
sir I have a question
if a solid has a volume of Pi cubed
will it have infinite volume?
@@matthewfrederick3291 yh i honestly was expecting the odds of getting 1-2 perfect shuffles to be the end of the video rather than looking at all the cycles of the shuffles. the actual probability of this occuring needs to be calculated
in 15:12 you said "riffle shuffle" instead of "Faro shuffle". It doesn't matter in this situation or is that the first mistake I spot on your videos before someone else?
After watching the intro, the answer seems obvious to me: every senior citizen plays millions of hands of bridge every second.
XD
Your number seemed too low for me, but then I double checked. using the odds given and the population of the world over time, I arrived at a figure of 9.6 million hands of bridge per old person per second. Simply immaculate.
@dorol6375 No wonder their hands are so arthritic.
If an infinite number of monkeys played an infinite number of bridge hands, eventually they would be senior citizens
@@wtfpwnz0redbut not all infinitely many monkeys would be senior citizens
If this just becomes a series of debunking low probability events in history, I'm living for it.
Need to find the next previously thought of lucky chance recorded event,.. and feed it into the Matt P machine.
I'd start watching this channel if that was the case.
@@MisterJackTheAttack there is a very low probability, that this channel changes to be only about low probability events.
@@ollllj I'm liking that comment :D
Which is completely impossible, but sure, let's try!
Another case where an old deck of cards could realistically be sorted by suit: The deck had just been used to play Klondike solitaire.
There are also people who sort their cards prior to putting them back away.
@@joeo3377 Don't call me out like this
Or any other solitaire variety where the foundations are built by suit, like Freecell or Yukon
@@StormTheSquid I don't speak from personal experience! I'm commenting... on behalf of a friend. Yeah. Not myself.
@@StormTheSquid dont worry, i do that while talking for a bit while cleaning up
Matt has finally discovered the time tested content creator strategy of putting Dream in the thumbnail
LMFAOOO
Could've been bigger for maximum value
My man learned how to do a perfect faro shuffle just because people questioned his other odds video regarding a supposed perfect bridge deal. Dedication.
I'd not be surprised if at least half of these perfect deals were orchestrated by one member of the group just trying to add some excitement to their friends' lives.
I play bridge. Can confirm the one time this happened to me it was orchestrated and the dude owned up pretty quickly. :)
I'm sitting here like, so was the dealer's name Richard Turner?
Yeah, some old people can be very cheeky...
Exactly. Never simply trust people with stuff like this.
DMs do be fudging.
I know Matt is really trying to popularize his coined phrase of 1 in 3.1E19 as "The Ten Billion Human Second Century", but I much prefer 1 in 2.0E22 as being formally recognized as a "Dream Come True".
His number is also more properly ten billion centuries per second. The way he calls it, it should have the dimension of time squared.
@@EebstertheGreatYes, but a little easier to understand as Ten billion (human operations) per second (for a) century.
An American friend of mine wants to call 1 in 3.1 x 10^19 the "Theoretical Upper Limit of Sustained Activity", or TULSA for short.
Yes, my friend is from Oklahoma.
"The Parker Second"
In the gaming community, people just refer to any good luck as "Dream luck" now.
When Matt was saying "its obviously not going to happen here" but you've watched Matt Parker enough to know there is some sort of tomfoolery going here
I didn't expect that tomfoolery to be the answer so well played my good sir
I didnt expect the tomfoolery to be him actually shuffling 52 times!
I think I've seen him do the 8 perfect shuffles resets the order thing before. I had some idea where he was going with this.
I was very confused when he cut the deck without taking a careful look because I suspected that would mess up the order. As he later explained, it didn't.
@@Leyrann i think It's a common way to distract viewers when performing a card trick, it looks like it does something when in fact it does nothing
I first thought: Man, he is uncomfortable and clumsy with shuffling - turned out he was merely focused on not shuffling
If the cards are shuffled by humans then the deals are never random. I've been playing competition bridge for over 45 years and there was a huge change in the game when the competitions moved to computer generated random hands.
I'd be super interested to hear any specifics for how it changed if you have the time to type some up!
@@Pattonator14 Another long time bridge player here: The main difference is suit distributon. Hand shuffle tends to give more even deals regarding suits. As in you rarely get more than five to six of any given suit and usually at least two of each of the remaining three. Whereas computer generated shuffles tends to much more often give longer suits of seven and even eight and more often your hand can have zero of a suite.
The reason behind this is the way bridge is played and how tournament bridge is organised. When a game is finished the dealt hands get put into a folder that has four individual pockets; one for each position. Then the folder is sendt to the next table and they play the same game and so on. At the end of the tournament the cards are put in their respective pockets habitually.
Now, in bridge it is wery common to play 'suit by suit'. Or at least it is very common to play two, three or more rounds of the same suit before moving on to the next one. Since Bridge trick scoring is tracked with the actual cards; each player put the played card in front of them, either north/south or east/west depending on who got the trick, the suits often get bundled.
So when the next tournament is about to start and the players remove the cards from the folders, in this bundle style from the last time they were played, and put them on top of each other the cards would be wery not random. Shuffle a few times and still many of the cards of a given suite would be spaced out by four.
This causes the distribution to be unnaturaly even compared to true randomness.
Of course; This could be solved by doing a casino shuffle. But nobody got time for that.
@@SuperPhexx oo ty for the response!
That makes a lot of sense. I'm pretty pedantic about shuffling and even I usually only end up doing 3/4 of the required 7 riffle shuffles for randomness so I can see how that would come.
I've played bridge and a bunch of other tricktaking games (shoutout to Skat!) casually with family and would think that it would be more fun/interesting with the less even suits?
Human shuffles are random. Computer shuffles aren't.
@@mrosskne wat
As someone knew how to do a faro shuffle already and who noticed him doing it at the beginning of the video, I was impressed when he flipped over the cards and they were all arranged perfectly. I was thinking, "there's no way he's going to do a perfect faro shuffle twice while talking," but he did it. It's really hard to do, and I'm impressed.
Matt Parker doing what math teachers do best: crushing dreams.
ooooof
Dream
It’s more than that I’m afraid. Much deeper.
Mathematicians wake up one morning and have a sublime enlightened awakening. A realisation that their profession is not a science nor does it have any strong connections with reality and truth. Any connections with reality or truth are not only coincidental, but based on self confirming axiomatic neuroticism.
By lunch time they accept the fact that they are deranged clowns urinating in a circus rink.
....it’s all down hill from there I’m afraid
@@PetraKann heheh math go brrr
😭😭😭😭
I think it is important to note that long term bridge players are so good at shuffling that they could very well do perfect consecutive faroh shuffles without doing it on purpose.
if they were "good" they shouldn't do perfect shuffles, as you see they don't mix the cards effectively
@@tafazzi-on-discord Yes, but if they didn't really think about that, didn't do it professionally, but just... played bridge A LOT, this would make sense. And that's the situations where all of these incidents seem to pop up.
@@baguettegott3409 agreed brother
@@BODYBUILDERS_AGAINST_FEMINISM lol "brother"
I love how when you're online and anonymous, everybody just assumes you're a dude.
@Kanpindon, see my post. This did, unknowingly, happen and this was resolved by computer shuffling.
Imagine if Matt did a real random shuffle and tried again and again to get that perfect bridge shot. Like that 10 heads in a row video
Exactly what I thought when he started dealing lol
Would be funny but the two probabilities aren't even remotely close
@@nexaentertainment2764 that’s the joke
If he was immortal, he probably would
That is absolutely what I was expecting when we started and I saw 20+ minutes
If you want a fair game you need to do the most unprofessional shuffle.
The spread it out and stack it back together method.
Isn't that the method used in Vegas?
anyone who knows anything about cards know that "washing the deck" like you stated is a bare minimum if you want a truly random deck
Just throw about 10 full decks into an empty paint can and run it through a paint mixer machine
I don't know if it's regional, but here in Russia cards (at least in casual games) are shuffled just by randomly taking a bunch of cards and tossing it back into the stack over and over and over like a dozen times in quick succession without even looking at it, the sloppier the better. I always assumed this is the only way you shuffle, when I learned how most shuffles are done it just blew my mind, these are not random at all.
@@mihan2d Here in argentina we do the same as far as i know, and sometimes we combine it with other types of shuffles to make it even more random
Anticipating an influx this month of local newspapers reporting that a perfect bridge deal occurred because Matt's viewers are going to pull this trick on their friends and attain local fame.
It’s hard to do and look natural. Not impossible with practice, but you’re going to need to do it first try or people are going to wonder why you keep pulling out new decks.
As a MTG player who's been double nicked too many times, I decided about 40 seconds in that the problem here was the shuffle
Yeah, it seems fairly clear. Perfect rifle shuffles happen all the time, particularly if the cards are stiff (new or sleeved), or the person doing it is decent at making an even split. Matt does the obvious one-by-one interleaving, but a good old face down on the table-rifle shuffle will do.
There's was a hilarious counter to the double nickel. If you 'shuffled' their deck correctly after they'd double nickel'd, you'd separate their lands and spells.
I remember once I built a deck, shuffled by making stacks and placing them in order, and then found all lands stacked on top of each other... oops.
I've always taken more care in shuffling since then.
@@Leyrann I do that, but only once after building it, well before an event. It's mostly ritual at this point but still
Any type of card competition should require a "sluff" shuffle("sluff" them on the table like you're mixing grandma's gravy I don't know what the actual name is). Way too many ways too false shuffle that look fair and as we saw cutting does nothing.
TL;DR: You can move a card in any position to any other position using a combination of at most 6 in- and out-shuffles.
Make a directed graph with 52 vertices (1 for each position in the deck) and two edges out (1 for in shuffle, and 1 for out shuffle). Running the Floyd-Warshall algorithm will find the shortest path between each pair. The longest of the shortest distances will be the maximum number of shuffles needed to move a card from any position to any other position.
EDIT:
I coded it up and you can move a card from any position to any other position with at most 6 in- or out-shuffles.
Some interesting things I found while doing this:
- Moving a card from the top, to the bottom is an example of needing the maximum 6 shuffles.
- Cards in some positions can move to any other position in at most 5 shuffles, e.g. the card second from the top. A magician could potentially use this to shave off one shuffle from the trick, in some cases.
- - Proof that a card in a given position needs at least 5 shuffles in the worst case to move to another given position:
There are 52 positions in the deck, and the shuffles must be able to reach each one. There are two different shuffles, and in the best case they make sure the card ends up in a position it hasn't been in before. With no shuffles we reach 1 position, the starting position. With one shuffle we reach at most 2 new positions from the starting position, covering 2+1=3 in total. With two shuffles, we can reach at most 2 new positions, from each of the 2 previous positions, after one shuffle, giving us 4 new positions or 2^2. In general after the k'th shuffle we reach at most 2^k new positions, covering 2^0+2^1+2^2+...+2^k total positions. This is also known to be 2^(k+1) -1. With four shuffles this gives us a total of at most 2^(4+1) -1 = 31 positions covered in total, which is not enough.
(Shuffling 5 times gives us at most 2^6 -1 = 63 positions, which could be enough, if each position is unique. However, it seems from my code that the top card, in some cases needs 6 shuffles to move to a certain position, so there must be several different shuffles leading to the same position.)
Yea, I have ADHD, too.
@@adamc5914 i feel called out in this youtube comments section tonight 😳
@@rin_etoware_2989 they were nice enough to start with the tldr. It ends at the break line.
"...the deck was already stacked, and I maintain the same still applies to Dream." Brutal.
maintain*
@@BusyAnt1234 lol, this is why I shouldn't make comments when I'm super tired
@@brandonfaddis7443 what is was been it before
22:28
It is also important to note that, since the cards exist physically, there is *technically* no luck involved, it's all predetermined by the movement and stack of the cards.
Minecraft drops, however, are things spawned from nothing. There is no existing finite set of minecraft drops to shuffle and choose from. Each instance is literally a computer-generated dice-roll.
The closest thing to "shuffling" is merely *how* Java calculates random numbers, but that is far far far more vast than a deck of cards.
Another case (for first games of the night) which might cause a deck to be perfectly organized, is when someone organizes them on purpose to count and make sure it's a full deck.
"Do I owe dream an apology"
this is hilarious now that he's (dream) come out and said that he was running a modded version of the game in one of the most insulting "apologies" I've seen in a long time
Oh he did? Where was that?
@@AureliusR he made a pastbin link post on Twitter that was effectively a ‘twitlonger’ where he explained that he was admitting to having been using a modified version of the game without his knowledge. There are dozens of holes in his apology and he plays the whole thing like a victim of his own fame. It was pretty disgusting. He since deleted the tweet and blamed pastbin, but it’s very easy to find online
@@Spirelord122 He wasn't playing victim
@@rieldebonk1044 He absolutely was. he mentioned how he claimed the mods handled the situation poorly more often than he claimed he was in the wrong
@@Spirelord122 How do you use a modded version without knowing it? Did someone break into his house and mod the game while he was asleep?
Let's just admire the three geared picture in the background.
I like to think that Matt was so impressed by the picture when he saw it on a school, he said, "Can i have this?" and framed the picture on his wall.
PS: humble pi; splendid book
That's pretty much exactly what happened. He's talked about that graphic before.
He actually bought ownership of that picture if I remember correctly.
I like to think the school is admitting that it's a completely dysfunctional institution.
@@ceruchi2084, it’s a discreet way for the school to say they’re trying their best, but the parents keep getting in their way.
@@felipevasconcelos6736 Yes!! Lol. Some passive-aggressive graphic designer went to one PTA meeting too many.
It's quite common, when playing "friendly" bridge, if a deal is passed out, that is no one bids, the hands are collected, not shuffled but only cut, then redealt in some sort of group way such as 3 cards at a time. Since the hands, when collected, would have been sorted by each player into suits, this redeal can produce some interesting distributions. In competition bridge passed out hands are recorded as a zero score to both pairs.
Solo Whist does this deliberately to increase the odds of distributional hands.
In the french game of 'Tarot', which is a similar trick-taking game with actual trump cards where cards are always dealt 3 at a time, it is customary, for that very reason, to only sort one's hand once someone has actually bidded in the auction phase.
while the real solution is to put all cards in a pile, spread them across the table, shuffle like that, and combine to a deck back again
This is why in the first paper accusing dream they devoted a lot of it to analyzing if there was a bug in the minecraft code that could make the RNG behave less than randomly without outside interference. The conclusion was that it wasn't possible that it could happen for *both* the blaze rods *and* the pearl barters as the systems used for each were distinct.
The other thing was that it was effectively impossible to set up the number generator in a controlled way because they pulled a random number generator that is also pulled and updated by all of the lava blocks whenever they release a particle.
Also if that was the case, there would be more anomalys than just these select streams by dream...
RNG manipulation is very common on every game up to the SNES era and some Playstation/N64 games but anything more modern tends to have a RNG that while not great is just too hard to setup correctly and reliably. Yeah there are ways to abuse RNG if it is saved by triggering RNG events to change the seed (works in Pokemon with save states in an emulator, opening bad changes the seed). For PC games you can typically abuse reloads except for xcom where you need to use up the seed first.
Antoine Chauvet also, it was in 1.16, which breaks most RNG manipulation. Even if you could do that for blaze rod and/or ender pearl drops, you’d have to make a careful setup using huge machines, while Dream simply did an otherwise normal speedrun
@@meneldal What does it say about XCom that it's RNG gets looked at that precisely? A 99% shotgun blast at point blank range being dodged will do that to you I guess...
I love how this video inadvertently explains how tons of card magic tricks work.
As someone with a keen interest in magic tricks, in particular card magic, the second you said they started with a fresh deck I knew this would be about faro shuffling.
I didn't have your knowledge of magic tricks, but I did know that a fresh deck comes in a specific order (with the card suits all grouped together and the cards in a specific order), and figured that would be important to the story--which it was. (If I'm starting a new card game, I always "wash" shuffle the deck first just to make sure the deck is sufficiently randomized at the start of play, since even with previously-used decks, previous games may have caused the deck to clump in very not-random ways.)
Magic squares: "How hard can it be"
When you laugh out loud and realise you have watched waaay to many YT videos...
not too many, just the right one...
Is that like a Parker Square?
I literally did the same thing
@@matthewhafner962 Yes, that's exactly what Matt was referring to. He knew his fans would get it.
Can I get a timestamp or a general location?
Took my man 22 minutes to put the smackdown on dream again. Worth every second
I don't think you know how to use the word "smack down"
@@myselft36yearsago he used them right
Fittingly, the audio was shuffled in the first render, but all it took was a second render to make it perfect! (The story doesn't say whether they were "in" or "out" renders)
Two *ex*ports mean that it was two outs
This happened to me and friends on a canal boat in 1981. We had just sorted the cards to check we had a full pack, but we were two mathematicians and two engineers. So were were less amazed and worked out what had happened.
Dream recently admitted that he had a mod running that increased the chances for him. You (and almost everyone) were right :)
Interesting side conversation, there was a story some decade or so ago that I was going through in college maths about professional bridge players (that seems to be lost in the internet ether but I would love to see again). In the community there is a belief that intuition and experience play a bigger role than good statistical decision making. Turns out there's a reason for this. In professional bridge, or at least at the time, shuffling was done at the table by the players, and universally no one was shuffling enough. So all the numbers people were figuring intuitively were actually the product of non-random clumps of suits pretty equally distributed about the board (because in general there are those same clumps pre-shuffling). When put to the test with a card shuffler, that 'intuition' turned out to be a disservice.
I learned this exact story in one of my classes!! In 1992 Persi Diaconis and Dave Bayer proved in their paper "Trailing the Dovetail Shuffle to its Lair" that [3/2 log_2 n + ø] is sufficient to randomize a deck of n cards. So for a deck of 52 cards, you need 7 shuffles! Up until then they had only been shuffling 4 times and after the change the players complained that "the cards weren't coming out right"
And just like that, Matt Parker rediscovers group theory.
I assume he switched to standard notation at the end on purpose
Just goes to show how fundamental group theory is. It just shows up when you analyze probability and combinatorics casually, and makes the understanding of the mechanics much clearer if you know the theory behind
He's getting too powerful
@@TheEternalVortex42 it's technically too related to ignore for permutations. All groups are isomorphic to subgroups of permutations.
Tracking the dovetail shuffle to its lair by Persi Diaconis
You can really tell how skilled he is as a math communicator. I failed every level of high school math (although the first couple weren't for lack of understanding! I love algebra) and yet he makes these complicated math concepts not just easy to understand, but actively fun to learn about.
These math concepts are not at all complicated.
Alexis Mandelias maybe not to you, but math doesn't come easy to a lot of people, to some algebra is complicated to others it's easy.
what kind of shithole gives you a diploma without passing all subjects?
You're also older now.
@@tafazzi-on-discord have you heard of a grade point average or a credit system?
As a lil baby undergraduate math student, its fun seeing stuff like this, applying basic abstract algebra in real life. It is like I get to quiz myself as the video goes.
TL;DR: They played a magic trick on themselves.
I used to be able to do that trick on purpose as the set up is fairly easy if you have enough practice. Starting with 26 cards makes it easier in my personal experience, but I learned in the times before TH-cam tutorials so a professional would be a better teacher.
@@akatoshslayer7599 Nice, I do enjoy card magic too. Yes, it is a fairly common trick for people that do "playing card demonstrations", obviously 99% doesn't cut it on an actual card table, but it's fun. If you haven't, just watch how Richard Turner does it, that may as well be his weakest trick hah the guy is a legend.
I like how the image says on top right corner, "Education works best when all the parts are working." but then the gears are impossible to rotate, which means they are all working in oposite directions xD
Pretty sure it's a nod to the old Numberphile video talking about three gears which prominently featured that exact picture.
Matt has described it before as a pretty accurate depiction of education; "Teachers" and "students" mesh and turn, and then "parents" show up and block the whole mechanism.
Yeah it was an official promo poster for one of the school districts (I think it was, if not the national educational department) over there in the UK.
Mathematicians saw it and rightly ran all over it with ridicule, and apparently Matt keeps it as an ironic joke, because funny.
@@Nighthunter006 In my experience, teachers are the issue.
Matt keeps it because he says it's actually entirely accurate:
Everything WOULD work just fine, if it weren't for parents getting in there and jamming it all up
Two perfectly interleaved shuffles on a new deck, and cut however many times you like. Hey presto!
I learned about this back when I was a kid playing around with magic tricks.
If you happen to find yourself miraculously transported to a Wild West poker game, under no circumstances shuffle like that.
I think you’d have bigger problems to worry about
Why not?
@@marcelobulhoes6180 I think maybe such an obviously fake shuffle in front of a bunch of guys with guns may give one quite narrow odds of seeing another sunrise.
@@andrewbradley9052 I mean, it’s not a fake shuffle, just a really perfect one; if you do it enough times (aprox. 7 times) it’s as good as random
@@marcelobulhoes6180 I think the point went way over your head, but the bullet that Wild Bill Quickdraw would fire at you when he thinks you're trying to stack the deck definitely wouldn't go over your head.
I tried to learn perfect faro shuffles to prank family gatherings but you’re insane for getting this consistent at them! Nice one Matt!!
I love you coming so dangerously close to going down a group theory rabbit hole at the end of the video without ever mentioning groups :)
Funnily enough the science of Discworld already mentioned those "impossible" hands in 1999 in passing. Your illustration of likely ways for it to happen was pretty cool
I especially like how the audio is correct
Audio that is correct is such a crowd pleaser.
@@standupmaths Wait, did I miss the "Parker audio" version? I guess I am not early enough.
I liked the old audio.
@@vincentpelletier57 The original upload of this video had audio that went wonky a bit before the 3 minute mark.
Hello there Xero!
When I saw that shuffle, I KNEW EXACTLY WHAT YOU were up to! You were doing perfect riffle shuffles!
by the way, this table at 18:14 is similar to the cases of a 3x3 Rubik's Cube, scrambling it by a specific set of moves until it returns to it's original state.
"I don't think you'd want to see that"
actually we totally wou-
"actually, you would"
well played
"But Dream could have shuffled the trades in groups of two!!!" - A Dream fan
by shuffling the seed in groups of two, he managed to enter the Nether in second gear
Quite frankly, I still think the best explanation would have been for him to say that he clearly forgot to revert the drops from his Manhunt series (not sure whether that’s pumped, but who cares). The fact that he was arrogant enough to claim that it wad all real is shocking.
@@ZeteticPhilosopher not accepting fault can be concluded that he did it intentionally. Shame what ego boosts from a quick growing channel did to him
@@Cloiss_ i get that reference
They don’t know how to minus yet though.
Serious Audio Issues is my new band name
I hear they take a while to get into.
@@standupmaths You gotta give Serious Audio Issues a try, they’ll render you speechless!
Don't forget their support act 'The Tinnitus Trolls"!
All of my Dreams will come true if Matt now takes the time to explain Will Wheaton's Dice curse
people observing true random tend to develop narratives to explain why it appears not random, bc we're bad at gauging random things & good at pattern recognition & creativity.
that or he's cursed ^^
Some people just built different
@@sjs9698 Honestly, I don't disagree. Statistically, Wheaton may not be cursed. But I would like a Matt debunking of it nonetheless.
This is a really good way of showing the distinction between mathematical probability and real-life events. Because Minecraft is a computer game, the theoretical probability of Dream's run is exactly the same as the real-life probability. As shown in this video, there are too many extraneous variables in real-life to assume theoretical probability = actual probability in this case.
That is not true. Video games all use pseudo-random number generators. If someone were able to determine what in-game actions or otherwise influence the pseudo-random number generator in order to get better outcomes, it would be possible to manipulate it just like this. Many old video game speedruns, such as ones on NES, SNES, and N64, rely on PRNG manipulation to get extremely unlikely events to occur consistently.
@@Ohrami My guess is that Dream couldn't (legitimately) explain how those unlikely outcomes had happened. If he'd explained that "Well, the process isn't really as random as it looks; if you do X, Y and Z before doing action A that results in loot, then it drops from loot table B which has C% chance of dropping the desired item D", and other players were able to verify that this was the case, and a similar thing happened for action E dropping item F more often, then the speedrun would have stood. Exploiting in-game mechanics for one's own benefit is generally considered not cheating by default. But this doesn't seem to have been what happened with Dream's runs.
@@MarsJenkarIt's also a humbling lesson for all of us, you can never 100% trust your own memory and you should never lash out at someone that is trying to correct you.
Haven’t finished watching yet. But seeing Matt trying to do some perfect faro shuffles without looking suspicious I think I know what’s coming.
😂
My Nana, Ethel Cliffe, was in the 1974 Guinness Book of Records for having been dealt a perfect hand of Hearts in a game of Bridge.
Well if it's just one player it's a lot less likely due to false shuffles.
As soon as you said it takes 52 In shuffles to get back to the start, I knew it would be another video and that I will inevitably watch the whole thing.
When I was in uni, we spent an entirely inappropriate mount of time playing bridge. I recall a number of anomalous hands including at least one perfect hand occurring over the course of a couple of weeks. Being engineers, we got to discussing the mathematics of the occurrence and basically discovered the permutation features you discussed here. After that we got a lot more diligent about shuffling, including multi-way cuts and recombining partial shuffles to make sure the deck was sufficiently randomized. And every *new* deck wass the subject of a 52-card pickup game before the first deal :)
Fantastic video. You are thorough in your analysis. As the video progressed several “ah but what abouts” occurred to me only to have you address them right away. Perfect. Accept my like!
Dear sir Matt, I am researching on Riemann hypothesis for the last 3 years and successfully I have found a formula for 'a' in Zeta(a+ib) in terms of 'b' and some hard looking definite integrals which are in terms of 'a' and 'b'which I was not able to solve so I am challenging you to solve those integrals . I am really a big fan of you so that's why I am presenting this problem to you. I used Riemann xi function and Riemann functional equation for Zeta function to find the formula for 'a'.
Please make a video on those integrals.
Integrals are:-
1)integral from 1 to infinity of x^((a-2)/2)*f(x)*cos(ln(x)*b/2) + x^(-a-1)*f(x)*cos(ln(x)*b/2)
2)integral from 1 to infinity of x^((a-2)/2)*f(x)*sin(ln(x)*b/2) - x^(-a-1)*f(x)*sin(ln(x)*b/2)
Where f(x) = summation from n=1 to infinity of e^(-(n^2)*π*x)
For me the verdict is to shuffle properly, meaning spreading all cards on the table and then shoving them around.
Also known as the Vegas Wash. Destroying any possible order that the players could use is fairly vital to casinos, so they wash the deck, then do multiple riffle shuffles and cuts before the game starts.
If you can define your shuffle card by card, you can repeat a single shuffle and only get back after 72930 repetitions by using cycles of 1, 2, 3, 5, 11, 13, and 17 cards respectively.
Pfp fits comment
3,4,9,5,7,11,13 repeats after 180180 (4*9*5*7*11*13) cycles
@@revigerner2355 Ohh yeah, I completely forgot prime powers
Haha I love how the speedrunning community is all here. Saw Xero above as well
Me: Expecting a math video
Matt: *Teaches us how to do magic*
Those two things intersect surprisingly often
@@SquaredSmith sometimes magic is just street math
And this, Ladies and Gentlemen, is why magicians won't tell their tricks. They don't want to be a math teacher.
This reminds me of Rubik’s cube, if you do same movement across 4 edges, it’ll repeat. I forgot how many cycles were needed, but I tried left edge up, top edge right, right edge down, and bottom edge left. It’s really fascinating how many things are related
There was a time when I was a computer undergrad when I made a C++ algorithm that found cycles in any arbitrary graph where every node had at most one link. It would be pretty easy to adapt that to this particular episode's topic, since all one would have to do is put numbers 1 through 52 into an array, do some in and out shuffles, and make a directional link from indexes of the original array to the transformed array, multiply the lengths of unique cycles, and iterate through any range of in and out shuffles. I'll probably be doing this in the near future.
Thank you Matt for your amazing and very interesting videos! The last few have really been piquing my curiosity lately.
Someone should really get Persi Diaconis on the case. His famous paper with Dave Bayer called "Trailing the Dovetail Shuffle to Its Lair" is about this exact sort of thing. He proves that a certain method of performing dovetail shuffles (aka riffle shuffles) described by Gilbert, Shannon, and Reeds is optimal for randomizing the deck, and that for games like Bridge, if you start with a sorted deck, it takes about seven of these optimal shuffles to make the deck suitably random to play Bridge (at least for casual purposes; not really for money). However, he also points out that real shuffles are not optimal, and that most people are far more likely to cut the deck nearly in half and perform a nearly Faro shuffle than they are to make a lopsided cut or to shuffle big clumps in. Even in his optimal shuffle, the in and out Faro shuffles are the most probable shuffles, but their probability is still extremely low because there are so many other shuffles that can be performed. Real people do not follow the optimal binomial distribution he describes, instead being too biased toward middle-of-the-road shuffles similar to the Faro shuffle. Even so, it turns out that real people tend to shuffle well enough to sufficiently randomize a deck in at most seven shuffles, with the possible exception of skilled shufflers, who paradoxically are the worst shufflers in the world, because they most reliably shuffle the same way each time.
Also if it was an old deck the thing you always do before playing, at least in my family, is check that you have all the cards (by arranging them in suit order)
When I played cards with my friends in college we always did that, suprise suprise, you can seriously abuse that.
Can't you... just, you know... count those?
@@lazyDaniX We keep multiple decks of cards in the same bowl and some of them are pinochle decks so you gotta double check
At the beginning I just kept thinking "man, he is having trouble getting those cards together" 😅
I just thought "Richard Turner you are not, Matt"
Learn to shuffle noob! ....oh, you did.
The fact that bridge puts the suits together is probably a major factor. This increases the chances of a luck shuffle. Also I used to play cards a bit. I loved trying to do a pharoh shuffle and though I never checked I am sure i got them pretty often.
The longest cycle you can get for a given permutation on 52 cards is a cycle that is composed of sub-cycles of length 4, 5, 7, 9, 11 and 13 (+3 extra cards) for a total length of 180,180.
I'm glad Matt has finally cracked the algorithm. You literally just have to put Dream in the thumbnail and you get a countably infinite amount of views.
not only that but the title could feasably still be about minecraft. personally I forgot that bridge was a game and thought it was referring to some new controversy about minecraft luck, this time with someone trading piglins in a bridge bastion
Unfortunately dream has found a way to get uncountable infinite views. It’s only a matter of time between a channel that specializes speedrunning reactions to fortnite unboxing in mindcraft makeup tutorials discovers views in the complex plane.
@@Llanowar_Kitten ‘doing maths calculations while my three friends try to hunt me down and kill me’
Minecraft MathHunt, new viral trend
@@Llanowar_Kitten I don't think I can give a video .31415926535 views. It's just regular countable infinity. You can keep counting countable infinity, it starts at 1 and keeps going forever (1, 2, 3, 4, etc etc). Meanwhile uncountable infinite starts at 0.00(infinite amount of zero's)001. You can never actually be done counting even the first number, because you can keep adding zero's forever.
Speaking of minecraft.. you may be interested to learn in the math and reverse engineering that has been done to get a new world record speedrun in the game. A youtuber named Mathew Bolan takes advantage of the Java random number generator being a Linear Congruetial Generator and the number of times this gets called to relate different structure generation in a minecraft world (has several slide decks going into more detail on his channel). In particular, there's a place overlooked in the code where part of the "randomness" is zeroed out, making the correlation obvious even without knowing the world's "seed". This is a well known topic with this sort of randomization, but it's a fun practical application of the math and vulnerability of Java.random() at work! The new world record looks at a bone structure generated in the Nether at the initial spawn "chunk" 0,0- with that, they plug in optimal coordinates later in the run to beat the whole game in under 10 minutes. Personally, I find it a beautiful convergence of math, programming, gaming, and speedrunning, so it seems like a perfect topic for the channel :)
Given the popularity of Minecraft, I figured it wouldn't be too long before speedrunners just reverse engineered the RNG itself. I find the cleverest part not to be the reverse engineering itself, but how you apply it to figure out where you are in the random sequence.
frame counting to over come rng is nothing new in speedrunning.
From No Game No Life:
“What's the probability of drawing the ace of spades from a deck with no jokers? Normally it would be 1/52. But what if its a brand new deck? The position of cards in a new deck are typically identical, so that means if you take out the jokers and draw the card at the very bottom, it’s the ace of spades almost 100% of the time. Oh that’s right! I didn’t say a word about it being a new deck. Rather, you didn’t ask. Being aware of that simple fact would've turned your 1.92% chance to 100%.” - Sora
Weeb
@@ethanc94 LOL
Weeb
Just to chuck my spanner in the works. There are plenty of social bridge players who don't shuffle at all, they just cut. The key to this is to understand that bridge tricks are retained by the winner of each trick through each hand, the cards are not discarded. That confirms the trick count at the end of the hand. Many players will also arrange the tricks in suit order: Clubs, Diamonds, Heart, Spades. Then each of the four arranged piles of cards are stacked in the same order around the table. That deck then contains large numbers of cards, suited in sets of four. In order to break the pattern a little, the deck is cut. Then the cards are dealt in packets, 4,3,3 & 3. The 4-packet progresses around the players, so all get 13 cards.
It makes for many more Slam possibilities, as well as awkward distributions.
Sods law: if you want to an unlikely thing to happen immediately, tell everyone its impossible
It's impossible to solve the riemann hypothesis!!
I can’t believe you learned to Faro, it’s not an easy sleight.That’s dedication to your craft!!
He didn't do it as a sleight though. You can do this the way he did it pretty quickly. Learning to do it in a way that is not seen is a whole different skill and takes years to master.
I'm surprised that Matt didn't try the Thue-Morse sequence (aka the Fair-Share sequence) to see how long it would take to restore the deck to its original state. He made a video on the sequence in November 2015.
I love how he has all these little references to past videos and maths knowledge in the background. Such as the broken 3 cogs for a school
Just to note, the longest cycle you can expect to find will have length 180,180 - which is the value of the Landau function on 52. There many not be actually be an element in the group generated by I and O Faro Shuffles which actually has this length, however.
That group has order 2^(26) * 26! or 2.71*10^34 - so an exhaustive search for such an element is not practical (presumably there's some clever way to figure one out but I can't think of it).
Does this mean that not every possible ordering of cards can be reached using only Faro shuffles?
I once wrote a python script that would take a rubick's cube algorithim and would tell you how many times you would have to perform that sequence before you ended up back where you started
I’m not sure if this is the case worldwide, but here in the United States, dealers are taught to do almost exactly what you’re showing when you shuffle. At dealer school, the pit boss will have you shuffle over and over until you are as close to 1-1 on each side of the shuffle (no clumps). Your explanation is the most likely for sure.
I love this unlikely events (series?) Please keep doing it!
In whist (at least the version I use to play), cards are dealt 4-5-4.
This deal tends to more easily create long colors, as the game night carries on and cards tend to be more sorted than random due to former rounds, but I am not sure if it changes anything for the very first deal, in terms of combinatorics.
Exactly
I'm glad I subscribed to this channel. I hit the button when I saw this channel featured in a collab with Steve Mould on the "I Made A Water Computer And It Actually Works" video.
3:10-4:10 real subtle card work there, Gambit. Don't try that in a real casino :)
Very informative video, thanks.
LOL easy way to get bounced outta there 🤣
As soon as he said it was the first deal of the night and brought out a new deck I knew he was gonna do the Faro shuffle.
Man it's so exciting whenever Matt uploads a video.
Ngl it's actually quite sad seeing part of the Minecraft community still cannot tell how profit-driven Dream is. I really missed the old contents from enthusiasts like Sethbling... :c
Who also happened to be a great Super Mario World speedrunner, and not a cheater. Lol
There are other in addition like like Stampy, DanDTM, iBallisticSquid, LforLeeeee, and so many others
His series teaching Grimm redstone taught me the basics. I remember that: redstone and Sethbling are what brought me into Minecraft
There's still Minecraft youtuber who are passionate about their channel, Hermitcraft youtuber are one of the best example i can think of
I'm guessing you don't know what happened to lee...
Question- I come up with a different answer (even less probable) using this method...
the first card we don't care about, it should never feature, it is a marker so 52/52
The second card need only be a different suit from the first card, so that is 39 in 51, the third card needs to be a different suit from the first two- 26 in 50, the 4th card needs to be different from the rest so that is 13 in 49
then things change...
the 5th card being dealt perhaps better expressed as 12 in 48 (there are 12 spades, and you need to get one of them, out of the 48 cards left in the deck), and so for the 6th card it is 12 in 47, 7th is 12 in 46, 8th is 12 in 45 (i.e. if you have gotten to that point there are 45 cards left, and you have still 12 left of that suit ), and you can then carry on all the way to the last card. using the same method, so 11/44, 10/40 etc.
Multiply all that together you get 4.47X10^-28
Interestingly only 50 cards actually impact your probability, because the first one could be anything, and the last one mist be correct if all the other steps are right
where am I going wrong?
Your method is correct but your outcome is not.
This is probably the more intuitive way to calculate it then what Matt did ( at least to me) but also alot more typing. Wich is where your mistake must have been: incorrectly putting in a number in your calculator.
Matt, in the early history of Magic:The Gathering as a professional competition, you were allowed to "shuffle" by pretending to deal out hands and then stacking those on top of each other, basically allowing perfect Pharoah shuffles but where you are splitting the pile into 4 or 5 or 7.
I would be really interested in hearing about the cycles in those kinds of set ups, which were used to ensure that the "randomisation" part of the game didn't happen.
If you are interested in more background I could get you in touch with some people.
Thanks for the great video!
They said it was the first deal of the night.
Me: Oh, so someone didn't shuffle enough, or alternatively shuffled perfectly too many times.
I did the 8 shuffle perfect faro thing when I was a child- around 10 or so just to see what happened to the order of cards in a new deck. I knew at an intuitive level that eventually the perfect order would recur, but not how many it would take.
I remember teaching an example sheet question in the Cambridge Maths Tripos on in- and out- shuffles (written by Prof Tom Korner). It's a question of writing down the cycle decomposition of the permutation that each shuffle implements, just as you did in the video.
So...I finally got around to reading (or rather listening to) your book. One question. How many more do you go planned?
I enjoyed it greatly. Your dry (not so dry?) math-y nerd-y humor and the facts really go well together. Certainly need a specific type of audience, but for those interested, it’s certainly a great read.
alternate title: how to answer the paradox Dream's Luck and get a lifelong ban from the Casino.
A long time ago I was at a party with 5 people. Four of them wanted to play bridge. I didn't but agreed to shuffle one deck while they played the other. Since I was bored... Well, you get the idea. After they looked at their cards I counted to three before one of them declared foul play.
And while you shuffled and the 4 played what was the 6th person doing?
You should have also included in this the relationship of "in" and "out" shuffling and how you can place the top card anywhere you like in the deck. This has a close relationship with binary numbers, and has some very basic use in card magic.
You should follow this up with the best return of randomness for riffle shuffles assuming they aren't perfect inside or outside faro shuffles. For games of poker, 51 shuffles is supposed to be the best because it is one less than the inside faro, but it's also unlikely for each hand. 7 is considered the next best, and 3 is the best for a friendly game amongst friends striking a balance between fair shuffling resulting in high entropy without taking up a lot of time... So it seems to me the should be a way to classify the entropy of a deck and the ideal number of shuffles for creating high entropy with the fewest number of shuffles. Perhaps dividing the deck into approximate thirds and some new way to riffle the three subdecks would accomplish this faster? I think there are several more videos which could be researched on the topic of card shuffling.
6:00 plot twist: he actually filmed it 2 octillion times until he got the perfect shuffle
Dream also put out some information 4 days ago that supports you standing by your original assessment even more.
I new something was up as soon as I saw that first Faro shuffle.
Yeah. I was also suspicious of only two shuffles, especially after watching Persi Diaconis on Numberphile way back when...
Matt's actually one of the reason i started studying statistics (best choice of my life ngl) and damn he rekindles this flame with every video. Like...thats so cool. Being so obsessed with shuffling cards back and forth is exactly the passion we all need :D
A thought I had while watching this is that if you used a "perfect" shuffling machine (that is, it shuffles a deck cut in halves, perfectly interlaced from one half each card) you would have a simple and likely "accidental" scenario where the machine was setting up a sleight-of-hand Faro deal every time. In other words, the more "perfect" a shuffling machine (assuming you cut the deck in half perfectly and start with a brand new deck or it's set up in any other multitude of ways as mentioned in the video), the worse it is at it's job of providing a fairly shuffled deck.
Here in Belgium at least, when we deal all the cards we don’t usually give each player one card until they run out, but rather four four five. It tends to enable slightly better gameplay than a random shuffle and deal. Cards are played by suit so they’re picked up by suit in a generally sorted order, increasing the odds of getting thirteen of a suit. It happened to me once or twice, we call it solo slim. Though, that is just one of four players having all of one suit. But then often the others also have many.