Author Topic: Chance of Two Shuffles of Deck of Cards being the same  (Read 2351 times)

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Chance of Two Shuffles of Deck of Cards being the same
« on: December 09, 2015, 03:01:18 PM »
We have a mathematician in Aus name of Adam Spencer.  He recently wrote a book, World of Numbers.

Here's an example,
What are the chances of a shuffled pack being the same as one that happened in the past?

The number of permutations of a pack of cards (well shuffled) is so massive that, to cover every one of them, you would need

a) a trillion trillion friends
b) each with a trillion trillion packs of cards
c) doing a unique shuffle 1000 times per second (edit) I suspect this should read 185 - see below)
d) since the Big Bang

That's how long it takes to produce all permutations (!)
:)

Basically, you can be pretty certain that any shuffled pack has never been produced before  - nor will it ever be again lol.
« Last Edit: February 06, 2016, 04:18:42 AM by samdavo »

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #1 on: December 09, 2015, 03:08:08 PM »
I don't know the numbers, but I imagine that each of us has a genetic code that has a massive (though finite) number of permutations;    and again, I imagine that we are and always will be "one-off's " - within sensible statistical chances :)
« Last Edit: December 09, 2015, 03:25:05 PM by samdavo »

SciGraphics

  • Sr. Member
  • ****
  • Posts: 389
  • "Nemisis of all evil"
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #2 on: December 10, 2015, 08:48:49 AM »
Here's another one!
  Take two decks and shuffle them up good, but separately. Then get a friend to start turning over one card at a time from the top of his deck while you do the same with your deck. What are the odds that you both will turn over the exact same card at some time during this drill?

Answer: two out of three times. Try it!

Another: If you have more than 23 people in a room together, the odds are 50:50 that two of you will share the same birthday. Just not the same year.

Jim A., Tucson, AZ

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #3 on: December 10, 2015, 11:31:11 AM »
Good ones Jim.
Let me tell you, back in the late 60's in the Aus Army, you only needed a handful of people in that room, lol.   National Service callup was based on birthdays :)

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #4 on: February 02, 2016, 12:50:19 PM »
We have a mathematician in Aus name of Adam Spencer.  He recently wrote a book, World of Numbers.

Here's an example,
What are the chances of a shuffled pack being the same as one that happened in the past?

The number of permutations of a pack of cards (well shuffled) is so massive that, to cover every one of them, you would need

a) a trillion trillion friends
b) each with a trillion trillion packs of cards
c) doing a unique shuffle 1000 times per second
d) since the Big Bang

That's how long it takes to produce all permutations (!)
:)

Basically, you can be pretty certain that any shuffled pack has never been produced before  - nor will it ever be again lol.

Actually I checked, and I believe that should read about 185 times per second since the Big Bang, not 1000. ( 2 cents)
That Adam Spencer, lol - told him a trillion times not to exaggerate.

Factorial 52 = 8.07 x 10^67 permutations.

Compare 13.82 billion years
x 365.25 days
x 24 x 60 x 60 seconds
x 185 times per second  (we're up to 8.07 x 10^19 events since the Big Bang)
x 10^24 a trillion trillion people, each with
x 10^24 a trillion trillion packs of cards
= 8.07 x 10^67 :)

Dr PR

  • Hero Member
  • *****
  • Posts: 5488
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #5 on: February 02, 2016, 01:09:20 PM »
Sam,

Your solution will never work. You can't get a trillion trillion people on the Earth's surface, much less a trillion trillion trillion trillion packs of cards!

Besides, who has that many packs of cards in stock?

Phil
DesignCAD user since 1987

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #6 on: February 02, 2016, 01:52:06 PM »
Lol - dead right. 

PS Maybe you would be the one to ask how long it would take a computer to do that same exercise? :)
8.07E67 is a pretty big number.

PS But SciG's post (reply#2) about turning the cards is surprising yes?  Two out of three times?  Amazingly counter-intuitive.
PS I just tried it three times with one of the kids.   
First test had one match ("snap");
Second test had two matches; and
Third test also had two matches  (2 cents)
« Last Edit: February 02, 2016, 02:07:20 PM by samdavo »

Lar

  • Hero Member
  • *****
  • Posts: 2620
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #7 on: February 03, 2016, 07:54:07 AM »
Sam, Adam Spencer's calculation may be by the numbers, but who's to say it never actually happened before.

And concerning computers doing random calculations, have you ever played backgammon on a board with real dice and have you ever played on a computer. Doubles hardly come with real dice, but on a computer they come way too often. I once played a game and the computer threw doubles about 6 times back to back, at the start of the game. In fact, increasing the difficulty means the computer will throw at least 10 doubles for itself during a game.

Lar

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #8 on: February 04, 2016, 02:00:38 AM »
Ahh, now you're talking - backgammon ! love it lol.

I recommend eXtreme Gammon, only costs about US $50 for the computer version,  and $10 for a mini version for your iPhone (I have both).   For the computer version, at the end of the game you can get a game summary, which includes the number of doubles rolled by each, and the average pip count per roll.   Also analyses errors and blunders, dice action such as bad or missed doubles, and bad takes or passes  - and indeed you can load up a transcript of a tournament game (played on a board or whatever) as an afterthought, and it will review each player.   It even gives as percentage equity for the luck experienced by each player, and the cost of those errors to compare.  Excellent value.

But back to the computer and the topic of this thread  - I notice there is a measure of processor speed called "instructions per second", and the fastest computer mentioned on this Wikipedia page measures up at 10^10 MIPS (million instructions per second) , or 10^16 instructions per second.

https://en.wikipedia.org/wiki/Instructions_per_second

Hence (assuming I have read that correctly), you would need 185 rooms each running since the big bang, and each containing 10^32 such computers, to even "look at" each permutation - which I am very loosely calling one "instruction" (which is surely erring in favour of faster computer speed for this exercise),  i.e.

Factorial 52 = 8.07 x 10^67 permutations.

Compare 13.82 billion years
x 365.25 days
x 24 x 60 x 60 seconds
x 185 rooms
x 10^16 times per second  (we're up to 8.07 x 10^35 events since the Big Bang)
x 10^32 such computers PER ROOM
= 8.07 x 10^67 :)

(think / hope I'm right )


PS Or if you prefer, you can refer to trillions and trillions of billions etc,
Compare 13.82 billion years
x 365.25 days
x 24 x 60 x 60 seconds
x 18 rooms
x 10^16 times per second  (we're up to 8.07 x 10^34 events since the Big Bang)
x 10^33 such computers PER ROOM = a billion trillion trillion computers
= 8.07 x 10^67 :)   
« Last Edit: February 05, 2016, 06:20:17 PM by samdavo »

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #9 on: February 04, 2016, 12:10:19 PM »
Lol - anyone see this news today ...  (speaking of playing cards)   Thai police arrest a group of bridge players BLATANTLY defying the law, lol.   I tell you those 80 year olds are the WORST.   

... police charged the group with possessing more than 120 playing cards that were not produced by the Excise Department, in violation of Section 8 of the Playing Cards Act of 1943 ", lol

 http://www.bangkokpost.com/news/crime/852112/pattaya-cops-bust-32-foreigners-for-playing-bridge

magic

  • Hero Member
  • *****
  • Posts: 1329
  • hokus pokus
    • Magic Systems
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #10 on: February 04, 2016, 06:45:27 PM »
Hi Sam,

As a comment said: "should had played monopoly, you get a free get out of jail card".
It's a kind of magic!




Lar

  • Hero Member
  • *****
  • Posts: 2620
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #11 on: February 05, 2016, 07:10:32 AM »
Sam, back on computer backgammon for a sec- my little free version has the option to roll real dice.

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #12 on: February 05, 2016, 06:30:02 PM »
in eXtreme Gammon? , you bet !   And you can setup an imaginary  position first etc.  Top program.

samdavo

  • Hero Member
  • *****
  • Posts: 2588
  • the trick is knowin...^ > v < - which way's up?
Re: Chance of Two Shuffles of Deck of Cards being the same
« Reply #13 on: February 05, 2016, 06:33:46 PM »
Here's another one!
  Take two decks and shuffle them up good, but separately. Then get a friend to start turning over one card at a time from the top of his deck while you do the same with your deck. What are the odds that you both will turn over the exact same card at some time during this drill?

Answer: two out of three times. Try it!
I just tried this three times, i.e. shuffled two packs and then my son and I put cards out looking for "snap(s)".
 
First trial, one "snap",
Second trial, two "snaps",
third trial, also two "snaps".

Worth knowing for next time I'm in the pub :)