A trading card series has 200 different cards in it, which are sold in 5-card packages.
Each package has a random sampling of the cards (assume that any card of the 200 has an equal chance of being in a package).
On the average, how many packages will need to be bought to collect the complete series if...
A: all the cards in a package will always be different
B: a package can have repeats
(In reply to
Simulation results by Tony)
The simulation results tony reports for B seem vastly different from those for A, and suspiciously like what one would expect for the number of cards rather than the number of packets. I ran my own simulation for B (a lot easier than for A, as individual cards can be used until grouped into 5's at the end):
RANDOMIZE TIMER
DO
REDIM c(200)
ct = 0: ctr = 0
DO
r = INT(RND(1) * 200 + 1)
IF c(r) = 0 THEN
c(r) = 1
ct = ct + 1 ' ct must get to 200 each trial
END IF
ctr = ctr + 1 ' ctr is number of purchases to complete set
IF ct = 200 THEN EXIT DO
LOOP
tot = tot - INT(-ctr / 5) ' -int(-x) is ceil(x)
totI = totI + ctr ' individual card count
numTry = numTry + 1
PRINT numTry, -INT(-ctr / 5), tot / numTry, totI / numTry
LOOP
at trial 8332 the line of output shows
8332 237 234.8208 1172.123
The 237 is just the #of packets for that trial, but the average number of packets is 235; the average # of individual cards is 1172.
Again this is for B, which is easier than A.
|
Posted by Charlie
on 2003-01-29 10:15:58 |