Monday 23 February 2015

combinatorics - Number of r-tuples with integer entries in a given interval



This is probably an easy question, but I couldn't figure it out.



Let $n$ and $r$ be positive integers with $n \geq r$. Then the number of elements of the set
\begin{align}
\{(a_1,a_2,...,a_r) : 0 \leq a_1 \leq a_2\leq ... \leq a_r \leq n,\,\, a_i \in \mathbb{Z}\}
\end{align}


is equal to the following $r$-fold sum,
\begin{align}
\sum\limits_{a_1=0}^{n} \sum\limits_{a_2=a_1}^{n} .... \sum\limits_{a_r=a_{r-1}}^{n} 1
\end{align}



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
\begin{align}
\{(a_1,a_2,...,a_r) : 0 \leq a_1 \leq a_2\leq ... \leq a_r \leq n,\,\, a_i \in \mathbb{Z}\} .
\end{align}


Let us say that you take random $r$ elements (you allow repetitions) from set: $$\left\{0,1,2,...,n \right\} $$
and you got
$$ a_1,a_2,...,a_r$$
In how many ways can you put them to the tuple such that $ 0 \leq a_1 \leq a_2\leq ... \leq a_r \leq n$?

It is exactly $1$ way. So you are looking for the just number of possible ways to take $r$ elements from $\left\{0,1,2,...,n \right\} $.



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

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...