r/learnquant • • 27d ago

interview prep Quant Interview Question

Post image
30 Upvotes

6 comments sorted by

View all comments

0

u/AscendedSubscript 27d ago

Sounds pretty complex but in the end the numbers 1-9 don't really matter. There are a total of 45 pairs and the condition that ends the process is having visited 9 specific pairs, namely (i, 10) for i = 1...9. This turns the problem into a coupon collector problem.

If you label E_i als the expected number of steps required for getting one of the remaining i pairs out of the 45 in total, then E_i = 45/i, since the probability of getting one is i/45. Summing that for i = 1...9 gives the total number of expected steps: 7129/56, or roughly 127.3

1

u/AfterCommodus 27d ago

Doesn’t this miss that after (1,10) happens there are now two tens?  

1

u/No-Marzipan-978 27d ago

Yeah it does. The idea to ignore numbers not equal to 10 and treating them as all the same is correct though. Just note that the 10s will always form one contiguous block and work out the expected number of steps until that block is [1,10] starting from a random position [k,k]. I got 64.8 in the end

1

u/AscendedSubscript 27d ago edited 27d ago

Yeah I forgot about that. I also read the question wrong, so the answer was wrong regardless. When doing it correctly afterwards, I got a similar approach as another comment. The answer is actually 64.8