You play a game with a 4 sided die.
You roll it several times, and after each roll you try to predict whether the next roll will be higher or lower. If you predict wrong, you are out.
So, for example, if you roll a 2 and then say "Higher" and then roll another 2, you are out. (Unfortunately, there is no way to guard against getting the same number as the previous roll... You will always be out)
Assume that you play optimally, (to maximize the number of rolls) and let the expected number of times you will roll the die (including the final roll where you are out) be where and are coprime positive integers.
What is ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Consider the following states:
E n = Expected number of rolls from state n
This gives us a set of linear equations to solve:
Solving, E 0 = 5 2 7
2 7 + 5 = 3 2