All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Throwing Varied Dice (Posted on 2025-02-11) Difficulty: 3 of 5
Throwing Five 6s asked if five ordinary dice were thrown until each individual die had thrown its maximum value (6) at least once, what was the expected number of throws to complete the set. Once a given die had reached its goal, it was set aside so as to keep track of the remaining dice.

Suppose we do that with tosses of coins or of dice of all the shapes of Platonic solids (4- 6- 8- 12- and 20-sided dice), considering heads to be the highest side of a coin.

Find, for 1 through 20 dice of each of these numbers of sides (2, 4, 6, 8, 12, 20) the expected number of tosses to get each die (or coin) to have shown the highest of its values, to 10 significant digits (no need to show the rational number as in the previous puzzle).

See The Solution Submitted by Charlie    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution Comment 1 of 1
I only ran 10^5 iterations for each simulation, so the precision is not as high as it could be.

For number of sides s, and number of dice n:
s n  #throws
2 1 2.00238
2 2 2.66957
2 3 3.13519
2 4 3.49939
2 5 3.78561
2 6 4.03298
2 7 4.24306
2 8 4.43159
2 9 4.57254
2 10 4.71692
2 11 4.85191
2 12 4.97346
2 13 5.09
2 14 5.19393
2 15 5.28546
2 16 5.37933
2 17 5.46537
2 18 5.55334
2 19 5.61211
2 20 5.70097
4 1 4.01015
4 2 5.73014
4 3 6.84956
4 4 7.7398
4 5 8.43252
4 6 9.01814
4 7 9.51924
4 8 9.97432
4 9 10.33666
4 10 10.69266
4 11 10.99672
4 12 11.27795
4 13 11.55167
4 14 11.8116
4 15 12.0332
4 16 12.26055
4 17 12.45298
4 18 12.65364
4 19 12.83336
4 20 13.00181
6 1 6.00287
6 2 8.72628
6 3 10.54353
6 4 11.92627
6 5 13.01144
6 6 13.92119
6 7 14.72697
6 8 15.39315
6 9 16.00488
6 10 16.56556
6 11 17.08268
6 12 17.53562
6 13 17.91346
6 14 18.33906
6 15 18.70725
6 16 18.99987
6 17 19.38897
6 18 19.623
6 19 19.93567
6 20 20.25253
8 1 8.00834
8 2 11.71681
8 3 14.23633
8 4 16.08975
8 5 17.61378
8 6 18.80348
8 7 19.91164
8 8 20.82568
8 9 21.73548
8 10 22.40399
8 11 23.11976
8 12 23.78127
8 13 24.25962
8 14 24.91836
8 15 25.32018
8 16 25.78148
8 17 26.29476
8 18 26.65035
8 19 27.02223
8 20 27.4174
12 1 11.95636
12 2 17.71148
12 3 21.54322
12 4 24.33319
12 5 26.6439
12 6 28.55479
12 7 30.18747
12 8 31.57658
12 9 32.80674
12 10 34.02933
12 11 35.00832
12 12 36.00253
12 13 36.81623
12 14 37.60503
12 15 38.41206
12 16 38.96517
12 17 39.68135
12 18 40.26183
12 19 40.90997
12 20 41.48394
20 1 19.20264
20 2 28.34621
20 3 33.97453
20 4 38.30544
20 5 41.4208
20 6 43.86583
20 7 46.00162
20 8 47.65129
20 9 49.15481
20 10 50.4141
20 11 51.28215
20 12 52.34707
20 13 53.22845
20 14 53.89536
20 15 54.47694
20 16 55.10679
20 17 55.48783
20 18 55.95898
20 19 56.38212
20 20 56.71704

----------------
import random
score = []
reps = 100000
sides = 6
for sides in [2, 4, 6, 8, 12, 20]:
# for sides in [ 6 ]:
    for numberOfDice in range(1,21):
        score = []
        for iter in range(reps):
            dice = numberOfDice
            for n in range(1,100):
                toss = [random.randint(1,sides) for i in range(dice)]
                countNum = toss.count(sides) 
                dice -= countNum
                if dice < 1:
                    score.append(n)
                    break
        
        print(sides, numberOfDice, sum(score)/reps)


  Posted by Larry on 2025-02-11 19:57:59
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information