41
Permutation and Combinations Arash Rafiey August 27, 2015 Arash Rafiey Permutation and Combinations

Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

Embed Size (px)

Citation preview

Page 1: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

Permutation and Combinations

Arash Rafiey

August 27, 2015

Arash Rafiey Permutation and Combinations

Page 2: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 3: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 4: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 5: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 6: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 7: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 8: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 9: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 10: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 11: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 12: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

Show that(nm

)=

(n−1m

)+

(n−1m−1

)

Show that(nm

)=

m∑i=0

(n−m−1+ii

).

Arash Rafiey Permutation and Combinations

Page 13: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

Show that(nm

)=

(n−1m

)+

(n−1m−1

)Show that

(nm

)=

m∑i=0

(n−m−1+ii

).

Arash Rafiey Permutation and Combinations

Page 14: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 15: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 16: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 17: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 18: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 19: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 20: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 21: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 22: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 23: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 24: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 25: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 26: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 27: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 28: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 29: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 30: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 31: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 32: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 33: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 34: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 35: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 36: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 37: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 38: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 39: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

4) Show thatn∑

k=0

k(nk

)= n2n−1

Arash Rafiey Permutation and Combinations

Page 40: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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

Page 41: Permutation and Combinations - Computer Sciencecs.indstate.edu/~arash/adslec3.pdf · Permutation and Combinations Definition A permutation of a set of distinct objects is any rearrangement

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