Alternating sum of numbers of surjective functions

108 Views Asked by At

Let $S(n,k)$ denote the number of surjective functions from $\lbrace1,2,...,n\rbrace$ onto $\lbrace1,2,...,k\rbrace$. I am sure that

$$S(n,n) - S(n,n-1) + S(n,n-2) - ... +(-1)^{n-1}S(n,1) = 1$$

Have you seen this identity anywhere? Any nice proof?

1

There are 1 best solutions below

0
On

Yes, this is a very well known identity evaluated at $x=-1$. $$x^n=\sum _{k=0}^nS(n,k)\binom{x}{k}.$$ You can show it easily for $x$ positive integer by choosing the size of the image of a function $f$ from $[n]$ to $[x]$. Notice that a functions is surjective in its image. Furthermore, if two polynomials agree in infinite number of points, then they are the same polynomial.