I showed how one would compute the
expected number of cereal boxes to buy
if there were *N* objects to be collected:

And the number of matches in the matching problem
can be put as the sum of the indicator variables *X*_{i} where *X*_{i}=1
if the ith person gets his/her hat.
As
,
we have

Try this link for the matching problem applet