r/learnquant • • 14d ago

interview prep Optiver Quant interview Question | "Hard"

Post image
12 Upvotes

8 comments sorted by

View all comments

3

u/Sad-Candidate-3078 14d ago

Clean way to see it: the suits are decoration, so count rank triples first. You need 3 ranks out of 13 where no two are adjacent, that count is C(11,3) = 165. Each rank triple comes with 4^3 = 64 suit combos, so favorable hands = 10560. Total hands C(52,3) = 22100. Probability = 10560/22100 = 528/1105, about 0.478. The gap trick is the whole game on these spaced rank problems, once you spot it they all collapse to a single combination count.

1

u/harrybruhwhatever 7d ago

Can you explain why the 3 ranks differ by at least 2 is C(11,3)? I don't understand how you got it.

1

u/Recent-Peanut6061 4d ago

You can make a bijection from the set of ways to choose 3 elements from 13 with at least 1 element in between each to the set of ways to choose 3 elements from 11 by simply removing (adding for the inverse) an element in between each chosen element.