Chapter 16 Pascal s Triangle and III3 Answers Pascal s Triangle Consider the pattern of numbers: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 This pattern is called Pascal s Triangle, and it goes on forever The best mathematical way to describe it is: C 0,c δ 0,c for all c Z C r,c C r 1,c 1 + C r 1,c for r>0,c Z The elements C 0,c go in the first row of the table Only the element C 0,0 1is shown, the rest (all zeros) are suppressed The element C r,c is element c in row r (counting started from 0 not 1, soc 3,1 3) For the most part the following problems are good exercises in mathematical induction Each of the following proofs uses the previous results 1 If r 0 and c<0 or c>rthen C r,c 0 Proof If r 0then by definition C 0,c 0if c 6 0 That is, C 0,c 0if c<0or ċ>0 For the induction step, suppose C r 1,c 0if c<0or c>r 1 We want to show that C r,c 0if c<0 or c>r We know Ċr,c C r 1,c 1 + C r 1,c If c<0 then, since r 1 <rand c 1 < 0, C r 1,c 1 C r 1,c 0so C r,c 0Ifċ>rthen, since r 1 >c 1 we have C r 1,c 1 C r 1,c 0so C r,c 0 2 C r,0 C r,r 1all r 0 Proof Again, if r 0, C r,0 C r,r C 0,0 1 For the induction step, suppose C r 1,0 C r 1,r 1 1 Then C r,0 C r 1, 1 + C r 1,0 0+1 1 C r,r C r 1,r 1 + C r 1,r 1+0 1 30
3 C r,1 C r,r 1 r, allr 0 (Check the cases r 0and r 1first, then use induction for the rest) Proof Examining the table above, we see for r 1that C r,1 C 0,1 0r C r,r 1 C 0, 1 0r For r 1 C r,1 C 1,1 1r C r,r 1 C 1,0 1r Now for the induction step: C r,1 C r 1,0 + C r 1,1 1+(r 1) r C r,r 1 C r 1,r 1 + C r 1,r 1 (r 1) + 1 r 4 Develop a formula for the sum of the elements in row r and prove it Theorem 38 P r i0 C r,i 2 r Proof If r 0then rx C r,i Ċ0,0 12 0 i0 Now for the induction step Note that since C r,c 0for c<0 and ċ>r,wemayrestatethetheorem as C r,i 2 r To prove this for r>0 we may assume C r,i C r 1,i 2 r 1 : (C r 1,i 1 + C r 1,i ) C r 1,i 1 + C r 1,i + 2 r 1 +2 r 1 2 r C r 1,i C r 1,i 5 Find out what C r,0 C r,1 + C r,2 ±C r,r equals, and prove it Theorem 39 P ½ 1 if r 0 ( 1)i C r,i 0 if r>0 31
Proof If r 0then P ( 1)i C r,i C 0,0 1Forr>0 we use induction ( 1) i C r,i 0 ( 1) i (C r 1,i 1 + C r 1,i ) ( 1) i C r 1,i 1 + ( 1) i 1 C r 1,i 1 + ( 1) i C r 1,i + ( 1) i C r 1,i ( 1) i C r 1,i ( 1) i C r 1,i The numbers C r,c show up in two important mathematical contexts Usually we denote C r,c by µ r C r,c c the binomial coefficient It represents the number of subsets of size c in a set of size r 6 Verify that the number of subsets of size 5 in a set of size 8 is C 8,5 Proof C 8,5 56, and the 56 subsets of size 5 from {1, 2, 3, 4, 5, 6, 7, 8}are {1, 2, 3, 4, 5}, {1, 2, 3, 4, 6}, {1, 2, 3, 4, 7}, {1, 2, 3, 4, 8}, {1, 2, 3, 5, 6}, {1, 2, 3, 5, 7}, {1, 2, 3, 5, 8}, {1, 2, 3, 6, 7} and so forth These numbers are called binomial coefficients because: (x + y) r C r,0 x r + C r,1 x r 1 y + C r,2 x r 2 y 2 + + C r,r 2 x 2 y r 2 + C r,r 1 xy r 1 + C r,r y r 7 Verify this formula for r 4Expand(x + y) 4 and show that the coefficients are C 4,0,C 4,1,,C 4,4 Proof C 4,0 C 4,4 1, C 4,1 C 4,3 4 C 4,2 6Moreover(x + y) 4 x 4 +4x 3 y+6x 2 y 2 +4xy 3 +y 4 Eccles III3 Suppose 100 people speak one or more of the languages English, Spanish and Swahili The number speaking English (and possibly Spanish or Swahili) is 75; the number speaking Spanish is 60 and the number speaking Swahili is 45 We wish to answer several questions about the possible linguistic composition of this motley crowd, but first we need to set up some equationsdefine some variables: e # English only s # Spanish only w # Swahili only es # English and Spanish ew # English and Swahili sw # Spanish and Swahili esw # English and Spanish and Swahili 32
The given conditions imply: Row-reducing this system, we get: es + ew + sw + esw + e + s + w 100 es + ew + esw + e 75 es + sw + esw + s 60 ew + sw + esw + w 45 es 55 e s ew 40 e w sw 25 s w esw e + s + w 20 Note that solutions fitting the problem require that all variables have non-negative integral values 1 Since es, ew and sw must be non-negative, he first three lines imply e + s 55 e + w 40 s + w 25 Adding up these inequalities and dividing by 2 gives: e + s + w 60 That is, the number of people speaking only one language cannot exceed 60 2 Since ew 0, the second line implies e 40, or the maximum number of people speaking only English is 40 If 40 people speak only English, then from the first equation 15 people speak only Spanish and from the second equation no people speak only Swahili 3 From the third line we see that the number of people who speak only one language (e + s + w) is 20 more than the number of people speaking all three (esw) Thus the more people who speak all three, themorewhospeakonlyone 33
Chapter 17 Counting Again General nonsense We begin by reorganizing a proof from the last lecture Lemma 40 If h : N n N n is injective, then h is also surjective Proof We proceed by induction First the base case n 1 Ifwehaveamaph : {1} {1} then the only possible value for h (1) is 1, soh is surjective (For this base case we did not have to assume that h was injective because all maps h : {1} {1} are injective) Now for the inductive step Suppose we have an injective function h : N n N n We want to show that h is surjective We may assume that any injective function k : N n 1 N n 1 is surjective We distinguish threepossiblecases 1 h (n) n 2 There exists j N n 1 such that h (j) n 3 For all j N n, h (j) <n We will show, in case (1) and (2), thath is surjective, and we will show that case (3) leads to a contradiction 1 Since h is injective, i<nimplies h (i) <n Thus the restricted map h : N n 1 N n 1 and h, restricted to N n 1, is still injective By the inductive hypothesis (we have to use it somewhere), the restricted map h : N n 1 N n 1 is surjective Therefore h : N n N n is surjective 2 Define a function k : N n N n by k (j) h (n) k (n) h (j) n k (i) h (i) for i 6 j and i 6 n The function k is 1 1 and satisfies condition (1) Therefore k is surjective, and thus h is surjective 3 The restricted map h : N n 1 N n is actually a map h : N n 1 N n 1 Since the restricted map is injective, it is also surjective But this contradicts the injectivity of h, because there exists j<nsuch that h (j) h (n) Therefore case(3) leads to a contradiction Proposition 41 Suppose we have a bijective function f : N n N m Then n m 34
Proof The proof is by contradiction Suppose n 6 m Replacing f by f 1 if necessary, we may suppose n>m Construct g : N m N n,g(i) i Thisisdefined because m<n The map g is injective, but g is not surjective because there is no element x N m, g (x) n Thusg f : N n N n is injective but not surjective, which by the Lemma is a contradiction Lemma 42 Suppose f : N m N n is injective Then m n Proof Suppose m>n We will derive a contradiction Since m>nwe have a map g : N n N m, g (i) i The function g is injective, so g f : N m N m is injective By the previous lemma, g f is surjective, so g is surjective Thus g is bijective and n m, which is a contradiction Proposition 43 (The pigeonhole principle) Suppose A and B are finite sets Then A B if and only if there is an injection f : A B Moreover A B if and only if there exists an injection f : A B and every such injection is bijective Proof Since A and B are finite, there exist bijections g : N m A and h : N n B, wherem A and n B Iff is injective, we have an injective map: h 1 f g : N m N n By the lemma, m n Conversely, if m n we have an injective map k : N m N n, k (i) i Thus f h k g 1 : A B is injective Suppose A B Bythefirstpartwehaveaninjectionf : A B Letk h 1 f g : N m N n This map is injective and n m,so by the first lemma k is bijective Therefore f h k g 1 is a composition of bijective maps and is therefore bijective Conversely, if we have an injection f : A B then by an earlier proposition A and B have the same cardinality or A B Proposition 44 If B is a finite set and A B then A is finite Proof To show A is finite, we proceed by induction on B If B 0then B φ so A φ and A is finite If B 1then B {b} for some element b ThuseitherA φ or A B IneithercaseA is finite We proceed by induction on B, assuming B > 1 Let n B Wehaveabijectionf : N n B Define:b f (n) The map f restricts to a bijection N n 1 B {b}, sob {b} is a finite set, and B {b} < B Also {b} 1 Let A 1 A (B {b}) and A 2 A {b} By induction, A 1 and A 2 are finite sets Also A 1 A 2 φby an earlier result that the disjoint union of finite sets if finite, A A 1 A 2 is finite Corollary 45 If B is a finite set and A B then A B Moreoverif A B then A B Proof Since subsets of B are finite, both A and B A are finite Since B A + B A and all cardinalities are non-negative, A B Moreover if A B then B A 0or B A φ That is, A B Counting Functions Definition 46 Let A and B be sets fun(a, B) is the set of functions with domain A and codomain B, that is the set of functions f : A B Definition 47 The graph of f : A B is the subset {(a, f (a)) : a A} A B Proposition 48 If two functions have the same graph, they are the same function Thus fun(a, B) P (A B) Proposition 49 If A and B are non-empty finite sets then the number of functions f : A B is B A 35
Proof It suffices to show that the number of functions N m N n is n m The intuition is that function f : N m N n is constructed by choosing a value for f (1), avaluefor f (2) andsoonthroughf (m) Each value can be selected n ways, so overall n m choices are possible But intuition is not proof The proof goes by induction on m Ifm 1we must count the number of functions {1} {1, 2,,n} There are n such functions given by f (1) i for 1 i n Thus if m 1the number of functions is n m n 1 n If m>1, then by induction there are n m 1 functions N m 1 N n For 1 i n, define F i {f fun(n m, N n ):f (m) i} There is a 1 1 correspondence F i fun(n m 1, N n ),so F i n m 1 Moreover, fun(n m, N n ) is the disjoint union of the F i,so fun(n m, N n ) nx F i i1 n n m 1 n m Definition 50 A permutation of a set A is a bijective function f : A A Proposition 51 If A is a finite set with A n then the number of permutations of A is n! Remark 52 0! 1 because there is one permutation of the empty set Proof It suffices to prove that the number of permutations of N n is n!if n 1there is obviously 1 (bijective) map from N 1 N 1 We go by induction on n, since and we can assume that the number of bijectiions between two sets of size n 1 is (n 1)! Let P be the set of permutaions of N n,andlet P i {p P : p (n) i} ThenP is the disjoint union of the P i, 1 i n, andp i is in 1 1 correspondence with the set of bijective maps N n 1 (N n {i}) Both these sets of n 1 elements, so P i (n 1)! Thus P n (n 1)! n! Definition 53 C n,r is the number defined in the assignment "Pascal s Triangle" D n,r is the number of subsets of cardinality r is a set of cardinality n n (n 1) (n r +1) if 0 <r n! r! if 0 r n r 1 if r 0 r!(n r)! 0 otherwise 0 if r<0 P n,r coefficient of x n r y r in (x + y) n Proposition 54 The four functions defined above are all equal Proof Note that all the functions are defined for n 0 and r Z To show all the functions are equal, it suffices to show that all the other functions are equal to C n,r The values of the function C n,r are determined by the relations: C 0,r δ 0,r C n,r C n 1,r 1 + C n 1,r for n>0 and all r Thus, to show that a function f (n, r) C n,r,itsuffices to show f (0,r) δ 0,r f (n, r) f (n 1,r 1) + f (n 1,r) for n>0 and all r We begin with D n,r First of all, D 0,r is the number of subsets of cardinality r in the empty set The empty set has only one subset, namely itself, so D 0,0 1and D 0,r 0for r 6 0 If n>0 let A be a set of cardinality n Choose an element a A (possible because the cardinality of A is not 0), and let B A {a} The subsets of cardinality r in A fall into two categories, those contained in B 36
and those not contained in BThe number of subsets of cardinality r contained in B is D n 1,r Thesubsets not contained in B are the subsets containing a The number of subsets of A of cardinality r containing a is the number of subsets of B of cardinality r 1, ord n 1,r 1 Thus the number of subets of A of cardinality r is D n,r D n 1,r 1 + D n 1,r µ 0 Now we consider If n 0then δ r,0 If n>0then we must show µ r r r r n 1 + There are four cases to consider: r µ µ n 1 n 1 1 If r<0 then 00+0 + r r 1 r µ µ µ µ n 1 n 1 n 1 n 1 2 If r 0then 10+1 + + r 0 1 0 r 1 r 3 If r 1then n r 1 1 1+n 1 µ µ µ µ n 1 n 1 n 1 n 1 + + 1 0 1 r 1 r µ n 1 r 1 4 If r>1 then r n (n 1) (n r +1) r! (n 1) (n r +1) n (r 1)! r (n 1) (n r +1) (r 1)! µ 1+ n r r (n 1) ((n 1) (r 1) + 1) + (r 1)! µ µ n 1 n 1 + r 1 r (n 1) ((n 1) r +1) r! Finally we look at P n,r First of all (x + y) 0 1x 0 y 0 so P 0,0 1and P 0,r 0for r 6 0Ifn>0 then (x + y) n nx P n,r x n r y r r0 (x + y)(x + y) n 1 n1 X (x + y) P n 1,r x n 1 r y r r0 r0 n1 X n1 X P n 1,r x n r y r + P n 1,r x n 1 r y r+1 n1 X P n 1,r x n r y r + r0 r0 nx P n 1,r 1 x n r y r r1 nx (P n 1,r 1 + P n 1,r ) x n r y r (because P n 1, 1 P n 1,n 0) r0 Thus P n,r P n 1,r 1 + P n 1,r 37