Library · The Riddler · Chapter 56

Can You Stick It To The Genie?

Revised Report an error

You roll three dice in order: a d4d4 (faces 11–44), a d6d6 (faces 11–66), then a d8d8 (faces 11–88), each face equally likely. You win when the three rolls strictly increase, like 22-44-77. What is your probability of winning? Extra credit: rolling d4,d6,d8,d10,d12,d20d4, d6, d8, d10, d12, d20 in order, what is the chance the six rolls strictly increase?

Solution

Win when a<b<ca < b < c with aa on the d4d4, bb on the d6d6, cc on the d8d8. The rolls are independent and uniform, so the probability is the count of strictly increasing triples divided by 4⋅6⋅8=1924 \cdot 6 \cdot 8 = 192. Count them by fixing the first two and letting the last run free: for each a≤4a \le 4 and each bb with a<b≤6a < b \le 6, the top die can be any of the 8−b8-b values above bb. Summing, ∑a=14∑b=a+16(8−b)=48,Pr⁡(win)=48192=14.\sum_{a=1}^{4} \sum_{b=a+1}^{6} (8-b) = 48, \qquad \Pr(\text{win}) = \frac{48}{192} = \boxed{\tfrac14}. The clean answer is a small coincidence of these particular face counts, not a general law. With six dice the same idea (count increasing sextuples, divide by 4⋅6⋅8⋅10⋅12⋅204\cdot6\cdot8\cdot10\cdot12\cdot20) has no tidy closed form; the exact value is Pr⁡(six increase)=2717230400≈0.0118.\Pr(\text{six increase}) = \frac{2717}{230400} \approx \boxed{0.0118}.

The computation

Enumerate every outcome of the dice in order and count the fraction that strictly increase.

from fractions import Fraction as F
from itertools import product
def prob(faces):
    rolls = product(*[range(1, f + 1) for f in faces])
    wins = sum(all(x < y for x, y in zip(r, r[1:])) for r in rolls)
    total = 1
    for f in faces: total *= f
    return F(wins, total)
print(prob([4, 6, 8]))                       # 1/4
print(prob([4, 6, 8, 10, 12, 20]), float(prob([4, 6, 8, 10, 12, 20])))
# 2717/230400, 0.0118
Report an error on this page

Reports are stored by Netlify. See the privacy note.