There is a formula for this.
I can explain it but it would take a while. If you want to find an explanation on the net, it's the same formula as you would use to distribute y indistinguishable objects into x boxes.
The formula is: C(x + y - 1, y), or (x + y - 1)!/(y!(x + y - 1 - y)!
In your example:
C(2 + 10 - 1, 10) = C(11, 10) = C(11, 1) = 11
As another example, let x be 3 and y by 5.
The combinations would be:
(0, 0, 5), (0, 1, 4), (0, 2, 3), (0, 3, 2), (0, 4, 1), (0, 5, 0),
(1, 0, 4), (1, 1, 3), (1, 2, 2), (1, 3, 1), (1, 4, 0),
(2, 0, 3), (2, 1, 2), (2, 2, 1), (2, 3, 0),
(3, 0, 2), (3, 1, 1), (3, 2, 0),
(4, 0, 1), (4, 1, 0),
(5, 0, 0)
That's 21 different ways.
From the formula: C(3 + 5 - 1, 5) = C(7, 5) = C(7,2) = 7x6/2 = 21
Here's an explanation of the formula....not the best ...looking for a better one:
http://www.math.northwestern.edu/~mlerma/courses/cs310-04w/notes/dm-morecomb.pdf
Here's a better one:
http://www.csee.umbc.edu/~stephens/203/PDF/6-5.pdf
2006-12-28 05:47:40
·
answer #1
·
answered by Jim Burnell 6
·
4⤊
0⤋