This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS103A HO #54 Combinatorics III 3/7/08 1 Permutations and Combinations with Repetition How many strings of length r can we form from the uppercase letters of the English alphabet, if repetition is allowed? 26 r Permutations Combinations (ordered) (unordered) P(n, r) = n(n1)(n2)(nr+1) = n! (nr)! C(n, r) = = P(n, r) r! n! r! (nr)! Without repetition With repetition n r Set of size n, selecting r items, 0 r n Combinations with Repetition Consider 7 kinds of bills: $1, $2, $5, $10, $20, $50, $100 Problem: Suppose I have a bag with lots of bills in it, and I pull out 5 bills. How many different combinations could there be? Combinations with Repetition Consider 7 kinds of bills: $1, $2, $5, $10, $20, $50, $100 Problem: Suppose I have a bag with lots of bills in it, and I pull out 5 bills. How many different combinations could there be? Equivalent problem: Suppose I have 5 blank bills. How many ways can I print denominations on them? Equivalent problem: Suppose I have 7 empty bins, labeled with the denominations. I'm going to place 5 blank bills in them, to be printed later. How many ways can I distribute the 5 bills? Combinations with Repetition Consider 7 kinds of bills: $1, $2, $5, $10, $20, $50, $100 Problem: Suppose I have a bag with lots of bills in it, and I pull out 5 bills. How many different combinations could there be? Equivalent problem: Suppose I have 5 blank bills. How many ways can I print denominations on them? Equivalent problem: Suppose I have 7 empty bins, labeled with the denominations. I'm going to place 5 blank bills in them, to be printed later. How many ways can I distribute the 5 bills? Equivalent problem: How many sets can I form by selecting 5 items, with repetition allowed, from a set of 7 items? Equivalent problem: How many integer solutions are there to the equation x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 = 5 where 0 x i 5 ? Combinations with Repetition Equivalent problem: Suppose I have 7 empty bins, labeled with the denominations. I'm going to place 5 blank bills in them, to be printed later. How many ways can I distribute the 5 bills? $1 $2 $5 $10 $20 $50 $100 * * * * * CS103A HO #54 Combinatorics III 3/7/08 2 Combinations with Repetition Equivalent problem: Suppose I have 7 empty bins, labeled with the denominations. I'm going to place 5 blank bills in them, to be printed later. How many ways can I distribute the 5 bills? * * * * * *   * *   *   * Combinations with Repetition Equivalent problem: Suppose I have 7 empty bins, labeled with the denominations. I'm going to place 5 blank bills in them, to be printed later. How many ways can I distribute the 5 bills? * * * * * *   * *   *   *           How many ways can we put 5 stars in these 11 slots?...
View
Full
Document
This note was uploaded on 10/01/2011 for the course CS 103A taught by Professor Plummer,r during the Winter '07 term at Stanford.
 Winter '07
 Plummer,R
 Computer Science

Click to edit the document details