54 Slides--Combinatorics III

54 Slides--Combinatorics III - CS103A HO#54 Combinatorics...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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(n-1)(n-2)···(n-r+1) = n! (n-r)! C(n, r) = = P(n, r) r! n! r! (n-r)! 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

{[ snackBarMessage ]}

Page1 / 8

54 Slides--Combinatorics III - CS103A HO#54 Combinatorics...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online