4
Fall 2002 CMSC 203 - Discrete Structures 1 Permutations Permutations How many ways are there to pick a set of 3 How many ways are there to pick a set of 3 people from a group of 6? people from a group of 6? There are 6 choices for the first person, 5 There are 6 choices for the first person, 5 for the second one, and 4 for the third one, for the second one, and 4 for the third one, so there are so there are 6 6 5 5 4 = 120 ways to do this. 4 = 120 ways to do this. This is not the correct result! This is not the correct result! For example, picking person C, then person For example, picking person C, then person A, and then person E leads to the A, and then person E leads to the same group same group as first picking E, then C, and then A. as first picking E, then C, and then A. However, these cases are counted However, these cases are counted separately separately in the above equation. in the above equation.

Fall 2002CMSC 203 - Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the

Embed Size (px)

Citation preview

Page 1: Fall 2002CMSC 203 - Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the

Fall 2002 CMSC 203 - Discrete Structures 1

PermutationsPermutations

How many ways are there to pick a set of 3 How many ways are there to pick a set of 3 people from a group of 6?people from a group of 6?

There are 6 choices for the first person, 5 for There are 6 choices for the first person, 5 for the second one, and 4 for the third one, so the second one, and 4 for the third one, so there arethere are66554 = 120 ways to do this.4 = 120 ways to do this.

This is not the correct result!This is not the correct result!

For example, picking person C, then person A, For example, picking person C, then person A, and then person E leads to the and then person E leads to the same groupsame group as as first picking E, then C, and then A.first picking E, then C, and then A.However, these cases are counted However, these cases are counted separatelyseparately in the above equation.in the above equation.

Page 2: Fall 2002CMSC 203 - Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the

Fall 2002 CMSC 203 - Discrete Structures 2

PermutationsPermutations

So how can we compute how many different So how can we compute how many different subsets of people can be picked (that is, we subsets of people can be picked (that is, we want to disregard the order of picking) ?want to disregard the order of picking) ?

To find out about this, we need to look at To find out about this, we need to look at permutations.permutations.

A A permutationpermutation of a set of distinct objects is an of a set of distinct objects is an ordered arrangement of these objects.ordered arrangement of these objects.

An ordered arrangement of r elements of a set An ordered arrangement of r elements of a set is called an is called an r-permutationr-permutation..

Page 3: Fall 2002CMSC 203 - Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the

Fall 2002 CMSC 203 - Discrete Structures 3

PermutationsPermutationsExample:Example: Let S = {1, 2, 3}. Let S = {1, 2, 3}.The arrangement 3, 1, 2 is a permutation of S.The arrangement 3, 1, 2 is a permutation of S.The arrangement 3, 2 is a 2-permutation of S.The arrangement 3, 2 is a 2-permutation of S.

The number of r-permutations of a set with n The number of r-permutations of a set with n distinct elements is denoted by distinct elements is denoted by P(n, r).P(n, r).

We can calculate P(n, r) with the product rule:We can calculate P(n, r) with the product rule:

P(n, r) = nP(n, r) = n(n – 1)(n – 1)(n – 2) (n – 2) ……(n – r + 1).(n – r + 1).

(n choices for the first element, (n – 1) for the (n choices for the first element, (n – 1) for the second one, (n – 2) for the third one…)second one, (n – 2) for the third one…)

Page 4: Fall 2002CMSC 203 - Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the

Fall 2002 CMSC 203 - Discrete Structures 4

PermutationsPermutationsExample:Example:

P(8, 3) = 8P(8, 3) = 8776 = 3366 = 336 = (8= (87766554433221)/(51)/(54433221)1)

General formula:General formula:

P(n, r) = n!/(n – r)!P(n, r) = n!/(n – r)!

Knowing this, we can return to our initial Knowing this, we can return to our initial question:question:How many ways are there to pick a set of 3 How many ways are there to pick a set of 3 people from a group of 6 (disregarding the people from a group of 6 (disregarding the order of picking)?order of picking)?