Math Magic
Hey, Vauce. Michael here. If you rearrange the letters in "William Shakespeare," you can spell "here was I like a Psalm."
In the King James Bible, in Psalm 46, the 46th word is "shake," and the 46th word from the bottom is "spear." William Shake spear was 46 years old when the King James Bible was completed. Is this just a coincidence? Yes, it is. Given enough searching, enough words, enough data, you can eventually find—and should indeed expect—all kinds of neat coincidences. It's just probability.
Here's another good example. Think of a card, any card—value and suit. Okay, got it? Mentally focus on that card. Deliver it to my brain using ESP. Whoa, huh? I got it! Here it is. Amazing, right?
Now think of another card. Are you ready? Okay, it's um, well, it's this one, right? One more time, think of a card. Really think about it. And there it is! Impressed? Probably not, but approximately seven of you might be.
You see, there are only 52 cards. If each card is equally likely to be thought of, I had a one in 52 chance of guessing your card, and about a one in every 140,000 chance of doing so three times in a row. If, say, a million people watch this video and play along, after three tries you could expect about seven people to be left who had their imagined card pulled by me each time. Except not more than seven!
Actually, you see, there's even more magic happening here. And by magic, I mean math. When asked to arbitrarily think of a card, studies have shown that people tend to think of certain cards more often than others. These are the results from a study of a few hundred people: hearts are named a bit more often than the other suits. The three cards I drew are the top three most often thought of.
But would it be more amazing if it actually was magic? Yes and no. Obviously, magic as a performance is important. It reminds us that being stupified, curious, and humbled is fun. Without a visceral reaction to the unknown, would we care to learn, study, or investigate?
But yet, explanations don't dull mystery; they empower the mystified. Explanations aren't ins—they're inces—the start of an ability to use, reassemble, and reimagine new things out of what you now know.
Here's a cool fact: if you divide a deck of cards exactly in half, there will always be the same number of red cards in one half as there are black cards in the other, no matter how mixed up the cards were before you began. It's not magic, though; it's just math.
Think of it this way: half of the cards in a deck are red, so all the red cards could fit in one deck half. This means that the number of cards in a half that aren't red—that is, our black cards—are necessarily equal in number to the reds that must be in the other half. Knowing this, you can devise an even neater trick, like the really cool trick Matt Parker just showed off on his channel, which you should subscribe to.
Or like this one: take an easier to count number of cards, like say 10, and then place another 10 cards on top but face up. Have a friend shuffle the whole mess however they wish—cuts, messy cuts, riffle, smooshing—they just can't cause any card to flip over.
Then ask them to hand you the pack, and behind your back, even while blindfolded, show them that you can separate the deck into two halves with the same number of face up cards every time, over and over again. All you have to do is count out 10 cards. The number of face up cards in one hand will equal the number of face down cards in the other.
Flip one of the packs over, and all of its face down cards will turn into face up ones. Ta-da! The face up counts are now equal.
Here's another trick that shows off some neat mathematical properties. To help me with this trick, I've brought in Vanessa from the YouTube channel BrainCraft. It's an awesome channel; please go check it out. But first, check out this trick. Are you ready?
I'm ready! We've got 10 cards on the table—five diamonds and five clubs, Ace to five of each. Go ahead and put the clubs on top of the diamonds, face up. Face up? Yep. Alright! Now I am going to mix these cards up. Alright, and you are going to use your ESP abilities to get the cards paired up at the end. You ready?
Okay, so I'm going to mix these up—take some off the top, move them to the bottom, take some cards from the bottom, and just like I don't... Okay, I'm going! I'm going to cut these as well. Let me know where you want to cut them.
Okay, there, there, there. Okay, we'll cut the cards there. And then I'm going to take half of what's here, five cards, and deal them down—one, two, three, four, five! I'm going to set the other five right there. Now we have two piles, and it is your turn to start swapping.
We got four swaps you can make, and a swap involves taking the top card and moving it to the bottom. Okay? Alright, now you can divvy up these four swaps however you want. You can do four here, you can do two and two, one and three, whatever you want.
Okay, I'll do um... three here and one here. Interesting! Yeah, do it. I'll do it—one, two, two, three, and then one swap here. Good, yes! Now we're left with these two cards on top. I'm going to take them off and set them right here.
Now three swaps—uh, all three on this pile. Ooh, interesting! Okay, it's your choice—one, two, three, and the top two cards I will peel off and we set aside. Alright! Now, two swaps.
Um, two here; two here. Mhm, mhm. Alright, one, two. Once again, the cards that are on top get peeled off and set aside. One swap and one here, one here. Okay, so I'll take these away, and we're left with two cards. Will they be the same? Will they be a match? Let's find out.
Okay, whoo! Don't say "okay" yet because things aren't okay. Something magic just happened! We've got all of these cards we set aside, and yet they're all matches! Both Aces right there, what are these? Both fives? You also matched up the threes and of course, the fours!
You're welcome! Thank you very much! Mhm! But not you, Vanessa—you mathematics! Every time, no matter how your friend decided to swap, matching pairs will be together. How? Well, it's all about cycles.
If you have some cards in a particular order and you cut them somewhere, it doesn't matter where—you will only change the positions of the individual cards, but not the sequence.
The next card down will always be the next card in order, with the whole thing wrapping back around. It helps to think of the order not as a tower, but as a clock.
Now in the trick we just did, each card's match is always just five cards away in the sequence because five happens to also be the number of cards in half the pack. Dividing the pack in half leaves pairs lined up, no matter how we've cut the deck.
In the trick, however, we added a bit of extra confusion by dealing the top half down onto the table—1, 2, 3, 4, 5. This has the effect of reversing its order.
Now instead of having the same position in each pack, pairs have mirrored positions. The number of cards below any given card in the bottom pack is the number above it in the top pack. This balance means that swapping all the cards above a target in the bottom pack leaves it on top, and swapping the number of cards below it from the other pack leaves its match on the top.
Of course, the number of cards above and below a target card in the bottom pack is just the number of all the other cards in that half, which is the total amount in each pack minus one. That's why with five cards in each pack, we started with four swaps.
Then, after each pack had shrunk to four, we did three swaps. As long as the total number of swaps adds up to the pack total minus one, we'll have matching pairs on top. You can extend these facts about cyclical sequences to other tricks of your own imagining.
This is one of my favorite tricks. It comes from Peter McOwen on the Stem Maths Magic Channel. Trick time! Once again, I'm joined by Vanessa from BrainCraft and Ace through five of diamonds and Ace through five of clubs. Vanessa, could you please take the Ace through five of diamonds and put them on top of the clubs, but flip them over so they're face down?
Yes! Okay, so we now have a kind of messy little deck here where all the black cards are face up and the reds are face down, but we're going to mix these up a lot. We can even riffle shuffle this.
Um, riffle shuffle, riffle shuffle—where you kind of divide it in half like this and then, uh, well, it’s hard to do with few cards, but you know, you do this little like... and then you do a little, you know, very fancy. Yeah, thank you!
Um, where would you like me to cut these? Uh, there. Right there. Okay, cool! Now, there's another way you can kind of mix up and deal cards; it's called the down over deal.
It goes like this: one card goes down, the next goes over. One goes down, one goes over, down, over, down, over, down, over till you're done.
Okay, but now it's your turn. Alright, I'm going to go two at a time, and you're going to tell me whether these first two cards should be dealt down or should be turned over.
Okay, uh, down, down. What about these two? Down, over. Over. These two? Down, over. Over. Alright, now let's go four at a time.
Okay, 1, 2, 3, four. Should these go down or over? Over, over. What about these four? Uh, down, down, and the final two? Over, over.
Now, we can do this as long as you want. I can keep doing this. We can do two; we can do four at a time. How do you feel?
Uh, let's do it once more and do two at a time. Two at a time? Okay. Uh, down, down, down, down. You're getting fast! Over, down.
Yeah, okay, alright! Now I'm going to make two little piles like a little book. Alright, one, two, one, two, one, two, one, two, one.
Okay, now, Vanessa, should I close this book like this or like this? Like this! Alright, there we go! Now, you had completely free choice here. Mhm! You made a lot of different decisions somewhat arbitrarily, but yet, like oil and water, the black and the red cards have separated, and only the reds are face up.
I knew this would happen, but it's not because of magic; it's because of math. Here's how it works: the red cards all start out face down, the black cards face up. No amount of cutting or riffling will change the fact that reds are face down and blacks are face up.
But when you down over deal, you cause every other card to have its original facing direction reversed. First down, over, down, over, down, over, down, over. This alternating sequence is maintained through any number of cuts because it's cyclical.
This is the key to the trick because when we alternatively deal cards into book piles, one pile will contain cards reversed by the down over deal, and the other cards will not be reversed. Depending on how you close the book, either all reversed cards are unreversed or all unreversed cards are reversed.
Either way, the original division by color comes back. The swaps mix things up by introducing an illusion of control, but in reality, the swaps are what are known as a "Hummer deal." A swap flips the facing direction of the cards you flip, but simultaneously moves them to the correct category, preserving the sequence.
As long as you swap an even number of cards, the facing direction of all of them is reversed, but the positions they wind up in are still correct according to the sequence.
Finally, let's end with something popular that also sounds cool on the surface until you go deeper, understand it better, and it winds up being, well, even cooler—the number of different ways 52 cards can be arranged.
There's obviously a lot. The top card could be any card, so there's 52 different possibilities. Any remaining cards can follow, so there are 51 possibilities for the next card, 50 for the third spot, 49 for the fourth, and so on. Multiplying all of these numbers together gives us how many unique ways 52 cards can be arranged.
52 factorial is a gigantic amount—so large in fact, every time you shuffle a deck of cards, well, smoosh it for a few minutes or riffle it seven or more times, chances are you have put those playing cards into an order that they have never been in in the entire history of cards, or humans, or the universe!
Seriously! This is because 52 factorial is 8.65 * 10 to the 67th. In comparison, the observable universe is only about 10 to the 18th seconds old. Even if you had been properly shuffling a deck every single second since the universe began—13.7 billion years ago—you still to this day wouldn't have even come close to assembling every arrangement possible.
But even that doesn't paint the whole picture of just how big 52 factorial is. Scott Chapel wrote what, in my opinion, are some of the most mind-boggling visualizations of the size of 52 factorial.
Imagine setting a timer to count down 52 factorial seconds. While the timer runs, stand on the equator and wait 1 billion years. After a billion years have passed, take a single step forward and then wait another billion years before taking a second step, and so on.
Once you have walked all the way around the earth, take a single drop of water out of the Pacific Ocean—that's 500s of a milliliter—and set it aside. Now continue walking at a rate of one step every billion years, removing one drop after every journey around the entire earth.
And by the time the Pacific Ocean is completely empty, put a single sheet of paper on the ground, refill the ocean, and keep going until the stack of paper reaches the sun. At that point, how many seconds will be left on the timer?
Will it be zero, a few hundred, a few billion? No! There will still be 8 * 10 to the 67 seconds left. You have barely made a dent!
If you start all over again and do that whole thing a thousand more times, you will only be a third of the way done! Luckily, Scott has a great idea for how to pass the rest of the time. If you're bored of paper and water and walking instead, he says, deal yourself five cards every billion years.
When you finally deal yourself a royal flush, buy a lottery ticket. If the ticket wins the lottery, throw a single grain of sand into the Grand Canyon. As soon as the Grand Canyon is completely full of sand, remove one ounce of rock—that's about 28 grams—from Mount Everest.
By the time Mount Everest is leveled, take a look at the clock. This is what will be left. Do the whole royal flush, lottery ticket, Grand Canyon, Mount Everest thing 256 more times, and then—and only then—will your timer have reached zero.
That is how big 52 factorial is! It's pretty big! But now, think about this: the number of possible people, the number of different humans there could be is well, even larger.
What that means is that even though you will probably die, most people, including possibly the smartest or funniest or most annoying possible person, won't even get to die like you do. They won't even get to be born.
So I'm glad you were! And as always, thanks for watching! Oh, dogs are heart! [Music] Heaven! [Music] Heart in heaven! Uh.