2

Possible Duplicate:
A Question About Dice

You have a weighted n-sided die. Every side of the die is weighted differently where side n1 has a weight of w1, n2 has a weight of w2, ...

Estimate the average number of rolls needed to see every face at least once.

  • Voting to close as duplicate: although that question is a special case of this one, the answers address the general case. – Chris Eagle Oct 30 '12 at 18:49

1 Answers1

1

This is a variant of the coupon collector's problem

Formula (14a) is what you need.

Updated after comments.

wnvl
  • 3,040
  • 2
  • 23
  • 32
  • It's correct that this is the coupon collector's problem, but that expected number can't be right - consider the case where all of the weights are 1 (or so nearly so as to be negligibly different, while still meeting the 'weighted differently' constraint). The formula would suggest that it takes only $n$ rolls to 'collect' all $n$ sides. – Steven Stadnicki Oct 29 '12 at 18:23
  • Is it still the coupon's collectors problem if the sides are weighted differently? Meaning each side has a different probability of showing up. – Etienne Lawlor Oct 29 '12 at 18:24
  • @toobsco42 It's still a variant thereof, and I would start with 'weighted coupon collector's problem' as a search term - though a bit of research suggests that the problem may not have any closed-form solution. – Steven Stadnicki Oct 29 '12 at 18:25
  • But it can't be correct, because the original problem has $w_k=\frac{1}{n}$ and your answer would give us $n^2$ in that case, when it should be $nH_n = O(n\log n)$ – Thomas Andrews Oct 29 '12 at 18:28
  • Thanks. I was thinking it was a variant. I just thought it had a closed-form solution because I was asked to create a method in Java to help me solve this problem. – Etienne Lawlor Oct 29 '12 at 18:30
  • @toobsco42 Given that the question says 'estimate', I suspect what your teacher is after is a simulation where you actually do the collecting and tally how many rolls it takes, over several thousand (or million) runs of the simulation... – Steven Stadnicki Oct 29 '12 at 18:31
  • I think this may be along the lines of what i was looking for: http://programworlds.blogspot.com/2012/07/coupon-collector-simulation.html But I am trying to determine the Big O complexity with the random number generator. – Etienne Lawlor Oct 29 '12 at 18:39