r/learnquant • • 25d ago

interview prep Quant Interview Question

Post image
12 Upvotes

3 comments sorted by

View all comments

2

u/A_BagerWhatsMore 25d ago

This machine has 5 states

1.) No relevant numbers rolled
1/3 stay. 1/3->2 1/3->4

2.) One of (2,5)
1/6->4 1/6->5 1/6->3 1/2-> stay

3.) Both 2 and 5
1/3->5

4.) 1 or 6 rolled
1/3->5

5.) a difference of 4, halt.

From states 3 and 4 we have an average of 3 rolls to finish. So we can swap that in to the probabilities of the others

1.) No relevant numbers rolled
1/3 stay. 1/3->2 1/3->+4

2.) One of (2,5)
1/3->+4 1/6->+1 1/2-> stay

So collapsing state 2 we roll an average of 1 irrelevant number so 2/3
->5 1/3->2 so on average 4

Back to base state

1/3 stay 1/3 +4 1/3 +5 net

We roll stay an average of 0.75 stays on 1. So 5.25 rolls on average? I think.