(i) Let N and r be integers with N⩾0,r⩾1. Let S be the set of (r+1)-tuples (n0,n1,…,nr) of non-negative integers satisfying the equation n0+⋯+nr=N. By mapping elements of S to suitable subsets of {1,…,N+r} of size r, or otherwise, show that the number of elements of S equals
(N+rr)
(ii) State the Inclusion-Exclusion principle.
(iii) Let a0,…,ar be positive integers. Show that the number of (r+1)-tuples (ni) of integers satisfying
n0+⋯+nr=N,0⩽ni<ai for all i
(N+rr)−0⩽i⩽r∑(N+r−air)+0⩽i<j⩽r∑(N+r−ai−ajr)−0⩽i<j<k⩽r∑(N+r−ai−aj−akr)+⋯
where the binomial coefficient (mr) is defined to be zero if m<r.