Cubone would like to roll a four sided die with vertices labeled 1 to 4, as shown above until he rolls a string of digits that represent an integer cubed that is less than a million.
So, now for the question : If the expected number of rolls he needs to make to get a string of digits representing a perfect cube , as described above, is , where and are coprime positive integers . What is ?
Clarification : If, for example, it were an -sided die, and he rolled a followed by a he would be done, since is a perfect cube, namely . Or, if he rolls a any time he is done, since is also a perfect cube.
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.
If he rolls a 1 he is done. So, cubed numbers containing a 1 (other than 1 itself) won't effect the expected value. So, other than the number 1 , we only need to consider cubed numbers that contain only the digits 2 , 3 , and 4 , that are less than one million.
It turns out, only one number fits the bill, 3 4 3 = 7 3 .
So, with only two numbers to consider, 1 and 3 4 3 , we have the following states to consider:
And, let E n = Expected number of rolls to get a cube from state n .
So, we get the following set of linear equations:
The above were derived, by considering the probability of going to each state from where they are. For example, from state 3 ( E 3 ) you use up one move (the next one) for sure, plus you have a 1 / 4 probability of rolling a 1 , at which point you are done, so the expectation from there is zero, plus a 1 / 4 probability of rolling a 2 , in which case you effectively end up where you started, state 0 ( E 0 ), plus a 1 / 4 probability of rolling a 3 , putting you in state 3 ( E 3 ), plus a 1 / 4 probability of rolling a 4 , putting you in state 4 ( E 4 ).
Solving, E 0 = 9 3 4
3 4 + 9 = 4 3