The Cellar

The Cellar (http://cellar.org/index.php)
-   Home Base (http://cellar.org/forumdisplay.php?f=2)
-   -   No two card shuffles will EVER be the same. (http://cellar.org/showthread.php?t=16562)

Flint 02-04-2008 10:43 AM

No two card shuffles will EVER be the same.
 
That doesn’t sound right, does it? In all of human history, and all of human history to come, no matter how many times a deck of cards is shuffled, the same combination will never, ever, ever come up. How can that be? Well…

The 52 cards in a deck can be arranged in...
8,065,817,517,094,390,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
...different ways.

What if we were to put every person alive on the Earth, right now, on this shuffle project? According to the U.S. Census Bureau, the total population of the Earth, as of 02/04/08 at 15:40 GMT (EST+5) is 6,648,429,413.

So, each person would have to shuffle...
1,213,191,419,513,742,831,701,174,895,214,300,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
...decks of cards before all the possible shuffles were exhausted. What if we gave them a little time to work on that? How about 100 years…

If every person alive on the Earth, right now, shuffled continuously for the next hundred years, they would have to shuffle...
3,847,004,754,926,886,198,950,960,474,423,900,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000
...decks of cards, every second, before all the possible shuffles were exhausted.

We don’t seem to be getting any closer to achieving all those shuffle combinations. How long would it really take? Let’s put those 6,648,429,413 people on planet Earth to work, on a more realistic goal: shuffling one deck of cards every 10 seconds, 8 hours a day, 5 days a week, and see how long it takes.

360 shuffles per hour
2,880 shuffles per day
14,400 shuffles per week
5,256,000 shuffles per year
times 6,648,429,413 people is 34,944,144,994,728,000 shuffles per year!

We should see all those shuffle combinations coming up in about...
1,534,592,373,876,406,012,176,560,121,765,600,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
...years. Don’t hold your breath.

SteveDallas 02-04-2008 11:04 AM

Quote:

Originally Posted by Flint (Post 429634)
The 52 cards in a deck can be arranged in...
8,065,817,517,094,390,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,
000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
...different ways.

How do you derive this number? The number of permutations is 52! (= 1 x 2 x 3 x 4 x . . . . x 51 x 52), which is 8.0658 x 10^67. Your number seems to be 8.0658 x 1000^67, which makes a slight difference.

SteveBsjb 02-04-2008 11:06 AM

Does this work for Old Maid?

Trilby 02-04-2008 11:08 AM

Flint is crazy.

Flint 02-04-2008 11:12 AM

Quote:

Originally Posted by SteveDallas (Post 429639)
How do you derive this number?

I took 8.06581751709439 e+67, copy/pasted 6.7 lines of ten groups of ",000" then put commas in the original figure, like this "8,065,817,517,094,39" and then pasted these on top of the zeros so that it was the same length. Oh, I left the "8," on a serarate line, because it was before the decimal.

What did I do wrong? Oh. I did 67 groups of ",000" instead of just zeros.

Trilby 02-04-2008 11:14 AM

Quote:

Originally Posted by Flint (Post 429643)
What did I do wrong?

Nothing. You're crazy.

Flint 02-04-2008 11:24 AM

Yeah, so? I just wanted to show the zeroes, so you could see how obscenely gigantic the number is. 52! is not likely to be exhausted during the course of human history.

Of course, the part I didn't include is how these are not really random deck shuffles. Card are arranged in typical, repeating patterns, due to the fact that we are shuffling from a partially ordered state, based on the card combinations that happen during the course of card games.

Anybody care to take a crack at that?

HungLikeJesus 02-04-2008 11:38 AM

Flint,
I respectfully disagree, but don't have time now to work through the math.

Trilby 02-04-2008 11:41 AM

flint--i've a huge crush on you.


deal.

Flint 02-04-2008 11:59 AM

Quote:

Originally Posted by HungLikeJesus (Post 429658)
Flint,
I respectfully disagree, but don't have time now to work through the math.

Combinations of card shuffles, 52! is 8.06581751709439e+67.

Population of the Earth (possible number of people that could shuffle a deck of cards) is 6,648,429,413. That’s 1.2131914195137428317011748952143e+58 shuffles per person.

Divide 1.2131914195137428317011748952143e+58 shuffles by number of seconds per year (31536000) and you get 3.8470047549268861989509604744239e+50.

That means: if every person alive on the Earth started shuffling one deck of cards per second, it would take 3.8470047549268861989509604744239e+50 years to get through all the combinations.

Flint 02-04-2008 12:02 PM

Quote:

Originally Posted by Brianna (Post 429660)
deal.

Deal? There's 8.06581751709439e+67 different ways I could take that.

HungLikeJesus 02-04-2008 12:27 PM

Flint, here's what I'm thinking:
There are 52! (52 factorial) ways that the first shuffle can come out.

The probability of the second shuffle exactly matching the first is 1/52!.

The third shuffle has a 1/52! chance of matching the first shuffle, and a 1/52! chance of matching the second shuffle, so by the third shuffle, there's a 3/52! chance of two shuffles being the same.

The 4th shuffle has a 1/52! chance of matching the first shuffle, and a 1/52! chance of matching the second shuffle, 1/52! chance of matching the 3rd shuffle, so by the 4th shuffle, there's a 7/52! chance of two shuffles being the same.

Etc...

The question should be, "how many shuffles would be required to have an X % chance of two shuffles matching?"

SteveDallas 02-04-2008 12:32 PM

That's interesting.. I'd never really thought about it. (And believe me, the question of card arrangements is not so esoteric to blackjack and poker players, among others.)

EDIT: HLJ, Flint was being sensationalistic in his thread title. I think his point (though with Flint it can be hard to tell) is that there are so many combinations it would take "forever" to go through them all, even guaranteed that there would be no repeats.

lumberjim 02-04-2008 01:11 PM

Flint being sensationalistic ?!

eee gadds!

say it isn't so!

Heavens to Betsy!

[/great big globs of sarcasm]

Flint 02-04-2008 03:51 PM

Of course it's sensationalistic. I want someone to prove me wrong.

What are the odds of one particular permutation, of 52! possible permutations, repeating? It's been a few years since I took statistics, but I think this should be pretty easily answerable. With the right (TI-83/84) calculator.

What I'm saying, based on what I can see (and this is very counter-intuitive) is that in the history of this planet, we can be almost %100 certain that the same card shuffle has never come up, and never will. Of course, it could happen five minutes later, but the probability of this would be so vanishlingly small that it would be considered impossible for all practical purposes.

Shawnee123 02-04-2008 03:56 PM

Isn't that the Gambler's fallacy? That one event affects future events, event being the shuffle. From the beginning of one shuffle, to the end of the same shuffle, has no bearing on future shuffles.

(Like the Homeless Guy is sure the Pick 3 numbers are predictable based on what has or has not come up in a while.)

Flint 02-04-2008 04:10 PM

Well, in reality, one shuffle does affect the next one, because it isn't really starting from a random order. But I'm assuming the shuffles are random for the purposes of this discussion. Which I feel okay with, because we're talking about all card decks that exist, have ever existed, and will ever exist. They don't have any effect on each other. Of course, I'm calculationg the factorial as if we're talking about one single deck. That's okay because they're all the same, if you assume we're talking about standard 52-card decks. Which we are.

I guess I'm really just avoiding your question.

Aliantha 02-04-2008 04:10 PM

Quote:

There are 52! (52 factorial) ways that the first shuffle can come out.

The probability of the second shuffle exactly matching the first is 1/52!.
I don't think this is right. Every one of the 52 cards has 52 possible starting points, so it's actually 1 in 52x52 at least.

I could be wrong though.

Flint 02-04-2008 04:14 PM

Remember, "1 in 52!" is a short-hand way of saying "1 in 52*51*50*49*48*47*46*45*44*43*42 etc." all the way down.

HungLikeJesus 02-04-2008 04:21 PM

Flint, I calculate that in 9x10^33 shuffles of the deck, the probably of two shuffles resulting in the exact same ordering is 50% (assuming complete randomness in all shuffles).

Aliantha 02-04-2008 04:22 PM

Is that right? I would take the words at face value. Maths is supposed to be precise is it not?

Anyway, I'll leave you fellas to this (quite boring) discussion. :)

lumberjim 02-04-2008 04:44 PM

flint's suppostitions are only accurate if the assumption is that you will experience all of the possible combinations before you get the same one twice.....which is quite ludicrous.

Spexxvet 02-04-2008 04:59 PM

How fast is the treadmill moving?

deadbeater 02-04-2008 06:51 PM

Er, doesn't it also depend on what game you're playing? In certain games, like bridge, the order of cards dealt to a hand is irrelevant, all that is relevant is that 13 cards are dealt to him, and order of a particular hand is rearranged once dealt. There, one could find certain duplicate hands, if dealt in a different order.

smoothmoniker 02-04-2008 07:26 PM

You've assumed that shuffles produce random distributions. They do not. Picture a deck with the 7 of Spades as the top card. You split the deck in half, and shuffle the cards together.

There are not 52 possible locations for the 7S to appear, post shuffle. Given a standard shuffle (small groups of cards falling together at a time), the 7S will always appear in the top 5 or 10 cards. This last number is a conjecture, but it will certainly not appear much deeper than that, and will not appear in the bottom half of the deck at all, unless the shuffler simply "cuts" instead of shuffles.

So, the distribution is not random. Each card will only move by a few positions in a well-ordered shuffle (relative to other shuffles). Assume that a large number of people regularly open brand new decks, which have the same starting order, and then give one shuffle. There is a much more limited (relatively) set of possible distributions for that first shuffle, that first permutation.

euphoriatheory 02-04-2008 07:35 PM

....unless you shuffle, cut, shuffle, cut, shuffle, cut..... :p Just thought I'd try and make things more difficult. This thread is hurting my poker game.

Flint 02-04-2008 09:55 PM

Quote:

Originally Posted by smoothmoniker (Post 429781)
You've assumed that shuffles produce random distributions.

No, I haven't actually:
Quote:

Originally Posted by Flint (Post 429652)
Of course, the part I didn't include is how these are not really random deck shuffles. Card are arranged in typical, repeating patterns, due to the fact that we are shuffling from a partially ordered state, based on the card combinations that happen during the course of card games.

Quote:

Originally Posted by Flint (Post 429718)
Well, in reality, one shuffle does affect the next one, because it isn't really starting from a random order. But I'm assuming the shuffles are random for the purposes of this discussion.

Okay I guess I did say that, but with a qualifier. And it's partially because I don't know how you could calculate in that variable, and, if it would even make a difference, considering that all 52 cards have to be in position; doesn't this quickly become just more random data?
Quote:

Originally Posted by smoothmoniker (Post 429781)
Picture a deck with the 7 of Spades as the top card. You split the deck in half, and shuffle the cards together.

There are not 52 possible locations for the 7S to appear, post shuffle. Given a standard shuffle (small groups of cards falling together at a time), the 7S will always appear in the top 5 or 10 cards. This last number is a conjecture, but it will certainly not appear much deeper than that, and will not appear in the bottom half of the deck at all, unless the shuffler simply "cuts" instead of shuffles.

So, you're cutting down the variables a bit for that one card, or for any cards that were used in the play of the last hand. I'll even further this to say that the same cards might appear in similar places if the same players were playing the same games, but... with the size of the numbers we're looking at here, I don't see these little possibilities having much impact. And, as always, it's all 52 cards in the exact same position we're talking about, not just a few cards, in a somewhat similar position.

Quote:

Originally Posted by smoothmoniker (Post 429781)
Assume that a large number of people regularly open brand new decks, which have the same starting order, and then give one shuffle. There is a much more limited (relatively) set of possible distributions for that first shuffle, that first permutation.

That's another good point. Of course, that deck is only new once. I would say that not enough new decks of cards have ever been produced to make much impact on the unimaginably huge number of permutations we're dealing with. Remember, I had every person on the Earth shuffling cards as a full time job, from now until an impossible number of years after our sun has burnt out and no trace remains that planet Earth ever existed. So, new decks of cards...I'm not so concerned with that.
Quote:

Originally Posted by deadbeater (Post 429763)
There, one could find certain duplicate hands, if dealt in a different order.

I'm talking about the whole deck, not just one hand. And order matters.
Quote:

Originally Posted by lumberjim (Post 429732)
flint's suppostitions are only accurate if the assumption is that you will experience all of the possible combinations before you get the same one twice.....which is quite ludicrous.

No, I just don't know how to calculate the probability that and I want somebody to do it for me. What I have shown, though is how the number of permutations is much larger than our brain can even comprehend.
Quote:

Originally Posted by HungLikeJesus (Post 429726)
Flint, I calculate that in 9x10^33 shuffles of the deck, the probably of two shuffles resulting in the exact same ordering is 50% (assuming complete randomness in all shuffles).

Now we're getting somewhere. Thanks, HLJ. I'll take you on your word (and these number are so big, I don't think it matters how far off we are from being exactly right).
__________________

Now, to get through 9.e+33 permutations, everyone on the Earth (6,648,429,413 people) shuffling decks of cards as a full time job (one shuffle per 10 seconds, 8 hour days, five day weeks) it would take 257,553,876,374,935,601.83683591322334 years before you had a 50% chance of having the same shuffle come up. Hey, we’re finally out of exponential notation! Too bad, though, I don’t think human civilization has been, or will be, around for that long. Anyone have something concrete to bring this number down into the realm of might-ever-actually-happen?

Clodfobble 02-04-2008 10:07 PM

Quote:

Originally Posted by Flint
Anyone have something concrete to bring this number down into the realm of might-ever-actually-happen?

No one in the third world works mere 40-hour weeks. You should put most people at 80-90 hours a week, easy.

Flint 02-04-2008 10:09 PM

Quote:

Originally Posted by Clodfobble (Post 429805)
No one in the third world works mere 40-hour weeks. You should put most people at 80-90 hours a week, easy.

I'm also assuming that infants and people in irreversible comas can shuffle a deck of cards, every ten seconds for eight hours in a row...

...so I think it all works out. I guarantee you'll be working some weekends to take up that slack. The shuffle-per-10-seconds quota is set in stone.

Clodfobble 02-04-2008 10:14 PM

A five year old can shuffle a deck of cards. Since half of the population is not in a coma or under the age of five, doubling the work week will have a bigger positive effect than the negative effect of counting out those unable to shuffle.

But if you don't like that one, then how about you add in population growth, since people will have all this spare time to boink each other? Hey, you're the one who wants to make this happen, I'm just trying to think outside the box for you.

lumberjim 02-04-2008 10:26 PM

5?

Flint 02-04-2008 10:40 PM

Quote:

Originally Posted by Clodfobble (Post 429809)
A five year old can shuffle a deck of cards. Since half of the population is not in a coma or under the age of five, doubling the work week will have a bigger positive effect than the negative effect of counting out those unable to shuffle.

But if you don't like that one, then how about you add in population growth, since people will have all this spare time to boink each other? Hey, you're the one who wants to make this happen, I'm just trying to think outside the box for you.

Basically, everyone on the Earth is not going to drop everything and shuffle cards all day. We couldn't even survive that for very long. So, in taking the total poulation of the Earth as my number, I'm making an impossibly generous concession, in order to imagine this actually happening. The 40-hour week is something familiar to us; I'm trying to put it in real terms.

If you like, I could go back to having each person shuffle an exponential amount of decks every second...

lumberjim 02-04-2008 11:08 PM

Quote:

Originally Posted by Flint (Post 429826)
The 40-hour week is something familiar to us;

that's less than 1/3 of the hours in a week....what do you do with all of that free time? ya know....it sounds appealing....

Spexxvet 02-05-2008 08:06 AM

This site disagrees

Quote:

My interest with perfect shuffling started with a simple observation that the standard poker deck containing 52 cards will come back to its or original order if riffle shuffled precisely interleaving the two 26 haves 8 times.
So on the ninth time, the shuffle will be the same as the first shuffle.

He expects a "perfect riffle shuffle", though.

Shawnee123 02-05-2008 08:06 AM

Quote:

Originally Posted by lumberjim (Post 429815)
5?

:lol:

SteveDallas 02-05-2008 08:28 AM

Quote:

Originally Posted by Flint (Post 429826)
everyone on the Earth is not going to drop everything and shuffle cards all day. We couldn't even survive that for very long.

Why should you start injecting reality and common sense into this discussion at this late date?? You might as well start thinking about whether those monkeys with the typewriters have had touch typing classes or not.

Flint 02-05-2008 08:40 AM

Okay, I hear what people are saying. You want more shuffles getting done, okay. Let’s look at that.

I’m going by HLJ’s calculation (I’m too lazy to do it myself) that in 9.e+33 permutations you would have a 50% chance of repeating the same shuffle.

I’m using the entire population of planet Earth (6,648,429,413), and I’ll have them shuffle one deck of cards per second, year-round. It would take 42,925,646,062,489,266.972805985537223 years to get through 9.e+33 permutations.

How long is that? Well, the Earth is estimated to be 4.54 billion years old. It’s 9,454,988.1194910279675784109112819 times longer than that.

So, if every living person on the Earth shuffled one deck of cards per second, for 9 million times longer than the Earth has existed, there would be a 50% chance of the same shuffle coming up.

THE SAME EXACT SHUFFLE HAS NEVER HAPPENED, AND NEVER WILL HAPPEN. EVER.

lumberjim 02-05-2008 09:16 AM

unless it does...

Clodfobble 02-05-2008 10:04 AM

It totally happened to me the other day. Take my word for it.

HungLikeJesus 02-05-2008 07:52 PM

Would you settle for 1% chance?

kerosene 02-05-2008 07:55 PM

Flint, are you OCD?

Flint 02-05-2008 07:56 PM

Quote:

Originally Posted by HungLikeJesus (Post 430069)
Would you settle for 1% chance?

If you're offering to calculate how many permutations of 52! you would have to go through to have a 1% probability of repeating a permutation...
I would love to know that.

HungLikeJesus 02-05-2008 10:30 PM

I'd better present my logic to see if anyone disagrees.

(n*(n-1))/(2*52!) = P; solve for P, where P = probability of 2 or more matching shuffled decks in n shuffles.


(n-1)^2 < n*(n-1) < n^2, so

(n-1)^2/(2*52!) < n*(n-1)/(2*52!) < n^2/(2*52!),
so the first equation can be simplified (for large values of n) as

n^2 ~= P*2*52!

n = square_root(P*2*52!)

If P = 0.5 (50%), n = 8.98e33
If P = 0.1 (10%), n = 4.0e33
If P = 0.01 (1%), n = 1.27e33

I just noticed a flaw in this logic. Can you see it?

classicman 02-05-2008 11:04 PM

lol - I can't even follow that!

lumberjim 02-05-2008 11:23 PM

pull my finger!

HungLikeJesus 02-06-2008 08:13 AM

I forgot to check one of the boundary values. For n = 52!, P should equal one. Instead, for n = 52!, P = (52!-1)/2, so something is not right.

Spexxvet 02-06-2008 08:24 AM

Quote:

Originally Posted by classicman (Post 430138)
lol - I can't even follow that!

Yeah I was thinking n=52????????????????????, not 52!

classicman 02-06-2008 08:25 AM

and I thought "n" was a letter not a number - silly me.

Shawnee123 02-06-2008 08:30 AM

Quote:

Originally Posted by HungLikeJesus (Post 430196)
I forgot to check one of the boundary values. For n = 52!, P should equal one. Instead, for n = 52!, P = (52!-1)/2, so something is not right.

Then, what is this n? Does n=52 or does n=number of shuffles?

Quote:

Originally Posted by HungLikeJesus (Post 430116)
I'd better present my logic to see if anyone disagrees.

(n*(n-1))/(2*52!) = P; solve for P, where P = probability of 2 or more matching shuffled decks in n shuffles.



Spexxvet 02-06-2008 08:33 AM

I think n=n.

Shawnee123 02-06-2008 08:35 AM

lmao

You damn kids and your new math.

HungLikeJesus 02-06-2008 08:38 AM

n represents the number of shuffles. When the decks have been shuffled 52! times (52x51x50x...x2x1), all possible combinations --- hey, I think you're right! I've been thinking about this wrong. You don't have to encounter every possible combination to get two that match. Maybe my original calculations were right. I will think about it while I shower. I hope this B&B has a lot of hot water.

Shawnee123 02-06-2008 08:42 AM

Can we watch...um, er...I mean watch the mathematical genius as his mind dazzles with brilliance and...

Flint 02-06-2008 08:52 AM

Just give me a number so I can slap you in the face with it. I haven't met my quota for scathing remarks this morning.

HungLikeJesus 02-06-2008 09:19 AM

Quote:

Originally Posted by Shawnee123 (Post 430216)
Can we watch...um, er...I mean watch the mathematical genius as his mind dazzles with brilliance and...

Sorry, I have to be up to the big house in 10 minutes, to get the second B of this B&B.

Flint 02-06-2008 09:24 AM

Buttsecks and barbecue?

HungLikeJesus 02-06-2008 09:29 AM

Well, it is Montana. Rules are rules.

After last night, I hope it's not too spicy.

skysidhe 02-06-2008 09:31 AM

Quote:

Originally Posted by classicman (Post 430138)
lol - I can't even follow that!

I think that's the point

:lol: busting a gut

Happy Monkey 02-06-2008 11:17 AM

Quote:

Originally Posted by HungLikeJesus (Post 430196)
I forgot to check one of the boundary values. For n = 52!, P should equal one.

No, P will never be one. You are never guaranteed to get a match.

Clodfobble 02-06-2008 11:39 AM

Yes you are, because the outcomes are limited--it's like if you have four different colors of socks, and you choose five socks. Your fifth sock must match one of the other four.


All times are GMT -5. The time now is 09:25 AM.

Powered by: vBulletin Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.