If n⩾1, prove the relation
(0n)−(1n)+(2n)−⋯+(−1)n(nn)=0.
(Define a one-to-one correspondence between the set of subsets of [1,n] which have an even number of elements, and the set of subsets of [1,n] which have an odd number of elements. Distinguish between the cases n even and n odd.)
Solution
This solution was written by nemotron-3-ultra-free and judged by a machine. It is not Bourbaki's and it has not been checked by a person.
Let n⩾1 be an integer. Set E=[1,n]. For any subset X⊂E, let ∣X∣ denote its cardinal. Define
Eeven={X⊂E∣∣X∣ is even},Eodd={X⊂E∣∣X∣ is odd}. By Corollary 1 to Proposition 11, the binomial coefficient (kn) is the number of subsets of E with exactly k elements. Hence k=0∑n(−1)k(kn)=k=0k even∑n(kn)−k=0k odd∑n(kn)=∣Eeven∣−∣Eodd∣. We shall construct a bijection between Eeven and Eodd, which will imply ∣Eeven∣=∣Eodd∣ and therefore the desired equality.
We distinguish two cases.
Case 1: n is odd. Consider the complement map f:P(E)→P(E) defined by f(X)=E∖X. This map is an involution, hence a bijection. For any X⊂E, we have ∣f(X)∣=n−∣X∣ (by the standard property of cardinals of finite sets). Since n is odd, ∣X∣ is even if and only if n−∣X∣ is odd. Therefore f maps Eeven onto Eodd and Eodd onto Eeven. The restriction of f to Eeven is a bijection from Eeven to Eodd.
Case 2: n is even. Since n⩾1, the set E is non‑empty; choose an element a∈E, for instance a=1. Define g:P(E)→P(E) by g(X)=X△{a}, the symmetric difference of X with the singleton {a}. Equivalently,
g(X)={X∪{a}X∖{a}if a∈/X,if a∈X. The map g is an involution, hence a bijection. For any X⊂E, the cardinalities of X and g(X) differ by exactly 1, so their parities are opposite. Thus g exchanges Eeven and Eodd, and its restriction to Eeven is a bijection onto Eodd.
In both cases we have established a bijection between Eeven and Eodd. Consequently ∣Eeven∣=∣Eodd∣, and
(0n)−(1n)+(2n)−⋯+(−1)n(nn)=0.
Nothing.