• Emily Zhang
  • Fiddler

How Many Dice Can You Roll the Same?

2024 Oct 42024 October 4 Problem Back

This Week's Fiddler

When considering the three dice (d6) as distinct, there are 63=2166^3=21663=216 possible rolls.

The number of ways all three dice match is 666 (there are 6 different values it could be).

The number of ways exactly two of the dice match is 666 (to choose the matching value) times 555 (to choose the non-matching value) times 333 (to choose which die is the non-matching value), making 909090.

The number of ways that none of the dice match is 6⋅5⋅4=1206\cdot5\cdot4=1206⋅5⋅4=120.

The weighted average is thus 1⋅120+2⋅90+3⋅6216=318216=5336\frac{1\cdot120+2\cdot90+3\cdot6}{216}=\frac{318}{216}=\frac{53}{36}2161⋅120+2⋅90+3⋅6​=216318​=3653​, or about 1.47221.47221.4722.

Answer: 53/36


Extra Credit

Brute force for N=10N=10N=10 (took about two minutes on my machine to run).

import itertools
from collections import Counter
from fractions import Fraction

total = 0
for rolls in itertools.product(range(1, 7), repeat=10):
    total += Counter(rolls).most_common(1)[0][1]
ans = Fraction(total, 6**10)
print(ans)
print(float(ans))

Output:

17357555/5038848
3.444746696070213

So the answer is 173575555038848\frac{17357555}{5038848}503884817357555​, or about 3.44473.44473.4447.

Answer: 3.4447

Back to Fiddler list
© 2024 Emily Bradon Zhang·Support Gaza Recovery