What is you probability of getting 3 consecutive numbers if you draw 5 cards from a deck of 52?

756 Views Asked by At

For example, drawing 5 cards and getting 2-3-4. A-2-3 and Q-K-A both count. The total number of ways to draw 5 cards is 52C5=2598960. My attempted answer was (12C1)(10C2)(4^5)/(52C5), but I don't think that's right

2

There are 2 best solutions below

1
On

I can only think of an inelegant approach. I will use a denominator of $D = \binom{52}{5}$. Then after calculating the numerator, $N$, the answer will be $\frac{N}{D}.$ Since the denominator is computed by construing that the order that the cards are dealt is not important, the numerator will be computed in a consistent manner.

For favorable drawings, the longest consecutive grouping can either be 5 consecutive numbers, 4 consecutive numbers, or 3 consecutive numbers. I will be careful to enumerate these as mutually exclusive (i.e. non-intersecting) possibilities.

I am going to compute $N_1, N_2, N_3$ to represent the enumerations of 5 consecutive numbers, 4 consecutive numbers, or 3 consecutive numbers, respectively.

Then, $N$ will be computed as $N_1 + N_2 + N_3$.


There are $10$ possible sequences of (1 through 5) up through (10 through 14). For each of these sequences, there are $4^5$ possibilities, re the suits used for each card.

Therefore, I will compute
$N_1 = 10 \times 4^5.$


For 4 consecutive numbers, if the sequence is 1 through 4 then the 5th card can't be a 5, because that possibility has already been covered by the enumeration of 5 consecutive numbers. Similarly, if the sequence is 11 through 14, then the 5th card can't be a 10.

To compute $N_2$, I am going to compute $T_1$ to refer to the enumeration that pertains to the sequence 1 through 4, and $T_2$ to refer to the enumeration that pertains to the sequence 2 through 5.

Suppose that the sequence is 1 through 4. There are $(4^4)$ ways that these cards can be drawn. Then, either the 5th card is also 1 through 4, or it isn't.

If it is, then you have $(4^4) \times $12$ \times \frac{1}{2}$ ways that this can occur. The $(12)$ refers to the other 12 cards that remain that are $4$ or less. The $\frac{1}{2}$ refers to an overcounting scalar that must be applied. Otherwise, you would (for example) be counting the cards $A_s, 2_s, 3_s, 4_s, 4_h$ twice.

So you have a partial sum of $(4^4) \times 12 \times \frac{1}{2}.$

The 5th card could also be any of the 32 cards higher than a $5$.

Therefore, the enumeration for the sequence 1 through 4 is
$T_1 = (4^4) \times [(12 \times \frac{1}{2}) + 32] = (4^4) \times 38.$

The considerations for calculating the sequence of 11 through 14 are identical, and will also result in an enumeration of $T_1$.

Consider the sequence 2 through 5. Then, both the 1's and 6's are out of bounds, since these cases have already been covered by the enumeration of 5 consecutive numbers.

Therefore, the enumeration for
$T_2 = (4^4) \times [(12 \times \frac{1}{2}) + 28] = (4^4) \times 34.$

Enumeration of the sequences (3 through 6) through (10 through 13) will have the same considerations as the sequence of (2 through 5), and will therefore also have an enumeration of $T_2$.

Therefore, with $T_1 = (4^4) \times 38$ and $T_2 = (4^4) \times 34$,
the enumeration for the mutually exclusive case of a string of 4 consecutive numbers is $N_2 = (T_1 \times 2) + (T_2 \times 9).$


The enumeration of a sequence of 3 consecutive numbers will be similar to the previous section, only more complicated. The sequences of (1 through 3), and (2 through 4) will have different enumerations, which will be labeled $U_1, U_2$ respectively.

Then, these will be combined to compute $N_3$.

When computing $U_1$, which pertains to the sequence 1 through 3, I am going to use the partial sums of $A_1, A_2, A_3.$ In the computation of $U_1$, one possibility is that all 3 cards are 3 or less. Using Inclusion-Exclusion, the number of ways that this can occur is
$A_1 = \binom{12}{5} - \left[3 \times \binom{8}{5}\right]$.
Notice that it is impossible for 5 cards to all come from the same number, since there are only 4 suits in the deck.

So, $A_1$ is a partial sum, when computing $U_1$.

For the sequence 1 through 3, you could also have exactly 1 other card, 3 or less, and 1 card above 4.

Similar to the overcounting consideration in the previous section, $A_2 = 4^3 \times 9 \times \frac{1}{2} \times 36 = 4^3 \times 9 \times 18.$ The $(9)$ refers to the 9 cards left after one of each suit is taken by 3 cards. The $\frac{1}{2}$ again is an overcounting scalar, and the $(36)$ refers to the number of cards that are higher than 4.

Finally, the number of ways that both cards can be 5 or more is
$A_3 = 4^3 \times \binom{36}{2}$.

Thus, you have that
$A_1 = \binom{12}{5} - \left[3 \times \binom{8}{5}\right].$
$A_2 = 4^3 \times 9 \times 18.$
$A_3 = 4^3 \times \binom{36}{2}$.

$U_1 = A_1 + A_2 + A_3$.

To compute $U_2$, which refers to the sequence 2 through 4, I will use the partial sums $B_1, B_2, B_3$.

Here, $B_1 = A_1 = \binom{12}{5} - \left(3 \times \binom{8}{5}\right).$

The easiest way to compute $B_2$ is to examine how $A_2$ was computed.
$A_2 = 4^3 \times 9 \times \frac{1}{2} \times 36.$

Here, the $(36)$ referred to there being 36 cards above a 4.
To compute $B_2$, notice that there are 32 cards above a 5.
Therefore
$B_2 = 4^3 \times 9 \times \frac{1}{2} \times 32 = 4^3 \times 9 \times 16.$

Similarly,
$B_3 = 4^3 \times \binom{32}{2}$.

Therefore, you have that
$B_1 = \binom{12}{5} - \left(3 \times \binom{8}{5}\right).$
$B_2 = 4^3 \times 9 \times 16.$
$B_3 = 4^3 \times \binom{32}{2}$.

$U_2 = B_1 + B_2 + B_3$.

With $U_1$ and $U_2$ both computed, notice that $U_1$ should be applied to the sequences (1 through 3) and (12 through 14), while $U_2$ should be applied to the other 10 sequences.

Therefore, $N_3 = \left(2 \times U_1\right) + \left(10 \times U_2\right).$

Edit
Thanks to saulspatz for finding a subtle flaw in this analysis. Everything is correct except that the specific sequence of $(AKQ23)$ is double counted. The easiest fix is to leave all the analysis as is, and to band-aid:

$N_3 = \left(2 \times U_1\right) + \left(10 \times U_2\right) - (4^5)$.


My partial sums were :
$N_1 = 10240$
$N_2 = 97792$
$N_3 = 518464 - 1024 = 517440.$

This gives a grand total of $N = 625472.$

3
On

I'm getting myself confused while trying to check user2661923's answer, so I have to resort to doing it myself. As indicated in the comments, I wrote a python script that got a slightly smaller answer than he did.

I'll take the same general approach, enumerating disjoint cases. I won't use inclusion-exclusion at all, because I think that its application to this problem is too confusing, at least for me.

We could have a $5$-card straight. There are $10$ possibilities for the low car (Ace through $10$) so we have $$10\cdot4^5=10240$$ possibilities.

We could have a $4$-card run. There are two basic situations: the fifth card could have the same rank as one of the cards in the run, or it might not. In the latter case, we must be sure it doesn't create a straight that we have counted already.

First we count the runs with pairs. There are $11$ possible runs, and $4$ ways to choose the duplicated card. This gives $$11\cdot4\cdot4^3\binom42=16896$$ possibilities. For the runs without a pair there are again two possibilities. For the highest and lowest run, the fifth card can come from any of $8$ ranks without producing a straight, but for the other $9$ runs, the fifth card can come from only $7$ ranks. This gives $$2\cdot8\cdot4^5+9\cdot7\cdot45=80896$$ so altogether $$16896+80896=97792$$ possibilities.

So far, these agree with user2661923's results.

For the case of a $3$-card run we have several sub-cases.

  1. Only the cards in the run appear; one of them is tripled;
  2. Only the cards in the run appear; two of them are paired;
  3. Four of the cards in the run appear; one is paired
  4. None of the cards in the run is duplicated.

In the last two cases, we must ensure that the odd cards don't create a run of $4$. There are $12$ possible $3$-card runs so we have

  1. Case $1$: $12\cdot3\cdot4^2\binom43=2304$
  2. Case $2$: $12\cdot3\cdot4\binom42^2=5184$
  3. Case $3$: $3(2\cdot9+10\cdot8)4^3\binom42=112896$

The analysis in case $4$ is a little different from what's gone before. We have $4^3$ ways to choose the cards in the run. For the highest and lowest run the other two cards can be any of $36$ remaining cards. For the other $10$ runs they can come from only $32$ cards. This gives $$64\left(2\binom{36}2+10\binom{32}2\right)=398,080$$for a total of $$2304+5184+112896+398080=518464$$ or $$10240+97792+518464=626496$$ in all.

Which agrees with user2661923's answer. At first, I thought my simple script was wrong, but after much hair-pulling, I found the mistake in the above calculation. hands of the form A23QK are counted twice, once for the A23 run and once for the QKA run. There are $4^5=1024$ hands of this type, so the correct answer is $$626496-1024=\boxed{625472}$$ which is what my script got.