Upload
trinhnga
View
235
Download
4
Embed Size (px)
Citation preview
Permutation and Combinations
Arash Rafiey
August 27, 2015
Arash Rafiey Permutation and Combinations
Permutation and Combinations
Definition
A permutation of a set of distinct objects is any rearrangement ofthem (ordered list). Generally, if 1 ≤ k ≤ n, a k-permutation ofa set of n distinct objects is any permutation of any k of these nobjects.
Theorem
The number of k-permutations from n distinct objects is denotedby P(n, k) and we have
P(n, k) = n(n − 1)(n − 2)...(n − k + 1) =n!
(n − k)!.
Proof.
In the first position we have n possibilities, in the second positionwe have n − 1 and in the k-position we have n − k + 1possibilities.
Arash Rafiey Permutation and Combinations
Permutation and Combinations
Definition
A permutation of a set of distinct objects is any rearrangement ofthem (ordered list). Generally, if 1 ≤ k ≤ n, a k-permutation ofa set of n distinct objects is any permutation of any k of these nobjects.
Theorem
The number of k-permutations from n distinct objects is denotedby P(n, k) and we have
P(n, k) = n(n − 1)(n − 2)...(n − k + 1) =n!
(n − k)!.
Proof.
In the first position we have n possibilities, in the second positionwe have n − 1 and in the k-position we have n − k + 1possibilities.
Arash Rafiey Permutation and Combinations
Permutation and Combinations
Definition
A permutation of a set of distinct objects is any rearrangement ofthem (ordered list). Generally, if 1 ≤ k ≤ n, a k-permutation ofa set of n distinct objects is any permutation of any k of these nobjects.
Theorem
The number of k-permutations from n distinct objects is denotedby P(n, k) and we have
P(n, k) = n(n − 1)(n − 2)...(n − k + 1) =n!
(n − k)!.
Proof.
In the first position we have n possibilities, in the second positionwe have n − 1 and in the k-position we have n − k + 1possibilities.
Arash Rafiey Permutation and Combinations
Combinations
Definition
If 0 ≤ k ≤ n, a k-combination of a set of n distinct objects is any(unordered) subset that contains exactly k of these objects.
Theorem
The number of k-combinations taken from a set of n distinctobjects (0 ≤ k ≤ n) is denoted by C (n, k) and we have
C (n, k) = P(n,k)k! = n!
k!(n−k)! (C (n, k) =(nk
))
Show that if we multiply m consecutive positive integers then theresult is a multiple of m!.
Let n + 1, . . . , n + m be the m consecutive numbers. We need toshow that m!|(m + n)(m + n − 1)...(n + 1). This is because(m+n
m
)= (m+n)(m+n−1)...(n+1)
m!
Arash Rafiey Permutation and Combinations
Combinations
Definition
If 0 ≤ k ≤ n, a k-combination of a set of n distinct objects is any(unordered) subset that contains exactly k of these objects.
Theorem
The number of k-combinations taken from a set of n distinctobjects (0 ≤ k ≤ n) is denoted by C (n, k) and we have
C (n, k) = P(n,k)k! = n!
k!(n−k)! (C (n, k) =(nk
))
Show that if we multiply m consecutive positive integers then theresult is a multiple of m!.
Let n + 1, . . . , n + m be the m consecutive numbers. We need toshow that m!|(m + n)(m + n − 1)...(n + 1). This is because(m+n
m
)= (m+n)(m+n−1)...(n+1)
m!
Arash Rafiey Permutation and Combinations
Combinations
Definition
If 0 ≤ k ≤ n, a k-combination of a set of n distinct objects is any(unordered) subset that contains exactly k of these objects.
Theorem
The number of k-combinations taken from a set of n distinctobjects (0 ≤ k ≤ n) is denoted by C (n, k) and we have
C (n, k) = P(n,k)k! = n!
k!(n−k)! (C (n, k) =(nk
))
Show that if we multiply m consecutive positive integers then theresult is a multiple of m!.
Let n + 1, . . . , n + m be the m consecutive numbers. We need toshow that m!|(m + n)(m + n − 1)...(n + 1). This is because(m+n
m
)= (m+n)(m+n−1)...(n+1)
m!
Arash Rafiey Permutation and Combinations
Combinations
Definition
If 0 ≤ k ≤ n, a k-combination of a set of n distinct objects is any(unordered) subset that contains exactly k of these objects.
Theorem
The number of k-combinations taken from a set of n distinctobjects (0 ≤ k ≤ n) is denoted by C (n, k) and we have
C (n, k) = P(n,k)k! = n!
k!(n−k)! (C (n, k) =(nk
))
Show that if we multiply m consecutive positive integers then theresult is a multiple of m!.
Let n + 1, . . . , n + m be the m consecutive numbers. We need toshow that m!|(m + n)(m + n − 1)...(n + 1). This is because(m+n
m
)= (m+n)(m+n−1)...(n+1)
m!
Arash Rafiey Permutation and Combinations
Binomial Theorem
Theorem
The number of subsets of a set with n elements isC (n, 0) + C (n, 1) + · · ·+ C (n, n) = 2n.
Recall that(nk
)= n!
k!(n−k)!
Theorem
If x , y are any numbers, and n is a nonnegative integer, then
(x + y)n =n∑
k=0
(nk
)xkyn−k .
Arash Rafiey Permutation and Combinations
Binomial Theorem
Theorem
The number of subsets of a set with n elements isC (n, 0) + C (n, 1) + · · ·+ C (n, n) = 2n.
Recall that(nk
)= n!
k!(n−k)!
Theorem
If x , y are any numbers, and n is a nonnegative integer, then
(x + y)n =n∑
k=0
(nk
)xkyn−k .
Arash Rafiey Permutation and Combinations
Theorem
If x , y are any numbers, and n is a nonnegative integer, then
(x + y)n =n∑
k=0
(nk
)xkyn−k .
Proof.
(x + y)n = (x + y)(x + y)....(x + y) (n times) xkyn−k arise fromchoosing k x ′s from one of the n- terms (x , y)’s . This means wechoose k x from n possible terms (object). Therefore there areC (n, k) =
(nk
)ways and hence the coefficient of xkyn−k is
(nk
).
Arash Rafiey Permutation and Combinations
Show that(nm
)=
(n−1m
)+
(n−1m−1
)
Show that(nm
)=
m∑i=0
(n−m−1+ii
).
Arash Rafiey Permutation and Combinations
Show that(nm
)=
(n−1m
)+
(n−1m−1
)Show that
(nm
)=
m∑i=0
(n−m−1+ii
).
Arash Rafiey Permutation and Combinations
1 ) Show that 1 =(m
1
)−
(m2
)+
(m3
)− ... + (−1)m+1
(mm
).
(1− 1)m = 1m +(m
1
)1m−1(−1)1 +
(m2
)1m−2(−1)2 + ...
Arash Rafiey Permutation and Combinations
1 ) Show that 1 =(m
1
)−
(m2
)+
(m3
)− ... + (−1)m+1
(mm
).
(1− 1)m = 1m +(m
1
)1m−1(−1)1 +
(m2
)1m−2(−1)2 + ...
Arash Rafiey Permutation and Combinations
Multinomial Coefficients
Theorem
Assume that there are n1 objects of type 1, n2 objects of type 2,..., nk objects of type k and n = n1 + n2 + · · ·+ nk . The numberof distinguishable permutations of these n objects is :(
n
n1, n2, . . . , nk
)=
n!
n1!n2!...nk !
This number is also the number of ways to place n distinct objectsinto k distinguished group with n1 objects in the first group, n2 inthe second group,..., nk in the last group.
Proof.
There are n! = (n1 + n2 + ... + nk)! permutation of these objects.But for each type i there are ni ! permutations (permuting theobject of the same types) that are the same. Therefore we shoulddivide n! by n1!n2! . . . nk !.
Arash Rafiey Permutation and Combinations
Multinomial Coefficients
Theorem
Assume that there are n1 objects of type 1, n2 objects of type 2,..., nk objects of type k and n = n1 + n2 + · · ·+ nk . The numberof distinguishable permutations of these n objects is :(
n
n1, n2, . . . , nk
)=
n!
n1!n2!...nk !
This number is also the number of ways to place n distinct objectsinto k distinguished group with n1 objects in the first group, n2 inthe second group,..., nk in the last group.
Proof.
There are n! = (n1 + n2 + ... + nk)! permutation of these objects.But for each type i there are ni ! permutations (permuting theobject of the same types) that are the same. Therefore we shoulddivide n! by n1!n2! . . . nk !.
Arash Rafiey Permutation and Combinations
Proof.
(2). Imagine n slots to be filled with these n objects. Choose n1
slots to be filled with objects of type 1. There are( nn1
)ways.
From the remanning n − n1 objects choose n2 slots to be filledwith type 2 objects, there are
(n−n1n2
)ways to do so and continue
this way.
Thus we have( nn1
).(n−n1
n2
).(n−n1−n2
n3
).(n−n1−n2−···−nk−1
nk
)= n!
n1!n2!...nk !
Arash Rafiey Permutation and Combinations
Proof.
(2). Imagine n slots to be filled with these n objects. Choose n1
slots to be filled with objects of type 1. There are( nn1
)ways.
From the remanning n − n1 objects choose n2 slots to be filledwith type 2 objects, there are
(n−n1n2
)ways to do so and continue
this way.
Thus we have( nn1
).(n−n1
n2
).(n−n1−n2
n3
).(n−n1−n2−···−nk−1
nk
)= n!
n1!n2!...nk !
Arash Rafiey Permutation and Combinations
Proof.
(2). Imagine n slots to be filled with these n objects. Choose n1
slots to be filled with objects of type 1. There are( nn1
)ways.
From the remanning n − n1 objects choose n2 slots to be filledwith type 2 objects, there are
(n−n1n2
)ways to do so and continue
this way.
Thus we have( nn1
).(n−n1
n2
).(n−n1−n2
n3
).(n−n1−n2−···−nk−1
nk
)= n!
n1!n2!...nk !
Arash Rafiey Permutation and Combinations
Multinomial Theorem
Theorem
If x1, x2, . . . , xr are numbers, and n is a nonnegative integer, then
(x1 + x2 + · · ·+ xr )n =
∑k1+k2+···+kr=n
(n
k1, k2, . . . , kr
)xk11 xk2
2 ...xkrr
Example :(x + 2y + 3z)3 = x3 + (2y)3 + (3z)3 + 3x2(2y) + 3x(2y)2 +3x2(3z) + 3x(3z)2 + 3(2y)23z + 3(2y)(3z)2 + 36xyz .
Exercise :What is the coefficient of a6b3c3d2 in the expansion of(2a − 3b + 4c − d)14.
Arash Rafiey Permutation and Combinations
Multinomial Theorem
Theorem
If x1, x2, . . . , xr are numbers, and n is a nonnegative integer, then
(x1 + x2 + · · ·+ xr )n =
∑k1+k2+···+kr=n
(n
k1, k2, . . . , kr
)xk11 xk2
2 ...xkrr
Example :(x + 2y + 3z)3 = x3 + (2y)3 + (3z)3 + 3x2(2y) + 3x(2y)2 +3x2(3z) + 3x(3z)2 + 3(2y)23z + 3(2y)(3z)2 + 36xyz .
Exercise :What is the coefficient of a6b3c3d2 in the expansion of(2a − 3b + 4c − d)14.
Arash Rafiey Permutation and Combinations
Multinomial Theorem
Theorem
If x1, x2, . . . , xr are numbers, and n is a nonnegative integer, then
(x1 + x2 + · · ·+ xr )n =
∑k1+k2+···+kr=n
(n
k1, k2, . . . , kr
)xk11 xk2
2 ...xkrr
Example :(x + 2y + 3z)3 = x3 + (2y)3 + (3z)3 + 3x2(2y) + 3x(2y)2 +3x2(3z) + 3x(3z)2 + 3(2y)23z + 3(2y)(3z)2 + 36xyz .
Exercise :What is the coefficient of a6b3c3d2 in the expansion of(2a − 3b + 4c − d)14.
Arash Rafiey Permutation and Combinations
What is the number of solutions for x1 + x2 + · · ·+ xk = n where1 ≤ xi ≤ n
Consider n ones in a row and suppose we want to put k − 1 flagsbetween them. We separate them into k parts and each part i hassome xi ones in it. There are n − 1 places and we should choosek − 1 of these places. Therefore
(n−1k−1
).
What is the number of solutions for x1 + x2 + · · ·+ xk = n where0 ≤ xi ≤ n(n+k−1
k−1
)Theorem
The number of ways of distributing n identical objects to ddifferent places is
(n+d−1d−1
).
Arash Rafiey Permutation and Combinations
What is the number of solutions for x1 + x2 + · · ·+ xk = n where1 ≤ xi ≤ n
Consider n ones in a row and suppose we want to put k − 1 flagsbetween them. We separate them into k parts and each part i hassome xi ones in it. There are n − 1 places and we should choosek − 1 of these places. Therefore
(n−1k−1
).
What is the number of solutions for x1 + x2 + · · ·+ xk = n where0 ≤ xi ≤ n(n+k−1
k−1
)Theorem
The number of ways of distributing n identical objects to ddifferent places is
(n+d−1d−1
).
Arash Rafiey Permutation and Combinations
What is the number of solutions for x1 + x2 + · · ·+ xk = n where1 ≤ xi ≤ n
Consider n ones in a row and suppose we want to put k − 1 flagsbetween them. We separate them into k parts and each part i hassome xi ones in it. There are n − 1 places and we should choosek − 1 of these places. Therefore
(n−1k−1
).
What is the number of solutions for x1 + x2 + · · ·+ xk = n where0 ≤ xi ≤ n
(n+k−1k−1
)Theorem
The number of ways of distributing n identical objects to ddifferent places is
(n+d−1d−1
).
Arash Rafiey Permutation and Combinations
What is the number of solutions for x1 + x2 + · · ·+ xk = n where1 ≤ xi ≤ n
Consider n ones in a row and suppose we want to put k − 1 flagsbetween them. We separate them into k parts and each part i hassome xi ones in it. There are n − 1 places and we should choosek − 1 of these places. Therefore
(n−1k−1
).
What is the number of solutions for x1 + x2 + · · ·+ xk = n where0 ≤ xi ≤ n(n+k−1
k−1
)
Theorem
The number of ways of distributing n identical objects to ddifferent places is
(n+d−1d−1
).
Arash Rafiey Permutation and Combinations
What is the number of solutions for x1 + x2 + · · ·+ xk = n where1 ≤ xi ≤ n
Consider n ones in a row and suppose we want to put k − 1 flagsbetween them. We separate them into k parts and each part i hassome xi ones in it. There are n − 1 places and we should choosek − 1 of these places. Therefore
(n−1k−1
).
What is the number of solutions for x1 + x2 + · · ·+ xk = n where0 ≤ xi ≤ n(n+k−1
k−1
)Theorem
The number of ways of distributing n identical objects to ddifferent places is
(n+d−1d−1
).
Arash Rafiey Permutation and Combinations
Exercises
1) What is the number of ways from (0, 0) to (m, n) using one stepup and one step right at a time ?
Move up or right
B = (m, n)
m
n
A = (0, 0)
Number of ways from A to B
Arash Rafiey Permutation and Combinations
Exercises
2) Show that( nn−k
)=
(nk
), 0 ≤ k ≤ n.
Use the definition (non-combinatorial proof).
Suppose we want to choose k objects from a set of n objects.It is like not choosing n − k objects from a set of n objects. Wecan relate each subset of k objects to a subset of n− k objects andvice versa.
Arash Rafiey Permutation and Combinations
Exercises
2) Show that( nn−k
)=
(nk
), 0 ≤ k ≤ n.
Use the definition (non-combinatorial proof).
Suppose we want to choose k objects from a set of n objects.It is like not choosing n − k objects from a set of n objects. Wecan relate each subset of k objects to a subset of n− k objects andvice versa.
Arash Rafiey Permutation and Combinations
Exercises
2) Show that( nn−k
)=
(nk
), 0 ≤ k ≤ n.
Use the definition (non-combinatorial proof).
Suppose we want to choose k objects from a set of n objects.It is like not choosing n − k objects from a set of n objects. Wecan relate each subset of k objects to a subset of n− k objects andvice versa.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)
n∑k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)n∑
k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)
On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)n∑
k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)n∑
k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)n∑
k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
3) Show thatn∑
k=0
(nk
)2=
(2nn
)n∑
k=0
(nk
)2=
n∑k=0
(nk
).( nn−k
)On the right side we have number of ways of choosing n elementsfrom a set of 2n elements.
We can split the 2n elements into two sets A,B each of size n.Now we can choose k elements from A and n− k elements from Bto make a set of size n.
Choosing k elements from A means(nk
)and choosing n − k
elements from B means( nn−k
).
Since 0 ≤ k ≤ n, we have the sum in the left side.
Arash Rafiey Permutation and Combinations
4) Show thatn∑
k=0
k(nk
)= n2n−1
Arash Rafiey Permutation and Combinations
5.1) Expand (x + 2y + 3z)4
5.2) What is the coefficient of x4y6z8w24 in the expansion of(x + 2y + 3z2 + w4)20.
Arash Rafiey Permutation and Combinations
How many onto functions f are there with the following domainsand codomanis?
(a) f : {1, 2, 3, 4, 5} → {1, 2, 3, 4, 5, 6}
(b) f : {1, 2, 3, 4, 5, 6} → {1, 2, 3, 4, 5, 6}
(c) f : {1, 2, 3, 4, 5, 6} → {1, 2, 3, 4, 5}
(d) f : {1, 2, 3, 4, 5, 6, 7} → {1, 2}
Arash Rafiey Permutation and Combinations