Skip to main content

Proving a polynomial identity by counting

Here's a curious polynomial identity I stumbled upon: for $r, n \in \mathbb{N}$ and $r > n$, \[ f(n, r) = r^n - \binom{r}{1}(r - 1)^n + \binom{r}{2}(r - 2)^n + \dots + (-1)^{r - 1}r = 0. \] This can be proved by brute force expansion, but there is a really nice combinatorial argument in connection with the following problem.

How many surjective functions of the form $f\colon \{1, 2, \dots, n\} \to \{1, 2, \dots, r\}$ are there?

Consider such a function $f$; for each $i \in \{1, 2, \dots, n\}$, we have $r$ choices for $f(i)$, giving us at most $r^n$ functions. However, $f$ must be surjective, so we must get rid of those functions which fail to hit some $j \in \{1, 2, \dots, r\}$ in the codomain. There are $(r - 1)^n$ functions whose codomain misses a particular $j$, and $\binom{r}{1}$ ways to choose this missing element, hence we take away their product. This isn't the end, since now we've removed those functions which miss at least two points, say $j, k \in \{1, 2, \dots, r\}$ in the domain, more than once! Thus, we must add back $\binom{r}{2}(r - 2)^n$ of those. Again, we've over-counted functions which miss at least three points, hence we take them away, and so on.

This argument uses what's known as the Inclusion-Exclusion Principle. When we're done, we see that the answer turns out to be \[ \begin{aligned} f(n, r) &= r^n - \binom{r}{1}(r - 1)^n + \binom{r}{2}(r - 2)^n + \dots + (-1)^{r - 1}r \\ &= \sum_{k = 0}^r (-1)^{r - k} \binom{r}{k}k^n. \end{aligned} \] However, when $r > n$, there is no way to make a function $f\colon \{1, 2, \dots, n\} \to \{1, 2, \dots, r\}$ surjective: there are simply too many targets in the codomain! This means that $f(n, r) = 0$.

There is another way of thinking about counting surjective functions: for each $j \in \{1, 2, \dots, r\}$, we have to choose it's pre-image $f^{-1}(j) \subset \{1, 2, \dots, n\}$. These pre-images must be non-empty (otherwise, $f$ would not be surjective), mutually exclusive, and exhaustive. Thus, we are really looking for the number of ways of partitioning $n$ objects (in the domain) into $r$ labelled boxes (in the co-domain). This is precisely what Stirling numbers of the second kind are for. Although they are defined using $n$ objects and $r$ unlabeled boxes, we simply insert a factor of $r!$, i.e. the number of ways of labeling those $r$ boxes. This gives us a proof of the relation \[ \begin{Bmatrix}n \\ r\end{Bmatrix} = \frac{1}{r!}f(n, r) = \frac{1}{r!}\sum_{k = 0}^r (-1)^{r - k} \binom{r}{k}k^n. \]

Proof by expansion

For the sake of completeness, here's a proof of the identity using binomial expansions! Our expression can be rewritten as \[ f(n, r) = \sum_{k = 0}^r (-1)^{r - k} \binom{r}{k}k^n = \sum_{k = 0}^r (-1)^{k} \binom{r}{k}(r - k)^n. \] Expanding, this gives \[ \sum_{k = 0}^r (-1)^{k} \binom{r}{k}\sum_{j = 0}^n\binom{n}{j}r^j k^{n - j}. \] Now, we can collect the coefficients of the powers of $r$. For instance, the coefficient of $r^n$ is \[ \sum_{k = 0}^r (-1)^k \binom{r}{k} = (1 - 1)^r = 0. \] More generally, the coefficient of $r^m$, $0 \leq m < n$ is given by \[ \sum_{k = 0}^r (-1)^k\binom{r}{k}\binom{n}{m} k^{n - m}. \] Note that when we perform this sum, $\binom{n}{m}$ can be pulled out, and the exponent $n - m$ of $k$ is a constant. Thus, what we are really interested in are the sums \[ S_a = \sum_{k = 0}^r (-1)^k \binom{r}{k}k^a, \qquad a = n - m, \; 1 \leq a \leq n. \] We evaluate these using the usual trick of differentiation; expand \[ (1 - x)^r = \sum_{k = 0}^r \binom{r}{k}x^k, \] and differentiate with respect to $x$. This gives \[ -r(1 - x)^{r - 1} = \sum_{k = 0}^r \binom{r}{k}kx^{k - 1}. \] Putting $x = 1$ gives us $S_1 = 0$. Now, multiply by $x$ and differentiate again, giving \[ -r(1 - x)^{r - 1} + r(r - 1)x(1 - x)^{r - 2} = \sum_{k = 0}^r \binom{r}{k}k^2x^{k - 1}. \] Putting $x = 1$ gives us $S_2 = 0$. We simply repeat this process, multiplying by $x$ and differentiating to get all $S_a = 0$, $1 \leq a \leq n$. Note that we can do this because $r > n$; at every stage, the lowest coefficient of $(1 - x)$ on the left is $r - a \geq r - n \geq 1$. Thus, the left hand side always vanishes at $x = 1$.

This shows that all the coefficients of $r$ are identically zero when $r > n$, proving that $f(n, r) = 0$.

Comments

Popular posts from this blog

Why am I frequently meeting my crush?

Gourav Banerjee, a 21MS student, goes to the main canteen of IISER Kolkata for dinner at some arbitrarily scheduled time between 8 and 9 pm. He frequently meets an anonymous, beautiful girl in the mess and begins to wonder whether the girl is stalking him or if their meeting is just a coincidence. So he tries to compute the probability of meeting that girl in the mess during dinner time given the following constraints: Both Gourav and the girl go to mess for having dinner at some random time between 8 - 9 pm. Because of the Queue at the mess, both stay in the mess for minimum of 30 min. What do you think? Solution Let $x$ denote the time when Gourav enters the mess and let y denote the time when girl enters the mess. Here we take origin to be the 8 pm mark and a distance of 1 unit represents 1 hour on both $x$ and $y$ axis so all possible coordinates within the unit square $ABCD$ represents an event where Gourav and the girl both visit the canteen. Now the favourable coordinates which

The height of probabilistic interpretation

Girls only love men as tall as 6' and above. Socrates, ca. 2023 It is undeniable that heights strongly influence our daily lives. Be it our heights, or the height of a mountain we scale, or the height of all problems - humans. Mathematics too hasn't been able to escape its clutches, with height functions being useful in several fields, including but not limited to - Diophantine Geometry, Automorphic forms and the Weil-Mordell theorem - something you should have heard before if you attend my talks. If you have attended school (or maybe you are a climate activist) - then try recalling the elementary school days when fractions were introduced. Albeit unknowingly, but we had as children classified fractions into proper and improper - based on whether the denominator was larger than the numerator or vice versa. Well, it seems mathematicians have stuck with this classification - giving us the crux of todays discussion - height of a rational number. Given a rational number $x=\frac mn

Monotonic functions and the first derivative

A couple of days ago, Rohan Didmishe shared this problem with us: show that the function defined by \[ f\colon \mathbb{R} \to \mathbb{R}, \qquad f(x) = \begin{cases} x + x^2\sin(1 / x), &\text{ if }x \neq 0, \\ 0, &\text{ if } x = 0. \end{cases} \] is not monotonic (increasing or decreasing) in any interval $(-\delta, \delta)$ around zero. Graphing this function (say, using Desmos ) shows that it oscllates rapidly, curving up and down with increasing frequency the closer its gets to zero. This is due to the $x^2\sin(1 / x)$ term; the $x$ added in front 'tilts' the curve upwards. The first thing to look at is the derivative of $f$. Using $\lim_{x \to 0} x\sin(1 / x) = 0$ and the chain rule, we can compute \[ f'(x) = \begin{cases} 1 + 2x\sin(1 / x) - \cos(1 / x), &\text{ if }x \neq 0, \\ 1, &\text{ if } x = 0. \end{cases} \] Specifcally, $f'(0) = 1$ which seems to tell us that $f$ is increasing at $0$ ... or doe