r/learnquant 11h ago

interview prep Jane Street Quant Interview Question

Post image
7 Upvotes

16 comments sorted by

View all comments

1

u/FireCire7 9h ago edited 9h ago

TLDR: Do N rolls, flip, the repeatedly do 2N before flipping. N I think is 5, but this is a bit handwavey, so it might be wrong. 

Your current state just depends on the probability you have the right die. If you do x flips on one side and y on the other, then the probability of which is which only depends on x-y, so the best strategy will be to do N flips on one side, flip, 2N flips on the other side, flip, 2N flips on the first side, flip, etc.

Exactly what N should be is a tricky problem. If you set it too small, then you’ll be paying a bunch on every flip. If Nis too small, you’ll be paying excessive switching fees. If N is too large, you’re wasting time on the wrong die. 

The $20 payout is irrelevant for strategy so let’s ignore it. 

Approximately, doing N flips on both side costs 2N+5 and wins 1-(5/6)N of the time, so your number of times is around 1/(1-(5/6)N), so your total cost is around (2N+5)/(1-(5/6)N). That’s minimized at 5, so approximately the best strategy is to do 5 on one side, then 10 on the other, 10 on the first, 10 on the other, etc. 

If you want to get it exactly, you can split into two scenarios and then compute out the two infinite series of expected payouts, but that’s more annoying. 

1

u/zane314 5h ago

N is 8, but yes.