15 251 Great Theoretical Ideas in Computer Science Review from last time Arrange n symbols r1 of type 1 r2 of type 2 rk of type k Counting III Lecture 8 September 18 2008 X1 X2 X3 n r1 n r1 n r1 r2 rk 1 r2 rk n n r1 n r1 r1 n r1 r2 r2 n r1 r2 rk CARNEGIEMELLON 14 3 632 428 800 2 3 2 5 distinct pirates want to divide 20 identical indivisible bars of gold How many different ways can they divide up the loot How many different ways to divide up the loot Sequences with 20 G s and 4 s 24 4 How many different ways can n distinct pirates divide k identical indivisible bars of gold n k 1 n 1 n k 1 k Identical Distinct Objects How many integer solutions to the following equations x1 x2 x3 xn k x1 x2 x3 xn 0 n k 1 n 1 Objects are distinguishable Objects are indistinguishable n k 1 k Suppose that we roll seven dice What if order doesn t matter E g Yahtzee nk k n 1 k The Binomial Formula Identical Distinct Dice How many different outcomes are there if order matters If we are putting k objects into n distinct bins 1 X n n 0 n 1 n n X X X 0 1 n 67 12 7 Corresponds to 6 pirates and 7 bars of gold Binomial Coefficients binomial expression Power Series Representation n What is the coefficient of X1r1X2r2 Xkrk in the expansion of X1 X2 X3 Xk n n r1 r2 rk 1 X n k 0 Product form or Generating form k 0 n k Xk n k Xk For k n n k Power Series or Taylor Series Expansion By playing these two representations against each other we obtain a new representation of a previous insight n And now for some more counting 0 1 X n k 0 n Let x 1 2n k 0 n k Xk n k The number of subsets of an n element set By varying x we can discover new identities n 1 X n k 0 n Let x 1 0 k 0 n Equivalently k odd n k 1 X n n n k k 0 Xk k even n k n k odd The number of subsets with even size is the same as the number of subsets with odd size Xk Proofs that work by manipulating algebraic forms are called algebraic arguments Proofs that build a bijection are called combinatorial arguments n 1 k k n k n n k n k even n k Let On be the set of binary strings of length n with an odd number of ones Let En be the set of binary strings of length n with an even number of ones We just saw an algebraic proof that On En A Combinatorial Proof A Correspondence That Works for all n Let On be the set of binary strings of length n with an odd number of ones Let fn be the function that takes an n bit string and flips only the first bit For example Let En be the set of binary strings of length n with an even number of ones 0010011 1010011 1001101 0001101 A combinatorial proof must construct a bijection between On and En 110011 010011 101010 001010 An Attempt at a Bijection Let fn be the function that takes an n bit string and flips all its bits fn is clearly a one toone and onto function for odd n E g in f7 we have but do even n work In f6 we have 0010011 1101100 1001101 0110010 110011 001100 101010 010101 Uh oh Complementing maps evens to evens n 1 X n k 0 n k Xk The binomial coefficients have so many representations that many fundamental mathematical identities emerge Pascal s Triangle n k Set of all k subsets of 1 n n 1 k n 1 k 1 Either we do not pick n then we have to pick k elements out of the remaining n 1 1 0 Or we do pick n then we have to pick k 1 elts out of the remaining n 1 2 0 3 0 1 1 X 1 1 1X 1 X 2 1 2X 1X2 1 X 3 1 3X 3X2 1X3 1 X 4 1 4X 6X2 4X3 1X4 1 1 1 1 2 1 2 2 2 1 3 1 3 3 2 3 3 3 1 Al Karaji Baghdad 953 1029 Chu Shin Chieh 1303 Blaise Pascal 1654 Pascal s Triangle It is extraordinary how fertile in 1 properties the 1 1 triangle is 1 2 1 Everyone can try his 1 3 3 1 hand 1 4 6 4 1 Pascal s Triangle kth row are coefficients of 1 X k Inductive definition of kth entry of nth row Pascal n 0 Pascal n n 1 Pascal n k Pascal n 1 k 1 Pascal n 1 k 1 1 1 The Binomial Formula 1 X 0 0 0 1 1 5 6 10 15 10 20 5 15 1 6 1 Summing the Rows n 2n n k Summing on 1st Avenue 1 1 1 1 2 1 2 1 4 1 3 3 1 8 1 4 6 4 1 16 1 5 10 10 5 1 32 1 6 15 20 15 6 1 64 k 0 n 1 1 1 1 6 10 1 1 1 1 4 5 6 3 6 15 1 15 15 1 1 1 1 1 10 20 10 20 1 4 10 1 5 15 5 15 1 1 6 1 6 1 n 1 1 3 4 Summing on kth Avenue 1 2 1 6 15 i 1 1 3 4 1 1 2 3 5 i 1 i n 1 2 1 1 1 Odds and Evens 1 i 1 1 n 1 6 20 6 1 1 3 5 6 1 2 4 i k 1 3 6 10 15 1 4 10 20 1 5 15 1 6 1 i n 1 k 1 k Fibonacci Numbers Al Karaji Squares 1 1 2 1 1 3 5 1 2 1 8 13 1 3 3 1 1 1 1 4 5 6 6 10 4 15 20 1 1 5 15 1 6 1 1 1 1 1 2 1 2 2 1 1 1 1 3 4 5 6 2 3 6 10 15 1 2 2 1 4 10 20 2 1 5 15 1 6 2 2 1 4 1 4 2 6 5 2 10 6 2 15 4 10 20 1 9 1 1 16 5 15 Pascal Mod 2 Sums of Squares 2 1 3 2 3 1 1 10 1 1 1 6 25 1 36 All these properties can be proved inductively and algebraically We will give combinatorial proofs using the Manhattan block walking representation of binomial coefficients Manhattan jth street 4 3 1 2 kth avenue 3 4 Manhattan How many shortest routes from …
View Full Document
Unlocking...