Unformatted text preview:

Lecture 32 21 127 Concepts of Math 11 16 2012 Administrivia No homework due next week Also no recitation on Tuesday 11 20 I will have usual office hours on Monday but not on Tuesday or Wednesday Exam 3 is on the Friday you get back 11 30 Prep Questions for Exam 3 will be posted this weekend Work on those over break Counting In Two Ways More Examples Generalized version of something we proved on Wednesday n n X n i 0 i n 1 n i n X n n 1 i i i 0 Count the strings of length n made from elements of 0 1 2 1 by partitioning based on how many 0s there are Binomial Theorem You proved this in recitation yesterday x y R n N n x y n X n k 0 k xk y n k Geometric Series Formula q N 1 n N 1 q q 2 q 3 q n 1 n 1 X k 0 qk qn 1 q 1 Note This formula holds true in fact for any real number q 6 1 but the proof that follows only applies to natural numbers q 6 1 To prove the real valued version use induction How many natural numbers can be expressed in base q with up to n digits Let this set be S Proof S q n 1 because we only have to throw away the all 0s string from the set of all words of length n from q letters That is a string like 00011 is actually interpreted as the natural number 11 We can also partition S by the lengths of its elements Let k represent one less than the length of a number in S Then 0 k n 1 are the bounds on k Given such a k we can find the number of elements of S that are exactly k 1 digits long by selecting the first digit reading left to right and then selecting the rest of the digits The first digit cannot be 0 otherwise the number would actually be k digits or shorter so there are q 1 choices there In the other k positions there can be any digit so there are q choices in each of those k ordered positions By ROP there are q 1 q k such strings By ROS we have S n 1 X q 1 q k Factoring out q 1 from each term and dividing proves the claim k 0 1 Summation Identity n k N X n k k 1 k 2 n i n 1 k k k k k k 1 i k Proof Count binary strings of length n 1 with exactly k 1 ones based on where the rightmost 1 occurs Certainly there are n 1 k 1 such binary strings since we select where the k 1 1s appear We can also partition by where the rightmost one appears At best the first k 1 positions of the string reading left to right are filled with 1s so the rightmost 1 is at position k 1 For any other such string the rightmost 1 must be somewhere to the right of that in some position j where k 1 j n 1 That is to say we cannot pack k 1 ones into the first k or fewer positions Given such a j we can count the number of length n 1 binary strings with exactly k 1 ones and the rightmost one in position j as follows Set position j to be a 1 1 way to do this From the j 1 positions to the left of that 1 we already placed select k of them to be 1s to make sure we have k 1 total 1s j 1 ways to do this k Set the rest of the positions in the string to be 0s 1 way to do this By ROP there are we have j 1 k ways to complete this process By ROS then since these cases form a partition S n 1 X j 1 j 1 k By redefining the index of summation as i j 1 we can write n X i S k i 0 Applying Results We can show k 2 k1 2 k2 by a counting argument Count the number of words of length 2 made from an alphabet of k letters by partitioning based on whether one letter appears twice like in AA or whether the word has two letters in one of two orders like with AB and BA With this observation we can evaluate sum the sum of squares easily n n n X X X k k n 1 n 1 n n 1 2n 1 k2 2 2 algebra 1 2 2 3 6 k 1 k 1 k 1 You will have a similar problem on the Exam 3 Prep Questions with k 3 instead of k 2 Pirates Gold We have n indistinguishable identical gold coins to distribute amongst k distinguishable distinct and labeled pirates How many ways can we do this 2


View Full Document

CMU MSC 21127 - Lecture 32 - 11.16

Loading Unlocking...
Login

Join to view Lecture 32 - 11.16 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 32 - 11.16 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?