0

I need to prove

$\sum\limits_{i=0}^n\binom{n}{i}i^{n-2}(-1)^{n-i+1}=0$

The above can be written as

$\left(\sum\limits_{i=0}^{n-1}\binom{n}{i}i^{n-2}(-1)^{n-i+1}\right)-n^{n-2}=0$

So I need to prove that

$\sum\limits_{i=0}^{n-1}\binom{n}{i}i^{n-2}(-1)^{n-i+1}=n^{n-2}$

Which is Cayley's formula

DontWorry
  • 111
  • 8

2 Answers2

1

Much more straightforward combinatorial proof:

$n^{n-2}$ counts the number of functions $[n-2]\to [n]$

On the other hand, if we try to count the number of functions $[n-2]\to [n]$ via inclusion-exclusion that at least one number from $[n]$ does not appear in the image... that is letting $A_k$ count the functions $f$ such that $k\notin\operatorname{Image}(f)$, we try to count $|A_1\cup A_2\cup\dots\cup A_n|$ and break apart via inclusion-exclusion.

For $1\leq n-i$ elements guaranteed not in the image, we pick which those are in $\binom{n}{n-i}=\binom{n}{i}$ ways. For each element of the domain, we pick which of the $n-(n-i)=i$ elements in the available range of not already disqualified elements of the codomain they map to which can be done in $i^{n-2}$ ways. The $(-1)^{n-i+1}$ term appears as a result of inclusion-exclusion. Altogether then we find there are $\sum\limits_{i=0}^{n-1}\binom{n}{i}i^{n-2}(-1)^{n-i+1}$ such functions.

We of course know that since $n-2<n$ there is always going to be at least one element of $[n]$ not in the image of every function $f$ from $[n-2]\to [n]$ so these must be equal.


Proof via calculus:

$(x+1)^n=\sum\limits_{i=0}^n\binom{n}{i}x^i$

Differentiate both sides with respect to $x$ to get

$n(x+1)^{n-1} = \sum\limits_{i=0}^n\binom{n}{i}ix^{i-1}$

Multiply both sides by $x$ to get

$nx(x+1)^{n-1}=\sum\limits_{i=0}^n\binom{n}{i}ix^i$

Differentiate both sides with respect to $x$ again to get

$n(nx+1)(x+1)^{n-2} = \sum\limits_{i=0}^n\binom{n}{i}i^2x^{i-1}$

Repeat this process so that the total number of derivatives performed was $n-2$ and we end with $\sum\limits_{i=0}^n\binom{n}{i}i^{n-2}x^{i-1}$ on the right. On the left, we end with some ugly expression, but that expression will necessarily have a factor of $(x+1)$ in it. This can be seen by the product rule of differentiation, that $(fg)'=f'g+fg'$, at each step of the process letting $g(x)$ refer to the $(x+1)^{n-k}$ factor noting that the derivative of $(x+1)^{n-k}$ is $(n-k)(x+1)^{n-k-1}$.

The exact expression after $k>0$ steps can be shown to be $n\frac{k-1}{~}(nx+k-1)(x+1)^{n-k}=\sum\limits_{i=0}^n\binom{n}{i}i^kx^i$ where $a\frac{b}{~}$ is notation for falling factorial

Now, plugging in $-1$ for $x$, the expression on the right is equal to your original expression. The expression on the left, having a factor of $(1+x)$ thus has a factor of $(1+(-1))$ and is thus equal to zero.

Indeed, as noted in the comments, by performing only $k$ steps in this process, this shows that $\sum\limits_{i=0}^n \binom{n}{i}i^k(-1)^i=0$ for any $0\leq k\leq n-2$.

JMoravitz
  • 79,518
  • Interesting solution. I haven't considered to solve it via calculus because the guidance to the solution I have been given is going through the binomial theorem and combinatorics. Thanks for this different point of view. – DontWorry Apr 30 '21 at 15:09
  • @DontWorry I found a much cleaner combinatorial explanation which I added at the top. – JMoravitz Apr 30 '21 at 15:18
0

We get for the intial sum

$$\sum_{q=0}^n {n\choose q} q^{n-2} (-1)^{n-q+1} = (n-2)! [z^{n-2}] \sum_{q=0}^n {n\choose q} \exp(qz) (-1)^{n-q+1} \\ = - (n-2)! [z^{n-2}] (\exp(z)-1)^n.$$

Now since $\exp(z)-1 = z + \cdots$ we have $(\exp(z)-1)^n = z^n + \cdots$ and $[z^{n-2}] (z^n + \cdots) = 0$ as claimed.

Marko Riedel
  • 61,317