mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2007-01-06, 15:39   #1
TimSorbet
Account Deleted
 
TimSorbet's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

11·389 Posts
Default Card Sorting Probability

Given x cards, what is the probability that all the cards will be sorted in some specific way? (e.g. 13 in hearts, sorted the way that Hearts included with Windows sorts them)
Would it be x^{x}? With 13, as in hearts, this would make the chance just over one in 302 trillion. Is this correct? If not, what is the correct formula?
TimSorbet is offline   Reply With Quote
Old 2007-01-06, 16:28   #2
Wacky
 
Wacky's Avatar
 
Jun 2003
The Texas Hill Country

44116 Posts
Default

A few minor points. You ask for the probability and then quoted the chance.
Probability is always a number in the closed interval 0 to 1. It is related to the chance A::B by p= A/B

As for the card sorting, your universe is the number of permutations of the objects, in this case x things taken x at a time, and the number of successes is 1.

The number of permutations of x things taken x at a time is x!.

Thus the probability of a particular sort sequence, assuming that everything is chosen at random is 1/x!

Last fiddled with by Wacky on 2007-01-06 at 16:29
Wacky is offline   Reply With Quote
Old 2007-01-08, 19:34   #3
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

19·181 Posts
Default

A deck with 52 cards can, as Wacky said, be sorted in 52! = 8*1067 ways. So if you want the chance for it to be sorted in 1 specific way, the chance is 1 in 8*1067 or 1 in 80 million trillion trillion trillion trillion trillion.
ATH is offline   Reply With Quote
Old 2007-01-09, 00:40   #4
jasong
 
jasong's Avatar
 
"Jason Goatcher"
Mar 2005

3·7·167 Posts
Default

I think he asked a slightly different question. What are the odds that you can look through the pack and find all the hearts(in order?) right next to each other.
jasong is offline   Reply With Quote
Old 2007-01-09, 07:15   #5
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2·3·13·83 Posts
Default

Quote:
Originally Posted by jasong View Post
I think he asked a slightly different question. What are the odds that you can look through the pack and find all the hearts(in order?) right next to each other.
I don't think he was asking this , but...

There are 39! ways of sorting the non-hearts, and 40 positions to
insert the heart suit.
Probability = 40!/52! or 1 in 1020

David

Last fiddled with by davieddy on 2007-01-09 at 07:22
davieddy is offline   Reply With Quote
Old 2007-01-09, 13:50   #6
TimSorbet
Account Deleted
 
TimSorbet's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

11×389 Posts
Default

Actually, I was talking about the 13-card hand you are dealt each round in the game of Hearts being sorted in some specific way.
Quote:
Originally Posted by ATH View Post
A deck with 52 cards can, as Wacky said, be sorted in 52! = 8*1067 ways. So if you want the chance for it to be sorted in 1 specific way, the chance is 1 in 8*1067 or 1 in 80 million trillion trillion trillion trillion trillion.
1 in 80 million trillion trillion trillion trillion trillion would be the chance that all four players in the game have a perfectly sorted hand dealt to them. I was thinking about one player.
TimSorbet is offline   Reply With Quote
Old 2007-01-11, 10:53   #7
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

19×181 Posts
Default

You can "pick" 13 cards out of 52 in:

\large\left(\begin{array}\\52\\13\end{array}\right)=\frac{52*51*50*49*48*47*46*45*44*43*42*41*40}{1*2*3*4*5*6*7*8*9*10*11*12*13}=635,013,559,600 ways

So if you want 1 specific 13-card hand its 1 in 635 billion.
ATH is offline   Reply With Quote
Old 2007-01-11, 17:08   #8
S485122
 
S485122's Avatar
 
"Jacob"
Sep 2006
Brussels, Belgium

1,907 Posts
Default

Since the order is important:
Quote:
the 13-card hand you are dealt each round in the game of Hearts being sorted in some specific way
you should not have divided by 13!

The result is then 52! / (52-13)! = 3954242643911239680000 or roughly 4*1021

But I am stil not completely sure about the exact question.
S485122 is offline   Reply With Quote
Old 2007-01-11, 18:26   #9
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

19·181 Posts
Default

Quote:
Actually, I was talking about the 13-card hand you are dealt each round in the game of Hearts being sorted in some specific way.

1 in 80 million trillion trillion trillion trillion trillion would be the chance that all four players in the game have a perfectly sorted hand dealt to them. I was thinking about one player.
Mini-Geek is talking about Hearts game in windows, and there you get all your 13 cards at once, so I don't think he means the order in which you recieve the 13 cards. I think he means the chance you get all 13 hearts for example, and that is 1 in 635 billion.

Look at it this way: You have 52 cards and have to pick out 13. First card you can choose from 52 cards, 2nd time 51, then 50, and so on. The 13th card you can choose from 40 cards. Now you don't care if you get 2 of spades and then 3 of hearts or 3 of hearts and then 2 of spades, so you divide by 13! which is the number of diffrent sequences the same 13 cards can be in.

Last fiddled with by ATH on 2007-01-11 at 18:43
ATH is offline   Reply With Quote
Old 2007-01-11, 23:03   #10
TimSorbet
Account Deleted
 
TimSorbet's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

11·389 Posts
Default

I'm not talking about which cards you get, I'm talking about the order in which you receive them.

Let me clarify my question in the following way:
A shuffled deck has 52 cards numbered 1-52 You take 13 of those cards and put them in a pile. What are the odds/chances/probability (not sure which term to use) that when you pick them up, your (the 13-card pile is "yours") lowest will be on the left, your next lowest to the right of that, and so on, all the way to the highest number in your group of cards being on the far right.
TimSorbet is offline   Reply With Quote
Old 2007-01-12, 07:02   #11
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

19×181 Posts
Default

Ok, heh, so easy to get confused in this.

So a deck with 52 cards numbered 1 to 52, not a normal 4-suit deck. You get 13 cards, don't care which 13 cards, just that you get them in order lowest to highest.

Well the chance is always "number of favoured combinations" out of "number of total combinations".

Now that you care about the order in which you get them, the total number of combinations is 52*51*.....*40 = 52!/(52-13)! = 3954242643911239680000 as S485122 said. That is the number of ways you can get 13 cards out of 52, when you care about the order too.

The number of "favoured combination" is \left(\begin{array}\\52\\13\end{array}\right) = 635013559600, which is the number of unsorted 13-card hands.

So the chance is:
635013559600 in 3954242643911239680000 which is:

1 in 6,227,020,800 (= 13! )

Another way to see this is: Each different 13-card hand can be sorted in 13! ways, and you want the only one sorted from lowest to highest, so 1 in 13!.

Last fiddled with by ATH on 2007-01-12 at 07:20
ATH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting on chinese remainder theorem alpertron Math 23 2017-12-15 16:46
Looking at new GPU card for less than $450 section31 GPU Computing 4 2016-01-19 17:04
Failed to Load GPU Sorting Engine (sort_engine_sm20.dll) GodyDeeps Msieve 5 2015-01-03 17:23
card probability TimSorbet Math 8 2007-09-25 20:00
Sorting Files into 'chunks' of size X antiroach Programming 17 2004-03-01 01:15

All times are UTC. The time now is 02:04.


Tue Feb 7 02:04:03 UTC 2023 up 172 days, 23:32, 1 user, load averages: 1.47, 1.16, 1.07

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔