Roll a cube with a tetradron?

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 a b \dfrac{a}{b} , where a a and b b are coprime positive integers . What is a + b a+b ?

Clarification : If, for example, it were an 8 8 -sided die, and he rolled a 2 2 followed by a 7 7 he would be done, since 27 27 is a perfect cube, namely 3 3 3^3 . Or, if he rolls a 1 1 any time he is done, since 1 1 is also a perfect cube.


Image credit: www.midlamminiatures.co.uk


The answer is 43.

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.

1 solution

Geoff Pilling
Aug 7, 2016

If he rolls a 1 1 he is done. So, cubed numbers containing a 1 1 (other than 1 1 itself) won't effect the expected value. So, other than the number 1 1 , we only need to consider cubed numbers that contain only the digits 2 2 , 3 3 , and 4 4 , that are less than one million.

It turns out, only one number fits the bill, 343 = 7 3 343 = 7^3 .

So, with only two numbers to consider, 1 1 and 343 343 , we have the following states to consider:

  • 0 0 \rightarrow Starting state
  • 3 3 \rightarrow Last number rolled was a 3 3
  • 4 4 \rightarrow Last two numbers were a 3 3 followed by a 4 4

And, let E n = E_n = Expected number of rolls to get a cube from state n n .

So, we get the following set of linear equations:

  • E 0 = 1 + ( 1 / 4 ) E 3 + ( 1 / 2 ) E 0 E_0 = 1 + (1/4)*E_3 + (1/2)*E_0
  • E 1 = 0 E_1 = 0
  • E 2 = E 0 E_2 = E_0
  • E 3 = 1 + ( 1 / 4 ) E 0 + ( 1 / 4 ) E 3 + ( 1 / 4 ) E 4 E_3 = 1 + (1/4)*E_0 +(1/4)*E_3 + (1/4)*E_4
  • E 4 = 1 + ( 1 / 2 ) E 0 E_4 = 1 + (1/2)*E_0

The above were derived, by considering the probability of going to each state from where they are. For example, from state 3 3 ( E 3 E_3 ) you use up one move (the next one) for sure, plus you have a 1 / 4 1/4 probability of rolling a 1 1 , at which point you are done, so the expectation from there is zero, plus a 1 / 4 1/4 probability of rolling a 2 2 , in which case you effectively end up where you started, state 0 0 ( E 0 E_0 ), plus a 1 / 4 1/4 probability of rolling a 3 3 , putting you in state 3 3 ( E 3 E_3 ), plus a 1 / 4 1/4 probability of rolling a 4 4 , putting you in state 4 4 ( E 4 E_4 ).

Solving, E 0 = 34 9 E_0 = \frac{34}{9}

34 + 9 = 43 34+9 = \boxed{43}

@Geoff Pilling In the first equation, E0 = ... The RHS is missing E4.

Siva Bathula - 4 years, 10 months ago

Log in to reply

Ah... That's because you can't get to state 4 from state 0. (Since state 4 assumes you have already rolled a 3, so you can only get there from state 3)

Geoff Pilling - 4 years, 10 months ago

I was thinking the subscript refers to the number on the die, but rather it is a state. I misunderstood your solution.

Siva Bathula - 4 years, 10 months ago

And what does this result tell us? I guess for practical usage - nothing!

Andreas Wendler - 4 years, 10 months ago

Log in to reply

Yeah, pretty much nothing... Just a fun problem! :)

Geoff Pilling - 4 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...