Permutations: Permutation
Permutations: Permutation
Permutations: Permutation
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 1/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 2/36
I I Consider the set {7, 10, 23, 4}. How many permutations?
How many permutations of S are there?
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 3/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 4/36
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 5/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 6/36
1
Examples Combinations
I What is the number of 2-permutations of set {a, b, c, d , e}?
I
I An r-combination of set S is the unordered selection of r
I How many ways to select first-prize winner, second-prize elements from that set
winner, third-prize winner from 10 people in a contest? I Unlike permutations, order does not matter in combinations
I
I Example: What are 2-combinations of the set {a, b, c}?
I Salesman must visit 4 cities from list of 10 cities: Must begin
I For this set, 6 2-permutations, but only 3 2-combinations
in Chicago, but can choose the remaining cities and order.
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 7/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 8/36
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 9/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 10/36
I How many hands of 5 cards can be dealt from a standard I How many bitstrings of length 8 contain at least 6 ones?
deck of 52 cards?
I
I
I
I There are 9 faculty members in a math department, and 11 in
CS department. I
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 11/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 12/36
2
One More Example Binomial Coefficients
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 13/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 14/36
1 3 3 1
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 15/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 16/36
I What is the coefficient of x 12 y 13 in the expansion of I Binomial theorem allows showing a bunch of useful results.
(2x − 3y)25 ?
P
n n
I
I Corollary: = 2n
k =0 k
I I
I I
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 17/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 18/36
3
Another Corollary Pascal’s Triangle
P
n n
I Corollary: (−1)k =0
k =0 k
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 19/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 20/36
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 21/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 22/36
Interesting Facts about Pascal’s Triangle Some Fun Facts about Pascal’s Triangle, cont.
Xn
n I Why is this the case?
= 2n
k
k =0
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 23/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 24/36
4
Permutations with Repetitions General Formula for Permutations with Repetition
I
I What is P ∗ (n, r )?
Example: How many strings of length 4 can be formed using
letters in English alphabet?
I How many ways to assign 3 jobs to 6 employees if every
I
employee can be given more than one job?
Since string can contain same letter multiple times, we want
to allow repetition!
I How many different 3-digit numbers can be formed from
I
1, 2, 3, 4, 5?
A permutation with repetition of a set of objects is an ordered
arrangement of these objects, where each object may be used
more than once
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 25/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 26/36
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 27/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 28/36
C V M R L
5
Result Example 1
I Example: In how many ways can we choose 3 scoops of ice I How many ways to select four pieces of fruit from this bowl?
cream from 5 different flavors?
I
I Here, r = 3 and n = 5. Thus:
7 7!
= = 35
3 3! · 4!
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 31/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 32/36
Example 2 Example 3
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 33/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 34/36
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 35/36 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Permutations and Combinations 36/36