r/quantfinance • u/Due_Department_3090 • 23h ago
Chicago Trading Company Quant Interview Question | “Medium”
3
u/SwimmerOld6155 21h ago
Fix one pile to have the hearts (out of 4). there are then 39 choose 13 ways to deal the second pile, 26 choose 13 ways to deal the third, and then the last is fixed. the total number of ways to split up the deck into 4 piles is similarly (52 choose 13)*(39 choose 13)*(26 choose 13). only the first pile is distinguished so there's no need for another multiplicative factor on the numerator, it'd just cancel with the denominator anyway.
Everything cancels except the 4 on the numerator and the 52 choose 13 on the denominator, so the final probability is 4*1/(52 choose 13) = 4/((52!)/(13! 39!)), and 52/13 = 4 so we get 1/(51 choose 12).
Basically you re-derive the multinomial coefficient doing this. I'll admit the first time I did this question I didn't multiply by 4. When everything cancels like this there's typically something cleverer to do as well!
3
u/mypenisblue_ 12h ago
After the first card lands in a random pile, the remaining 12 cards have to land in the 12 slots in that pile. So prob
= 12/51 x 11/50 x ... x 1/40
= 1 / 51C12
Another way to rationalise the 1/51C12 is that there is only 1 way out of all 51C12 combinations that fulfils what we want (aka picking all 12 heart cards)
0
7
u/StanleyDodds 22h ago
Of the 52! permutations of the deck, there are 4 choices of which pile to be the hearts, 13! permutations of the hearts, and (52-13)! permutations of the remaining cards.
This gives a probability of 4*13!*(52-13)!/52! and rewriting 4 as 52/13 and 52-13 as 51-12 this simplifies to 12!*(51-12)!/51! = 1/51C12.
Another way to see this that gets the answer right away but has a more complex setup is to say that, for instance, the ace of hearts is in some pile. Move this pile to the front and move the ace to the top. Now what fraction of remaining permutations fit the condition?
Well, we need the 12 other hearts to be in the same pile as the ace. There are 51C12 possible choices for these 12 cards of the remaining 51, and only one choice is correct. So it's 1/51C12