Dealing with complicated sums - $\sum_{1\leq i < j \leq m}\sum_{1\leq k,l \leq n}\binom{n}{k}\binom{n-k}{l}(j-i-1)^{n-k-l}$ I'm preparing myself for discrete math exam, and I have no problem when dealing with simple sum, but when I see a monstrous one I totally don't know what to do. Here's an example:
$$\sum_{1\leq i < j \leq m}\sum_{1\leq k,l \leq n}[k+l\leq n]\binom{n}{k}\binom{n-k}{l}(j-i-1)^{n-k-l}$$ for $m,n > 0$.
I need to simplify this sum. Binomial coefficients suggest we can think of this cominatorically but I'm totally stuck. Are there any general techniques helpful when dealing with such sums?
 A: Here's another variation:

We start with rewriting the indices somewhat more conveniently and show
\begin{align*}
\sum_{j=2}^{m}\sum_{i=1}^{j-1}\sum_{k=1}^{n-1}\sum_{l=1}^{n-k}\binom{n}{k}\binom{n-k}{l}(j-i-1)^{n-k-l}=m^n-m\tag{1}
\end{align*}
Although the expression looks complicated due to the many sums, we can solve it straight forward. The essential ingredients are the binomial theorem and telescoping sums.

At first we keep the focus on the inner double sum of (1):
\begin{align*}
\sum_{k=1}^{n-1}&\sum_{l=1}^{n-k}\binom{n}{k}\binom{n-k}{l}(j-i-1)^{n-k-l}\\
&=\sum_{k=1}^{n-1}\binom{n}{k}\sum_{l=1}^{n-k}\binom{n-k}{l}(j-i-1)^{n-k-l}\tag{2}\\
&=\sum_{k=1}^{n-1}\binom{n}{k}\left[(j-i)^{n-k}-(j-i-1)^{n-k}\right]\tag{3}\\
&=\sum_{k=1}^{n-1}\binom{n}{k}\left[(j-i)^{k}-(j-i-1)^{k}\right]\tag{4}\\
&=\left[(j-i+1)^n-1-(j-i)^n\right]-\left[(j-i)^n-1-(j-i-1)^n\right]\tag{5}\\
&=(j-i+1)^n-2(j-i)^n+(j-i-1)^n\tag{6}
\end{align*}
Comment:


*

*In (2) we reorganise the binomial coefficients in order to calculate the inner sum

*In (3) we apply the binomial theorem and subtract $(j-i-1)^{n-k}$ as compensation for the index $l=0$

*In (4) we do an index transformation $k \mapsto n-k$ for convenience only

*In (5) we apply again the binomial theorem and subtract as compensation for $k=0$ and $k=n$

Next step is calculating the outer double sum. 

\begin{align*}
\sum_{j=2}^{m}&\sum_{i=1}^{j-1}\left[(j-i+1)^n-2(j-i)^n+(j-i-1)^n\right]\tag{7}\\
&=\sum_{j=2}^{m}\sum_{i=1}^{j-1}\left[(j-i+1)^n-(j-i)^n\right]\\
&\qquad-\sum_{j=2}^{m}\sum_{i=1}^{j-1}\left[(j-i)^n-(j-i-1)^n\right]\tag{8}\\
&=\sum_{j=2}^{m}\sum_{i=1}^{j-1}\left[(j-i+1)^n-(j-i)^n\right]\\
&\qquad-\sum_{j=1}^{m-1}\sum_{i=1}^{j}\left[(j-i+1)^n-(j-i)^n\right]\tag{9}\\
&=\sum_{i=1}^{m-1}\left[(m-i+1)^n-(m-1)^n\right]-\sum_{j=2}^{m-1}\left[1^n\right]-1\tag{10}\\
&=\sum_{i=1}^{m-1}\left[(i+1)^n-i^n\right]-m+1\tag{11}\\
&=m^n-1-m+1\\
&=m^n-m
\end{align*}
Comment:


*

*In (7) we use the result (6) and replace the inner double sums in OPs expression (1)

*In (8) we reorganise the double sum to be able to use telescoping sums again

*In (9) we do an index shift of $j$ on the second double sum and observe $2\leq j \leq m-1,1\leq i \leq j-1$ cancel out

*In (10) we collect the terms which do not cancel out

*In (11) we observe we can again use telescoping


Notes:
General techniques can be found in H.Wilf's wonderful Generatingfunctionology 
Of great benefit are Henry W. Goulds  Tables of Combinatorial Identities

Hints: This example about double sums with binomial coefficients could be interesting. The answer contains the application of some more sophisticated techniques which are often useful. A really tough challenge was showing that this identity with Bell polynomials is valid. 
A: Sums like this can get really convoluted, but this one is fairly approachable step-by-step. My general advice when tackling these would be to think with polynomials, rather than combinatorically. I am sure there is some funky "out of $n$ balls paint $k$ red and $l$ black" argument, but it's hard to come up with a rule which works every time, and most of the time it's only in hindsight that you realize what was being counted.
Let's take a look at this one step at a time. First thing about binomial coefficients is that they neatly enforce inequalities about the numbers involved above and below. So in this case, the fact that we multiply the summation term by ${n-k} \choose {l}$ guarantees that $l \leq n-k$, because for all other number choices that binomial coefficient is zero. So the added $[k+l \leq n]$ constraint does nothing, and can be omitted.
Second step is to try to reason using one parameter/axis at a time. Can we do something only using the terms involving $i, j, k$ or $l$? In this case, $l$ looks the most promising, because it is in only a single binomial coefficient and it is not being raised to any powers (you can develop intuition about this by doing many sums, but in any case you can try all 4 parameters and should quickly get stuck in the other 3).
We can break the inner double sum into the $l$ parts and the non-$l$ parts, which we can bring outside the $l$-sum:
$\sum\limits_{k=0}^n {n \choose k} \sum\limits_{l=0}^{n-k} {{n-k} \choose l} (j-i-1)^{n-k-l}$
Now this inner sum over $l$ is basically of the shape $\sum_l {{u \choose l} t^{u-l}}$ for the right choice of $u$ and $t$, and is by definition $(t+1)^u$. Again, general advice is to look for binomial coefficients which complement the exponent of the summation term.
So we managed to remove the $l$ completely, and now our inner sum becomes $\sum\limits_{k=0}^n {n \choose k} (j-i)^{n-k}$, which is again of the same binomial expansion shape, and so can be further simplified to $(j-i+1)^n$.
So now our entire sum is $\sum\limits_{1\leq i < j \leq m} (j-i+1)^n$, which is already pretty simple, but we can take it a little bit further:
Out of all those $(i,j)$ pairs, $(1,2), (2,3) ... (m-1, m)$ have a difference $1$. That's $m-1$ of them. $(1, 3), (2, 4) .. (m-2,m)$ have difference 2, and there's $m-2$ of them, etc, all the way to the single $(1,m)$ which has a difference $j-i=m-1$.
So our double sum is in fact a single sum over the difference, let's say $j-i=d$, and it is $\sum\limits_{d=1}^{m-1} (m-d) (d+1)^n$, which can be broken into two pieces $(m+1)\sum (d+1)^n - \sum (d+1)^{n+1}$. I suspect this is as simple as it is going to get, the formulae for sums of powers are kinda messy, but there might be some further trick I've overlooked.
Anyway, good luck with the exam; as I said before, try to do things one step at a time, monster sums often fall apart from the inside. :)
A: A combinatorial argument is actually rather straightforward.
Consider a function $f:[n]\to[m]$. Let $r_f=\min\operatorname{ran}f$, $s_f=\max\operatorname{ran}f$, $R_f=f^{-1}[\{r_f\}]$, and $S_f=f^{-1}[\{s_f\}]$. Let $R$ and $S$ be disjoint, non-empty subsets of $[n]$, $k=|R|$, and $\ell=|S|$, and let $i,j\in[m]$ be such that $i<j$. Then there are $(j-i-1)^{n-k-\ell}$ functions $f:[n]\to[m]$ such that $r_f=i$, $s_f=j$, $R_f=R$, and $S_f=S$. There are $\binom{n}k\binom{n-k}\ell$ ways to choose disjoint subsets $R$ and $S$ of $[n]$ so that $|R|=k$ and $|S|=\ell$, so there are
$$\binom{n}k\binom{n-k}\ell(j-i-1)^{n-k-\ell}$$
functions $f:[n]\to[m]$ such that $r_f=i$, $s_f=j$, $|R_f|=k$, and $|S_f|=\ell$. Call this set of functions $F(i,j,k,\ell)$. Then
$$\sum_{1\le i<j\le m}\sum_{1\le k,\ell\le n}\binom{n}k\binom{n-k}\ell(j-i-1)^{n-k-\ell}$$
is the cardinality of 
$$\bigcup_{1\le i<j\le m}\bigcup_{1\le k,\ell\le n}F(i,j,k,\ell)\;,$$
which is precisely the set of non-constant functions from $[n]$ to $[m]$. Thus,
$$\sum_{1\le i<j\le m}\sum_{1\le k,\ell\le n}\binom{n}k\binom{n-k}\ell(j-i-1)^{n-k-\ell}=m^n-m\;.$$
