XaiJu
veritasium
veritasium

patreon


The Strange Math That Predicts (Almost) Anything - Markov Chains. Our latest video, ad-free!

How a feud in Russia led to modern prediction algorithms.

Comments

As I watched this video for the third time, I recognized some other associated mathematics in the processes used to determine the minimum amount of fusile material required for a chain reaction. In particular, the spread rate of an infectious disease (R naught). As the infection rate moves above 1, the disease moves toward epidemic, then pandemic. This replication factor applies to internet memes, fashion, video popularity, bandwidth, economic trends, and many other real-world scenarios. The a priori state becomes critical but the number of degrees of freedom mushroom so quickly that we have a chaotic system that quickly exceeds the ability of anything in this universe to calculate. That makes even a deterministic universe essentially unpredictable.

Mike Mitchell

I really enjoyed the history. Now we can predict the NEXT time the shuffle theory will change, (The software predicted the last word “change”,)

Timothy-Douglas Alvey

It's a great question and yes is a whole video in itself! There is more detail from Persi in this video - https://www.youtube.com/watch?v=AxJubaijQbI There are also some extra material videos on numberphile 2 where they provide more detail, Persi even wrote the paper on the theorem. Firstly this isn't an observational thing, it is based on a model of shuffling that itself is an approximation of how people shuffle, and that is based on observation, but the maths is exact. Basically you assume that people split the cards roughly in half with some binomial distribution around 26 on each side and then they will drop cards from each hand proportionally to how many cards are left in each hand. This is a good approximation of how most people card shuffle. You're right that 'perfect shuffling' where you interleave cards alternately exactly (or nearly exactly) is worse, in fact 8 of these perfect shuffles would bring the cards back into their original order, I think there is some interesting Ring/group theory stuff around why this works. So good shufflers like Persi (or myself if you look at my riffles in the video) actually do worse at shuffling than the average shuffler. The number 7 comes from working out how many shuffles you need to be able to reach randomness at a minimum, before 7 you cannot have destroyed all the information of the original order and past 7 you exponentially approach true randomness. A nice way to think about it (which came from one of our interviews) is to work out how many 'inverse riffle shuffles' it would take to put the deck back in order. There is an optimal way to do this. First number the cards in binary, it's easiest to think about for a single suit. So in binary 0000 for the ace 0001 for the 2, king = 1100, and so on. So you'll have a random order of binary numbers for a randomly shuffled suit. You then split these into two groups based on the first binary digit, and then re-combine. If you keep doing this you'll put the suit back in order because you're ordering it by size each time. This is doing a riffle shuffle backwards but in the smartest way you can. But because you need 4 binary digits to represent the suit it must take 4 of these 'un shuffles' to get the cards back to ordered. (If you know much about sorting algorithms this is basically a radix sort of the suit). Running this backwards again you have the most optimal riffle shuffle possible, as it took 4 shuffles to get to random, on the third shuffle the cards were not random because they had been partly sorted. So in practice it might take more than 4 shuffles to randomise the cards but it must take at least 4, less than that could never have destroyed all of the information. When you scale this up to 52 cards you need 6 bits, so it takes 6 shuffles at absolute minimum to randomise the cards, and 7 turns out to be much more likely to be randomised when real shuffling is accounted for. There are other ways to think about it but the general idea is for these mixing problems once you past this threshold the system is basically 'mixed' at that point and has lost most if not all of it's original structure, before this some must remain so it can be exploited. - Gabe, researcher for this video

Veritasium

In the bit at the very end, I've heard the claim about 7 riffle shuffles being needed to appropriately randomize a deck before. I'm curious about what assumptions are made in order to make that claim, or if it's just determined empirically based on how most people riffle shuffle. It seems like the amount of "clumping" that you get as the cards interleave is critical to the outcome. If you perform a "perfect" riffle shuffle, where the deck is split exactly in half and a single card from the left side is followed by a single card from the right side, etc., I promise that the outcome after 7 riffles will not look random at all. Presumably the clumping factor is also the main difference between the 7 riffle shuffles and the 2000 overhand shuffles claimed to be equivalent? This could probably warrant an entire mini-video.

Jason Pratt

Being a leftist mathematician and atheist as well and in addition have been worked w Markov-chains some 20 years ago (for prediction of diabetes-related complications like stroke or heart failure), I truly love this video already although I only watched it for like a minute or so. Thank you!

Till Baumgärtel


More Creators