-1

Suppose you have a CD of $n$ tracks. Your CD player's shuffle function is broken; it selects a random song, possibly even the one(s) already played, before all tracks are played. How many tracks (possibly duplicates), on average, does one need to listen to to hear every song at least once?

The solution to this problem is $n H(n)$ where $H(n)$ is the n$^\mathrm{th}$ harmonic number.

How is this derived?

Geremia
  • 2,511

1 Answers1

0

This is the coupon collector's problem.

Geremia
  • 2,511