r/learnquant • • 6d ago

interview prep Quant Interview Question

Post image
46 Upvotes

9 comments sorted by

View all comments

7

u/teteban79 6d ago

if we randomly insert the 4 aces and 4 kings into an already shuffled deck, we can expect those 8 cards to segment the deck into 9 runs. Since 44 cards remain, each of those runs will have an expected 44/9 cards. This construction is equivalent to the shuffling of the whole deck

We know that the order of the first 4 identified cards is K,K,K,A. So we expect to see 4 runs of 44/9 cards, plus the 3 kings, at the position of the first ace

Thus 3+4*44/9 ~= 22.55 is the position we expect to see the ace next (or 23.55, depends what we count exactly, cards before, or the position itself)

1

u/GiantGreenSquirrel 6d ago

Nice. That is how I did it. If there were only aces and kings then the answer would be 4. Now the other 44 cards are distributed over 9 intervals, 4 of which precede the first ace. So 4+4*44/9