This is probably an easy question, but I couldn't figure it out.
Let n and r be positive integers with n≥r. Then the number of elements of the set
{(a1,a2,...,ar):0≤a1≤a2≤...≤ar≤n,ai∈Z}
is equal to the following r-fold sum,
n∑a1=0n∑a2=a1....n∑ar=ar−11
My question: Is there any simple expression for the above sum in terms of some binomial terms?
Answer
We are looking for number of tuples
{(a1,a2,...,ar):0≤a1≤a2≤...≤ar≤n,ai∈Z}.
Let us say that you take random r elements (you allow repetitions) from set: {0,1,2,...,n}
and you got
a1,a2,...,ar
In how many ways can you put them to the tuple such that 0≤a1≤a2≤...≤ar≤n?
It is exactly 1 way. So you are looking for the just number of possible ways to take r elements from {0,1,2,...,n}.
From stars and bars you can do that in exactly
\binom{(n+1) + r - 1}{r}
I put n+1 instead of n because you have n+1 elements in \left\{0,1,2,...,n \right\}
Example
n=2, r=3
2,2,2\\ 1,2,2\\ 1,1,2\\ 1,1,1\\ 0,1,1\\ 0,0,1\\ 0,0,0\\ 0,1,2\\ 0,0,2\\ 0,2,2
and it is equal to \binom{(2+1)+3-1}{3} = 10
No comments:
Post a Comment