Monday, September 10, 2007

Problem 6

"We have k distinct poscards and want to send them all to our n friends (a friend can get any number of postcards, including 0). How many ways can this be done? What happens if we want to send at least 1 card to each friend?"

8 comments:

Loc Bui said...

"We have k distinct postcards and want to send them all to our n friends (a friend can get any number of postcards, including 0). How many ways can this be done?"
-> C(n+k-1,k) (n+k-1 chooses k)

"What happens if we want to send at least 1 card to each friend?"
-> C(k-1,n-1) (k-1 chooses n-1)

Thanh-Nhan Nguyen said...

Hi Loc, I think your solution is true if k postcards are the same. But, in this case, they are distinct.

Loc Bui said...

Oh yeah, that's right. Then the first answer should be n^k, and the second answer is n^(k-n)*n! for n <= k and 0 for n > k.

Thanh-Nhan Nguyen said...

Hi Loc, the first answer is true. I think, for the second one, we may use the second-order Stirling numbers.

Loc Bui said...

"I think, for the second one, we may use the second-order Stirling numbers."
-> Yes, we can. But now I'm confused: does it mean that my above answer is not correct? If yes, then why?

Obviously, the answer should be zero for n>k. Is it reflected in the second-kind Stirling numbers?

It might be too complicated (or too trivial) to be discussed here. We can talk off-line about it.

Loc Bui said...

Well, after thinking a while, I found that my answer is incorrect :D. But I still wonder whether the Stirling numbers give the answer zero if n>k.

Thanh-Nhan Nguyen said...

I just found the table summarizing the number of ways putting k balls into n boxes in twelve scenarios. More explanation about this table can be found in the book "Enumerative Combinatorics,Volume 1" by Richard P. Stanley.

Thanh-Nhan Nguyen said...

Yes,S(k,n) = 0 when n > k. It is the number of ways of partitioning a set of k elements into m nonempty sets. From MathWorld , you can see it is not simple to compute S(k,n) at all.