Docsity

Distinct Pirates - Discrete Math - Lecture Slides, Slides of Discrete Mathematics

Partial preview of the text

Download Distinct Pirates - Discrete Math - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

Introduction to Discrete

Mathematics

How many ways to rearrange

the letters in the word

“SYSTEMS”?

SYSTEMS

Let’s pretend that the S’s are distinct: S 1 YS 2 TEMS 3

There are 7! permutations of S 1 YS 2 TEMS 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!

Arrange n symbols: r 1 of type 1, r 2 of

type 2, …, rk of type k

n r (^1)

n-r (^1) r (^2)

n - r 1 - r 2 - … - r (^) k- 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!

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?

Sequences with 20 G’s and 4 /’s

How many different ways to divide

up the loot?

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 + x2 + 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

What if order doesn’t matter? (E.g., Yahtzee)

(Corresponds to 6 pirates and 7 bars of gold)

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:

( +^ + ) ( + ) =

+ + + + +

Polynomials Express

Choices and Outcomes

Products of Sum = Sums of Products

There is a correspondence

between paths in a choice

tree and the cross terms of

the product of polynomials!

1 X 1 X 1 X 1 X

1 X (^1) X

1 X

1 X X^ X^2 X^ X^2 X^2 X^3

Choice Tree for Terms of (1+X)^3

Combine like terms to get 1 + 3X + 3X^2 + X^3