Probability or Possibility questions can be very mind-boggling if you don’t get an effective way to approach the thinking process, once you do, it’s incredibly easy.
Probability or Possibility problems are essentially the same kind of problem because probability is just the “interested possibility” over “total possibility”. While in tackling possibility problems, we usually will deal with either grouping or sequencing problems. Grouping problems can be solved once the sequencing is figured out.
For example, there are 54 poker cards, what’s the possibility of them in all sorts of orders? what’s the possibility of them in one group. Even the second question is extremely easy, I’d start with the first one. Imagine there are 54 boxes to fill these 54 cards, in the first box, the number of choices is 54, the second box, it is 53 as the first one is filled, so on and so forth, until the last box, which gets 1. This is how factorial 54! works. Moving to the second question, no matter how many kinds of sequencing you can shuffle the cards, the one group possibility is always one.
Now, what if the question is tweaked a little bit, say, from the 54 cards, picking 6 of them, what is the possibility of these 6 cards if 1. sequenced or 2. sequence-agnostically grouped?
This is a little bit tricky, but we can solve them in the same thinking framework. Imagine there are 6 boxes we need to fill in from the 54 cards, in the first box, the number of choices is 54, the second, it is 53, then 52, 51, 50, and 49, so the answer is 54*53…*49 = 18595558800. If the sequence is not considered/grouping problem, then we just need to eliminate additional possibilities by counting them as repetitive. In six boxes with the same cards, the possibility of different sequence is easy to be computed as 6*5*4*3*2*1 = 6! = 720, hence, the answer to the second question is 18595558800/720=25827165.
Once we get the fundamental of these sequencing/grouping sorted out, we can try to solve a typical interview question for programmers. The question is: if we break the 54 cards into 6 piles, what is the probability the big joker and small joker are assigned to the same pile?
There are multiple ways to tackle it.
First, we think conventionally. The total possibility of these cards is 54! which goes into the denominator; the numerator is the possibility that two jokers happen to be assigned in the same pile, meaning it has to be close by, there are 8 possibilities how they are close to each other – right next to each other, one position in between, two positions in between and so on. Now if we look at the first box, there are 54 choices, the second choice, however, can not be 53. but 52 because we have the big and small joker fixed in one of the 8 scenarios. In total, the possibility is 54*52!*8. And the answer is 54*8*52!/54! = 8/53.
Second, let’s think more smartly to pivot on the distance between big joker and small joker, there are 53 possibilities in total, from a shoulder to shoulder juxtaposition, to have one position in between, or two in between, … to 53, the longest in between them. Among these 53 scenarios, only 8 satisfies the condition in the question, hence, the answer is 8/53. Note this approach disregards the sequence of cards, but focus on the relative distance between two jokers, which is what is asked, making the process much more lucid and direct.
To sum up, I found it extremely important to have a rigorous logical thinking ability, and what’s even better, is to have a clever pivotal angle to think before habitually applying logical thinking on a complex framework.
I took another deep thought and realize the above reasonings are flawed. The sequence of big small joker does matter, and what’s more, as the cards are evenly separated to 6 piles, the scenario when big joker and small joker are next or close to each other but in two piles is not considered.
To find the correct solution, I’d like to start from a smaller-scale problem, say, if there are four cards, evenly cut into two groups, what’s the probability of big joker and small jokers are put together.
Using a brute force way, I draw out all the possibilities
So the answer is 8/24 = 0.3333. If we apply logical inferring, first, the denominator = 4! = 24; second, the case of our interest is that big and small jokers are together, so we focus on big in front, the small joker in the second scenario, then we can multiply it by 2, b+s can be in the first group or in the second group, let’s choose the first group, and later on we can multiply it by 2. Now, the situation is straightforward, b+s in the first group, leave c + d or d + c in the second group, so the total possibility = 2*2*2 = 8, dividing 24, the answer is 0.3333.
Upscale the number of cards to 6 and the pile to 2, first, the denominator = 6!; second, we fix the sequence to that b ahead of s, b+s can be in one of 2 groups, if b+s in the first group, we can lump b+s together as an independent element, so there are 2*4 possibilities in the first group, for the second, the possibility = 3! = 6; if b+s is in the second group, it’s symmetrical, so the final answer is 2*4*3!*2*2 /6!= 192/6!= 0.2667.
Upscale the number of cards to 54 and the pile to 6, first, the denominator = 54!; second, we fix b + s sequence, b+s can be in one of 6 groups, if b+s in the first group, we can lump b+s together as an independent element, so there are 8*52*51*50*49*48*47*46 possibilities in the first group, if b+s is one position away, then the sequence it can show up in a pile composing of 9 cards is 7, so on and so forth, the other 5 groups contains the 45!, now, multiply the 6 piles, multiply 2 possible sequence, the answer is 6*2*(8+7+6+5+4+3+2+1)*52!/54*53*52!=4*9*6*2/53*54=8/53.
Verifying it by applying it back to the smallest sample of 4 cards, the equations is 2*2*1*2!/4*3*2!=4/12=0.3333. Correct!
It’s worth noting that some people propose that one joker exists in one pile’s chance is 1/6, so the other jokers also gest 1/6, multiplying the two 1/36 should be the answer, it is not, the tricky part is that it is not two independent random events like flipping the coins.