lecture08

lecture08 - COMPSCI 102 Discrete Mathematics for Computer...

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

View Full Document Right Arrow Icon
COMPSCI 102 Discrete Mathematics for Computer Science
Background image of page 1

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

View Full DocumentRight Arrow Icon
X 1 X 2 + + X 3 Lecture 8 Counting III
Background image of page 2
How many ways to rearrange How many ways to rearrange the letters in the word the letters in the word “SYSTEMS” ? ?
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
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 !
Background image of page 6
14! 2!3!2! = 3,632,428,800 CARNEGIEMELLON
Background image of page 7

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

View Full DocumentRight Arrow Icon
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 !
Background image of page 8
5 distinct pirates want to divide 20 identical, indivisible bars of gold. How many different ways can they divide up the loot?
Background image of page 9

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

View Full DocumentRight Arrow Icon
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
Background image of page 10
Sequences with 20 G’s and 4 /’s How many different ways to divide up the loot? 24 4
Background image of page 11

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

View Full DocumentRight Arrow Icon
How many different ways can n distinct pirates divide k identical, indivisible bars of gold? n + k - 1 n - 1 n + k - 1 k =
Background image of page 12
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
Background image of page 13

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

View Full DocumentRight Arrow Icon
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 =
Background image of page 14
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)
Background image of page 15

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

View Full DocumentRight Arrow Icon
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}
Background image of page 16
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:
Background image of page 17

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

View Full DocumentRight Arrow Icon
+ + ( ) + ( ) = + + + + + Polynomials Express Choices and Outcomes Products of Sum = Sums of Products
Background image of page 18
Image of page 19
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online