(i) State and prove the Inclusion-Exclusion Principle.
(ii) Let n>1 be an integer. Denote by Z/nZ the integers modulo n. Let X be the set of all functions f:Z/nZ→Z/nZ such that for every j∈Z/nZ,f(j)−f(j−1)≡j (modn). Show that
∣X∣={(n−1)n+1−n(n−1)n−1 if n is odd if n is even