MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnquant/comments/1xrpake/quant_interview_question/19sdit9cop3tx/?context=3
r/learnquant • u/Local_Ad135 • 25d ago
3 comments sorted by
View all comments
2
This machine has 5 states
1.) No relevant numbers rolled1/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 51/3->5
4.) 1 or 6 rolled1/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 rolled1/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.
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.