1a. Product Principle: kn
b. Product Principle: kn = k(k−1)⋅⋅⋅(k−n+1)
c. PIE: A = {ordered list, any repeats}, Ai = {no element i} for i = 1,...,n.
kn − (n | 1) (k−1)n + (n | 2) (k−2)n − ⋅⋅⋅ + (−1)n−1 (n | n−1) 1n .
d. Product Principle in reverse: (n | k) = nk / k! = n! / k!(n−k)!
e. Bins-and-beans correspondence (Notes 1/11):
((n | k)) = (k+n−1 | n−1) = (k+n−1 | k)
f. Correspondence: remove 1 element of each kind.
((n | k−n)) = (k−1 | k−n) = (k−1 | n−1)
2a. ((3 | 10)) = (10+3-1 | 3-1) = (12 | 2) = 66.
b. ((3 | 10-3)) = (9 | 2) = 36.
c. Ans: 19.
3a. Problem: Let ak be the number of triples of whole numbers n1, n2, n3 ≥ 0 satisfying the equation n1 + n2 + n3 = k. Evaluate the generating function f(x) = ∑k≥0 akxk using the Product Principle, and use this to get an expression for ak.
Solution: The cases counted by the coefficients ak cannot be easily factored into a sequence of choices, but consider all choices of (n1,n2,n3) without specifying the sum k:
choose (n1,n2,n3) ⇔ (n1 = 0 or n1 = 1 or n1 = 2 or ...) and (n2 = 0 or ....) and (n3 = 0 or ...)
f(x) = ∑k≥0 akxk = (x0 + x1 + x2 + ...) (x0 + ...)(x0 + ...)
= (1 + x1 + x2 + ...)3 = ( 1/(1-x) )3 = ∑k≥0 ((3 | k)) xk .
3b. Problem: Now let bk be the number of solutions to n1 + n2 + n3 = k with n1, n2, n3 ≥ 1. Determine bk by evaluating g(x) = ∑k≥0 bkxk.
Solution: By the same reasoning,
4. Problem: Solve the recurrence ak = 3ak−1 − 2ak−2 for k ≥ 2, with a0 , a1 arbitrary constants.
Solution: The generating function is:
| f(x) | = |
| . |
f(x) = A/(1−x) + B/(1−2x) = ∑k≥0 A xk + ∑k≥0 2B xk ,
ak = 2a0 − a1 + 2k (a1 − a0) .