Let n∈N and A1,…,An be subsets of a finite set X. Let 0⩽t⩽n. Show that if x∈X belongs to Ai for exactly m values of i, then
S⊂{1,…,n}∑(∣S∣t)(−1)∣S∣−t1AS(x)={01 if m=t if m=t
where AS=⋂i∈SAi with the convention that A∅=X, and 1AS denotes the indicator function of AS⋅[ Hint: Set M={i:x∈Ai} and consider for which S⊂{1,…,n} one has 1AS(x)=1.]
Use this to show that the number of elements of X that belong to Ai for exactly t values of i is
S⊂{1,…,n}∑(∣S∣t)(−1)∣S∣−t∣AS∣.
Deduce the Inclusion-Exclusion Principle.
Using the Inclusion-Exclusion Principle, prove a formula for the Euler totient function φ(N) in terms of the distinct prime factors of N.
A Carmichael number is a composite number n such that xn−1≡1(modn) for every integer x coprime to n. Show that if n=q1q2…qk is the product of k⩾2 distinct primes q1,…,qk satisfying qj−1∣n−1 for j=1,…,k, then n is a Carmichael number.