lecture08

# lecture08 - COMPSCI 102 Discrete Mathematics for Computer...

This preview shows pages 1–19. Sign up to view the full content.

COMPSCI 102 Discrete Mathematics for Computer Science

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

View Full Document
X 1 X 2 + + X 3 Lecture 8 Counting III
How many ways to rearrange How many ways to rearrange the letters in the word the letters in the word “SYSTEMS” ? ?

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

View Full Document
SYSTEMS 7 places to put the Y, 6 places to put the T, 5 places to put the E, 4 places to put the M, and the S’s are forced 7 X 6 X 5 X 4 = 840
SYSTEMS Let’s pretend that the S’s are distinct: S 1 Y S 2 TEM S 3 There are 7! permutations of S 1 Y S 2 TEM S 3 But when we stop pretending we see that we have counted each arrangement of SYSTEMS 3! times, once for each of 3! rearrangements of S 1 S 2 S 3 7! 3! = 840

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

View Full Document
Arrange n symbols: r 1 of type 1, r 2 of type 2, …, r k of type k n r 1 n-r 1 r 2 n - r 1 - r 2 - … - r k-1 r k (n-r 1 )! (n-r 1 -r 2 )!r 2 ! n! (n-r 1 )!r 1 ! = = n! r 1 !r 2 ! … r k !
14! 2!3!2! = 3,632,428,800 CARNEGIEMELLON

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

View Full Document
Remember: The number of ways to arrange n symbols with r 1 of type 1, r 2 of type 2, …, r k of type k is: n! r 1 !r 2 ! … r k !
5 distinct pirates want to divide 20 identical, indivisible bars of gold. How many different ways can they divide up the loot?

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

View Full Document
Sequences with 20 G’s and 4 /’s GG / G // GGGGGGGGGGGGGGGGG / represents the following division among the pirates: 2, 1, 0, 17, 0 In general, the ith pirate gets the number of G’s after the (i-1) st / and before the i th / This gives a correspondence (bijection) between divisions of the gold and sequences with 20 G’s and 4 / ’s
Sequences with 20 G’s and 4 /’s How many different ways to divide up the loot? 24 4

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

View Full Document
How many different ways can n distinct pirates divide k identical, indivisible bars of gold? n + k - 1 n - 1 n + k - 1 k =
How many integer solutions to the following equations? x 1 + x 2 + x 3 + x 4 + x 5 = 20 x 1 , x 2 , x 3 , x 4 , x 5 ≥ 0 Think of x k are being the number of gold bars that are allotted to pirate k 24 4

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

View Full Document
How many integer solutions to the following equations? x 1 + x 2 + x 3 + … + x n = k x 1 , x 2 , x 3 , …, x n ≥ 0 n + k - 1 n - 1 n + k - 1 k =
Identical/Distinct Dice Suppose that we roll seven dice How many different outcomes are there, if order matters? 6 7 What if order doesn’t matter? (E.g., Yahtzee) 12 7 (Corresponds to 6 pirates and 7 bars of gold)

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

View Full Document
Multisets A multiset is a set of elements, each of which has a multiplicity The size of the multiset is the sum of the multiplicities of all the elements Example: {X, Y, Z} with m(X)=0 m(Y)=3, m(Z)=2 Unary visualization: {Y, Y, Y, Z, Z}
Counting Multisets = n + k - 1 n - 1 n + k - 1 k There number of ways to choose a multiset of size k from n types of elements is:

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

View Full Document
+ + ( ) + ( ) = + + + + + Polynomials Express Choices and Outcomes Products of Sum = Sums of Products
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 72

lecture08 - COMPSCI 102 Discrete Mathematics for Computer...

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

View Full Document
Ask a homework question - tutors are online