Everything Everywhere Daily: History, Science, Geography & More - Permutations and Combinations
Episode Date: August 2, 2023Whenever there is a lottery, the odds of winning are given. If you go to a pizzeria, they might tell you the number of possible pizzas that can be made, given their toppings. If you have a combina...tion lock, it is secured because of the number of different solutions that are possible. All of these things might seem different, but they are all part of the same branch of mathematics. Learn more about Permutations and Combinations and how they work on this episode of Everything Everywhere Daily. Sponsors Expedition Unknown Find out the truth behind popular, bizarre legends. Expedition Unknown, a podcast from Discovery, chronicles the adventures of Josh Gates as he investigates unsolved iconic stories across the globe. With direct audio from the hit TV show, you’ll hear Gates explore stories like the disappearance of Amelia Earhart in the South Pacific and the location of Captain Morgan's treasure in Panama. These authentic, roughshod journeys help Gates separate fact from fiction and learn the truth behind these compelling stories. InsideTracker provides a personal health analysis and data-driven wellness guide to help you add years to your life—and life to your years. Choose a plan that best fits your needs to get your comprehensive biomarker analysis, customized Action Plan, and customer-exclusive healthspan resources. For a limited time, Everything Everywhere Daily listeners can get 20% off InsideTracker’s new Ultimate Plan. Visit InsideTracker.com/eed. Subscribe to the podcast! https://link.chtbl.com/EverythingEverywhere?sid=ShowNotes -------------------------------- Executive Producer: Charles Daniel Associate Producers: Peter Bennett & Thor Thomsen Become a supporter on Patreon: https://www.patreon.com/everythingeverywhere Update your podcast app at newpodcastapps.com Discord Server: https://discord.gg/UkRUJFh Instagram: https://www.instagram.com/everythingeverywhere/ Facebook Group: https://www.facebook.com/groups/everythingeverywheredaily Twitter: https://twitter.com/everywheretrip Website: https://everything-everywhere.com/ Learn more about your ad choices. Visit megaphone.fm/adchoices
Transcript
Discussion (0)
Whenever there's a lottery, the odds of winning are given. If you go to a pizzeria, they may tell you
the number of possible pizzas that can be made given their toppings. If you have a combination lock,
it's secured because of the number of different solutions that are possible. All of these things
might seem different, but they're all part of the same branch of mathematics. Learn more about
permutations and combinations and how they work on this episode of Everything Everywhere Daily.
What if your perceptions about the past were wrong? Throughline is a positive.
that takes you back in time to uncover the parts of the story that may have gone unnoticed.
It effectively turned day into night.
And how it shaped the world now.
Time travel with us every week on the Thuline podcast from NPR.
If you're not familiar with permutations and combinations, do not fear.
It's a subject that often isn't covered in basic mathematics courses, but it also isn't that complicated.
It involves nothing more than basic multiplication and division.
It doesn't necessarily even involve fractions or decimals, just whole numbers,
and they can usually be explained using everyday things that you are familiar with.
So to start this discussion, let's take a very simple case.
How many ways can you arrange the numbers, one, two, and three?
This is a pretty small number of things, so we could just brute force this and write them all out.
There are one, two, three, one, three, two.
213, 231, 312, and 321.
So there are six ways you can arrange the numbers, 1, 2, and 3.
Now let's say we want it to do the same thing with 1, 2, 3, and 4.
Well, that suddenly becomes much harder.
Not ridiculously hard, but hard enough that you don't want to listen to me read out strings of numbers for the better part of a minute.
Is there a way we could make a simple formula for calculating this?
Well, there is.
Let's say I have balls numbered 1, 2, 3, and 4 in Hopper,
and I pull them out to create an arrangement.
For the first ball, there are four possibilities
because all four balls are still in the hopper.
Once I pull that ball out,
there are now three possible balls that I could select.
Once I pull that ball out,
there are now two possible balls left,
and then finally there is only one ball left.
So the total number of arrangements of the numbers 1 through 4
can be calculated by multiplying,
4 by 3 by 2 by 1. Or there are 24 ways.
In my first example, there were six ways to arrange three numbers, which is equal to 3 times 2 times 1.
If I wanted to calculate the number of ways of arranging 5 numbers, it would be 5 times 4 times 3 times 2 times 1, or 120.
This calculation where you multiply all of the numbers less than or equal to a given number has a special name and symbol in mathematics.
and it's one that you might have encountered if you've used a calculator.
It's called a factorial, and its symbol is an exclamation mark.
If you've ever played with the factorial key on a calculator,
you may have discovered that it's very easy to create numbers so large
that the calculator can't handle it.
Factorials are just a shorthand for,
multiply together this number and everything below it.
To give you an idea of how quickly factorial numbers increase,
phi factorial, as I mentioned, is 120.
10 factorial is 3,628,800, and 15 factorial is 1,307,674,368,000.
In fact, the numbers get so large, so fast, you can arrive at some surprising results.
Take, for example, a deck of ordinary playing cards.
There are 52 cards in the deck.
How many different ways can a deck of playing cards be arranged?
This is fundamentally the same problem I addressed above, just with a bigger number.
There are 52 possibilities for the first card, 51 for the second card, 50 for the third card, and so on.
So the answer is 52 factorial.
52 factorial is a ridiculously large number.
It starts with an 8 and then has 67 digits after it.
There are more ways to shuffle a deck of cards than there are atoms in our entire.
galaxy. Assuming that you have truly shuffled a deck of cards randomly, that means it is highly
probable that the ordering of the cards in your hand is an ordering that has never existed before
and probably will never exist again in history. If you shuffled a deck of cards every second
since the universe began and each shuffle was a different arrangement of cards, you wouldn't have
even come within a trillionth of one percent of all the possible arrangements.
The mathematical term for putting things in a particular order is known as a permutation.
Now let's go back to my original example of arranging the numbers 1, 2, and 3.
This time let's assume that the numbers can repeat.
1-2-3 would be an arrangement, but 1-1-3 could be a possibility as well.
This is actually really easy to figure out using the same method we did before.
There are three possibilities for the first number, three for the second number, and 3 for the third number.
The answer is just 3 times 3 times 3, or 27.
Or to write it more succinctly, 3 raised to the power of 3.
For 4 numbers, it would be 4 to the power of 4, and 5 numbers would be 5 to the power of 5.
These numbers grow even faster than factorials do.
But now let's consider a different problem, where the order of things doesn't matter.
Let's say you go to a pizza place, and they have five different toppings.
How many different ways can you make a three-topping?
pizza, assuming that you don't use any topping more than once.
What makes this problem different from the earlier ones is that the order of the toppings
doesn't matter. A pizza with olives, onions, and pepperoni is the same thing as one with
pepperoni olives and onions. When the order doesn't matter, this is known as a combination.
In mathematical parlance, you would say five pick three. To solve this problem, you first look at
the number of ways you can pick three things out of five. There are five possibilities for the first
for possibilities for the second topping and three possibilities for the third topping.
However, as I mentioned, order doesn't matter.
So I've actually selected several redundant arrangements by doing this.
We can correct for this by dividing that number by the total number of ways you can arrange three things,
which is three factorial.
So the number of three topping pizza combinations out of five, where there are no repeated toppings
is five times four times three, all divided by three times two times.
times one. Or 10. Interesting side note. If you have a combination lock where you have a wheel
and need to put numbers in a certain order to open it, it's actually a permutation, not a
combination, because the order matters. So technically, combination locks should be called
permutation locks. Let's take this idea of combinations a bit further by looking at something
with more numbers that you're still probably familiar with, the lottery. A typical lottery
will involve taking several numbered balls out of a hopper containing many more balls.
As with pizza toppings, the order of the balls doesn't matter.
Just to use an example that many people listening to this will be familiar with,
I'm going to use the Powerball lottery as an example.
This is a large lottery which is played in 45 U.S. states,
as well as Washington, D.C., Puerto Rico, and the U.S. Virgin Islands.
The game is played by selecting five numbers from a hopper containing 69 numbers.
And then a power ball is selected from a different.
Hopper containing 26 balls. First, let's look at the number of ways five balls can be selected
from 69 balls. Again, the order doesn't matter, so in mathematical parlance, we would say 69 pick
five. The number of permutations of five balls would be 69 times 68, times 67, time 66,
times 65. We can actually make this a much simpler formula by just saying 69 factorial
divided by 64 factorial. We get the 64 because it's 6.6.
69 minus 5, the number of balls being selected.
Again, that number contains many redundant combinations,
so we have to divide that number by 5 factorial, the number of balls being selected.
The result is 11,238,513 possible five number combinations out of 69 numbers.
Those are pretty long odds, but there are actually much better odds than what you get in the actual game.
And that's because there is a sixth number that comes from a separate number.
hopper. As there are 26 balls in that hopper, and the power ball number can match one of the other
five numbers, we treat it separately and just multiply the previous result by 26. So 11,238,5138 times 26 equals
292,201,338. So the odds of winning a single ticket is one in 292,201,338, which is
exactly what you will find on the Powerball website and on a Powerball ticket.
Here is an interesting question. Why do they bother with the special Powerball? Why not just
select six numbers from the main hopper instead of five and get rid of the Powerball?
Well, take 69 factorial, divide by 63 factorial. And again, we get that number because we're
selecting six numbers out of 69. We then take that result and divide it by six factorial, and the number
we get is 119,877,472. If they did it that way, the odds would be more than twice as good for
players, still astronomical, but much better. For most people, six numbers are six numbers. The fact that
one of those numbers comes out of a separate hopper doesn't really seem relevant. However, the
designers of Powerball weren't stupid, and they obviously did the math before they launched the game.
They wanted odds that were long, but not too long.
There are 330 million people in the United States.
Most of them don't play the lottery every week.
That means for any given drawing, and there are two per week,
no one will win the jackpot, and the prize will get rolled over to the next drawing.
However, when jackpots get extremely large, they make the news, and more people will play.
In fact, mathematically, it might actually make sense to play once the jackpot gets beyond a certain point.
A powerball ticket costs $2, which means that once a jackpot is over,
$584 million, approximately, the expected value of a ticket is more than the price of the ticket.
That is, of course, assuming that there's only one winner and the jackpot isn't split.
So for a lottery like Powerball, you want the odds to be long, but not too long, because you
want it to roll over to build excitement.
We can use the same technique to determine the number of possible five-card combinations
out of a deck of cards.
Again, the order doesn't matter, so it would be 52-fection.
divided by 47 factorial, and then take that number and divide it by 5 factorial.
The number of possible five card hands is 2,598,960, significantly less than the number of ways to shuffle a deck.
Of those possible hands, there are four that are considered a royal flush, the best hand in poker.
So the odds of getting a royal flush out of five cards is one in 649,740.
However, the most popular poker game is Texas Holden, and players get seven cards to make a five-card hand, so the odds aren't quite the same.
The math requires a few more steps, but the odds of a royal flush in Texas Holden is one in 30,940.
Exactly 21 times better than getting it in just five cards.
So if you play a lot of poker, you might get a royal flush once or twice in your life, or quite possibly,
Never.
Permutations and combinations are something that most people never encounter as part of a basic
mathematics education, but they really aren't that hard to understand.
As I said before, it's all basic multiplication and division, albeit with very large numbers
sometimes.
There are many resources online if it's something you want to learn more about, and it's an
extremely handy thing to know if you want to be able to calculate the odds of something.
The executive producer of Everything Everywhere Daily is Charles Daniel.
The associate producers are Thor Thompson and Peter Ben.
I have some boostograms for you today.
Boostagrams are ways of interacting and supporting the show directly using newer podcast apps
that can be found at new podcast apps.com.
The first is from Petar, who sent 7,77sats on the Betamax versus VHS episode.
He wrote, nailed it.
I remember the extended VHS recording time was huge when trying to save money on tapes,
and the open standard allow for much greater selection of films at the video rental store.
I have such fond memories of those times, renting movies for the weekend.
My brother and I would get to choose one, and it became a kind of competition who would pick the better film.
On top of all that, the video store gave out free bags of popcorn.
Life was good as a kid in the 80s.
Petar, I agree with your conclusion.
P. Ninja sent 251 sats on the Discovery of Fire episode.
They write, I believe you confuse the word discover with invent at the beginning.
The first insinuates the finding of without necessarily creating, and the second implicitly requires creation.
In other words, finding a burning stick in the wild is absolutely discovery.
Thanks, P. Ninja, but I am going to stick with my explanation that the discovery of fire is something so basic,
that it might technically be a discovery, but it's like the discovery of air or dirt or light.
So basic that it's just a part of life, not a discovery that could be attributed to a person or, quite frankly, even a human.
P. Ninja also sent 251 sats on the episode about the history of wine, they ask, was the
The rice wine discovered in China a mead or simply back sweetened with honey.
The answer is, we don't know.
The evidence was gathered from molecular analysis of ancient pottery fragments.
They could detect traces of materials on it, but it isn't possible to determine much beyond that.
In the research I did, it was described as a proto-wine.
It might have been more of a mead with fruit or it could have been more of a wine with honey.
We don't know.
Remember, if you leave a review or send me a boostogram, and my note is back up and working,
so I can actually accept boostograms again.
You two can have it read on the show.
