If a deck of 54 cards (including 2 jokers) is evenly split into 3 groups of 18, what is the probability that any one group contains both jokers?

3.4k Views Asked by At

I was just asked this interview question on combinatorics:

A deck of 54 cards (includes 2 jokers) are split into 3 equal groups of 18. What is the probability of any single group having both jokers?

I only had time to think of a solution post-interview, but please check whether my answer is correct:

$$ P = \frac{\text{Ways to form group with 2 jokers} \times \text{Ways to form 1st non-joker group} \times \text{Ways to form 2nd non-joker group}}{\text{Ways to form 3 equal groups}} $$

$$ P = \frac{{2 \choose 2}{52 \choose 16} \times {36 \choose 18} \times {18 \choose 18}}{{54 \choose 18}{36 \choose 18}{18 \choose 18} / 3!} $$

I'm not sure whether I need to divide by $3!$ in the denominator, since it seems the numerator will also have this and it cancels out?

10

There are 10 best solutions below

7
On BEST ANSWER

As Shreya says, you are out by a factor of 2. Another way to see this is that $$\frac{\binom22\binom{52}{16}\binom{36}{18}\binom{18}{18}}{\binom{54}{18}\binom{36}{18}\binom{18}{18}}$$ is the probability that when you divide the cards into three ordered groups, the jokers are both in the first group. Since there are three groups the jokers could be in, you need to multiply this by $3$ (not $3!$). Of course you can simplify the above to $$\frac{\binom{52}{16}}{\binom{54}{18}}=\frac{17\times 18}{54\times53}=\frac{17}{53\times 3},$$ so the answer is $17/53$.

However, a simple way to get this is as follows. We'll shuffle the cards and then put the first $18$ in the first group and so on. Wherever the first joker is, $17$ of the remaining $53$ places are in the same group. Since the other joker is equally likely to be in any of the $53$ possible places, it has probability $17/53$ of being in the same group.

2
On

There is a minor error in your logic. The denominator must be divided by $3!$ as you are counting each way $6$ times in different orders, that part is correct. Similarly, you have to divide the numerator by $2!=2$ as the first and second non-joker groups are not distinct. They are interchangeable and counted twice in different orders.

This is, of course, assuming that the groups are not distinct. If they are, then the answer will be different.

1
On

I'm not sure whether I need to divide by 3! in the denominator, since it seems the numerator will also have this and it cancels out?

If you're in a rush (and sometimes even if not), it can be very helpful to be able to make a quick estimate. In this case, you can choose one joker arbitrarily and say that whatever group it is assigned to, there is approximately a 1/3 chance that the other is assigned to the same group. (Only approximately because there are 18 slots to choose from in the two other groups, but only 17 in the one to which the other joker is already assigned.)

Depending on the nature of the interview, "approximately 1/3" might even be a good final answer to the question, but if you want to compute the exact answer then such an estimate gives you a way to check your work. If you suppose that you otherwise worked the problem correctly, that would certainly tell you that dividing by 3! can't be right, but dividing by 3 might be.

1
On

None of these are correct, in my opinion for the following reasons: First, consider what is the probability(P) of just one of the jokers being in "either" one of two groups? If each of the two groups have 2 jokers (favorable outcomes) of the total 54 cards (total possible outcomes), divided into two groups of 27 in each group, then your setup for that P would be 2/27 + 2/27 = 4/27. (In an "either"/ "or" probability situation, you add the probability ratios to arrive at the P.) So logically, the P could never be greater than this as you restrict the outcomes more and more; instead, the P is "exponentially" decreased, not by dividing by 3 or by dividing by anything else! So in the above example, now consider the same scenario of only two groups, but instead of just one joker being in one of the groups, you are restricting your outcome of both jokers appearing in only one of the groups. Now your probability has just diminished, not by 1/2, but "exponentially" by the P of the one, 2/27 multiplied by the its occurrence in the second one, so now you have 2/27 x 2/27 = 4/27 x 27. So as you limit or restrict your outcomes more and more, your probability of your "favorable" outcomes is less likely to occur, not more, right? This is why the above answers are not logical, much less not correct. Any additional conditions/ limitations/ restrictions you add to a P problem, know that your final outcome, the least likely to occur, can never exceed the most likely outcome, that being one of the highest probabilities to occur, that being in this scenario, 2 jokers out of 54 cards, 2/54 = 1/27.

0
On

Another (possibly easier) way:

  • $54!/2$ is number of permutations of all cards
  • $(18\cdot 17)/2$ is number of permutations of jokers in first $18$ cards
    • terms are divided by two because two jokers are the same
  • $52!$ is number of permutations of all non-joker cards

$$3 \cdot \frac{(18\cdot 17)/2 \cdot 52!}{54!/2}=\frac{17}{53}$$

1
On

We have $3$ groups of size $18$. The probabilty of the first joker being in the first group is $\frac{18}{54}$ and the probabilty of the second joker being in the first group is $\frac{17}{53}$. Hence the probabilty of the both jokers being in the first group is $$\frac13\times\frac{17}{53}=\frac{17}{159}.$$ Similarly for the second and the third groups. Therefore, the probabilty of the both jokers being in the same group is $$3\times\frac{17}{159}=\frac{17}{53}.$$

0
On

This is redundant, but just in case it's useful: it seemed natural to me to work it out this way (which is exactly what Bob Dobbs did, but with a tiny bit of formal probability notation):

$$P(\text{1st joker}) = 18/54$$

$$P(\text{2nd joker} | \text{1st joker}) = 17/53$$

$$P(\text{both jokers}) = P(\text{2nd joker} | \text{1st joker}) P(\text{1st joker}) = 17/53 * 18/54 $$

$$P(\text{both jokers in any group}) = 3 * P(\text{both jokers}) = 17/53$$

5
On

This is actually simpler than the answers here are making it. Looking at the question a different way, we want the probability that both jokers are in the same group of 18 cards.

Call the jokers J1 and J2. J1 is in one of the three groups: call this Group_1.

Now we just want the probability that J2 is in Group_1. But this is just 17/53 (there are 17 spots left in Group_1 and 53 cards left in the deck).

1
On

I'm not very mathy so downvote away for a lack of greek letters and integrals and such, but this seems like a lot of overthinking. Assuming random distribution and given the simplicity of the scenario, you have a total of six possible outcomes pertaining to the location of the two jokers. Three have a joker card in two groups. Three have one group in possession of both jokers:

$$\begin{array}{c|c|c|} & \text{Group A} & \text{Group B} & \text{Group C} \\ \hline \text{1} & 1 & 1 & 0 \\ \hline \text{2} & 1 & 0 & 1 \\ \hline \text{3} & 0 & 1 & 1 \\ \hline \text{4} & 2 & 0 & 0 \\ \hline \text{5} & 0 & 2 & 0 \\ \hline \text{6} & 0 & 0 & 2 \\ \hline \end{array}$$

If the question intended to ask of all possible distributions of two jokers between three groups, how likely is it that a given distribution involves a group holding both jokers, then the probability is 50% (3 of 6).

If the question intended rather to ask from the perspective of a selected group, what is the probability of that group being the one to possess both jokers, then the probability is 1/6.

Either way, even if it's mathematically correct, your solution would probably be "wrong" in the sense that it obfuscated a simple calculation, to the point where you confused yourself. I imagine the person conducting your interview was probing whether you could/would reduce a seemingly complex problem to a simpler one, akin to determining why a car won't move: did you disassemble the engine before checking to see if the key was in the ignition and the gear wasn't in neutral? Hmm. And also, clarifying/identifying the actual problem you mean to solve is usually good first step.

0
On

A major issue in combinatorics questions is keeping track of what states are considered "equivalent", and keeping that equivalence constant throughout all of the calculations. In this case, there's the question of whether swapping groups results in an "equivalent" situation. That is, if you pick up all the cards that were in the first group and put them in the second group, and take all the cards that were originally in the second group, and put them in the first group, have you meaningfully changed the situation?

When you divide by 3! in the denominator, you are implying that you are treating these as being the same situation; since permutating the groups results in essentially the same situation, you divide out by the number of permutations to get the number of equivalence classes. But if you're considering those as being equivalent, then you also have to consider the permutations of the non-Joker groups, and thus you need to divide the top by 2! (there are two non-Joker groups, so there are 2! ways of permuting them).

You could have also not have divided out by these equivalences, in which case you should not have the 3! on the bottom, and you should multiply the top by 3 (there are three different groups that the Jokers could be in). Either will get the right answer, you just have to be consistent.

Especially Lime's last paragraph basically introduces even more equivalences, treating the location of all non-Jokers as irrelevant. In a way, going the other direction and having no equivalences makes the answer even easier to see. There are 54 places the first Joker could be, and once you choose a place for it, there are 17 places that would result in the second Joker being in the same group. There are then 52! places for the remaining cards. This results in

$\frac{54*17*52!}{54!}$

and with a little math this reduces to $\frac{17}{53}$.