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

Home > Probability
On Average (Posted on 2004-01-26) Difficulty: 4 of 5
What is the expected number of rolls of a fair, normal 6-sided die, one is required to make, so that each of the 6 numbers comes up at least once?

Hint: this is not necessarily an integer answer
_____________________

As an aside, it would be interesting to see the computer program simulation of this, but this would not be proof of the solution (merely evidence supporting the proof).

See The Solution Submitted by SilverKnight    
Rating: 3.7500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
solution plus simulation-- and another question or two | Comment 2 of 11 |
The solution below is the same as Federico Kereki's. A reference is given to a similar past puzzle, and I've included a simulation, and a new, more complex question:

This is based on Rick's Another analytic solution to problem B comment for the puzzle Trading Cards.

In order to get 6 rolls, each of which shows a number that had not yet come up, you first have to get one such roll, then a second such roll, etc. Before starting, you expect it will take 1 roll to get the first new number. Once that happens, you expect it to take 6/5 rolls to get some other previously unseen number. To get the third, you expect it to take another 6/4 rolls. The expected times to get each of these fresh numbers can be added, giving

Σ{i=0 to 5} 6/(6-i) = 14.7

The following program evaluates that summation and then simulates 100,000 trials:

DEFDBL A-Z
FOR i = 0 TO 5
  t = t + 6 / (6 - i)
NEXT
PRINT : PRINT
PRINT t

RANDOMIZE TIMER
totTook = 0: totTrials = 0
FOR trial = 1 TO 100000
  totTrials = totTrials + 1
  REDIM had(6)
  numHad = 0
  DO
    r = INT(RND(1) * 6 + 1)
    IF had(r) = 0 THEN
      had(r) = 1
      numHad = numHad + 1
    END IF
    totTook = totTook + 1
  LOOP UNTIL numHad = 6
NEXT trial
PRINT totTook / totTrials

Some sample output is:
14.7
14.7035

14.7
14.70336

14.7
14.70308

14.7
14.70461

14.7
14.71023

14.7
14.68018

This method of solution depends on each of the required outcomes having an equal probability of occurrence, so that the expected wait after having acquired, say, 3 different numbers is the same regardless of what those three numbers were. A more complicated solution is needed for questions where not every outcome is the same. Such would be the case if the problem called for rolling a pair of dice, and asking What would be the expected number of rolls needed to have gotten all eleven possible dice totals from 2 through 12?

Another question is What are the median and modal numbers for one die being tossed in this procedure--that is, the original question, with expected number replaced with mode or median?


  Posted by Charlie on 2004-01-26 14:02:07
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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