Unordered Selection - Discrete Mathematics - Lecture Slides, Slides of Discrete Mathematics

During the study of discrete mathematics, I found this course very informative and applicable.The main points in these lecture slides are:Unordered Selection, Permutations

Typology: Slides

2012/2013

Uploaded on 04/27/2013

atasi
atasi 🇮🇳

4.6

(32)

134 documents

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE115/ENGR160 Discrete Mathematics
04/17/12
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Unordered Selection - Discrete Mathematics - Lecture Slides and more Slides Discrete Mathematics in PDF only on Docsity!

CSE115/ENGR160 Discrete Mathematics

6.3 Permutations & Combinations

• Counting:

  • Find out the number of ways to select a particular

number of elements from a set

  • Sometimes the order of these elements matter

• Example:

  • How many ways we can select 3 students from a

group of 5 students?

  • How many different ways they stand in line for

picture?

Permutation

• How many ways can we arrange all 5 in a line

for a picture?

• By product rule, we have 5x4x3x2x1=120 ways

to arrange all 5 students in a line for a picture

Permutation

  • A permutation of a set of distinct objects is an

ordered arrangement of these objects

  • An ordered arrangement of r elements of a set is

called an r-permutation

  • The number of r-permutation of a set with n element

is denoted by P(n,r). We can find P(n,r) using the

product rule

  • Example: Let S={1, 2, 3}. The ordered arrangement 3,

1, 2 is a permutation of S. The ordered arrangement

3, 2, is a 2-permutation of S

r-permutation

  • Theorem 1: If n is a positive and r is an integer with

1 ≤r≤n, then there are

P(n,r)=n(n-1)(n-2)…(n-r+1)

r-permutations of a set with n elements

  • Proof: Use the product rule, the first element can

be chosen in n ways. There are n-1 ways to chose

the 2 nd^ element. Likewise, there are n-2 ways to

choose 3 rd^ element, and so on until there are

exactly n-(r-1)=n-r+1 ways to choose the r-th

element. Thus, there are n∙(n-1)∙(n-2)… ∙(n-r+1)

r-permutations of the set 7

r-permutation

  • Note that p(n,0)=1 whenever n is a nonnegative

integer as there is exactly one way to order zero

element

  • Corollary 1: If n and r are integers with 0≤r≤n, then

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

  • Proof: When n and r are integers with 1 ≤r≤n, by

Theorem 1 we have

P(n,r)=n(n-1)…(n-r+1)=n!/(n-r)!

  • As n!/(n-0)!=1 when n is a nonnegative integer,

we have P(n,r)=n!/(n-r)! also holds when r=

Example

• How many permutations of the letters

ABCDEFGH contain string ABC?

• As ABC must occur as a block, we can find the

answer by finding the permutations of 6

letters, the block ABC and the individual

letters, D,E,F,G, and H. As these 6 objects must

occur in any order, there are 6!=

permutations of the letters ABCDEFGH in

which ABC occurs in a block

Combinations

  • How many different committees of 3 students can be formed

from a group of 4 students?

  • We need to find the number of subsets with 3 elements from

the set containing 4 students

  • We see that there are 4 such subsets, one for each of the 4

students as choosing 4 students is the same as choosing one

of the 4 students to leave out of the group

  • This means there are 4 ways to choose 3 students for the

committee, where th order in which these students are

chosen does not matter

Example

• Let S be the set {1, 2, 3, 4}. Then {1, 3, 4} is a

3-combination from S

• We see that C(4,2)=6, as the 2-combination of

{a, b, c, d} are 6 subsets {a, b}, {a, c}, {a, d}, {b,

c}, {b, d}, and {c, d}

r-combination

• We can determine the number of r-

combinations of a set with n elements using

the formula for the number of r-permutations

of a set

• Note that the r-permutations of a set can be

obtained by first forming r-combinations and

then ordering the elements in these

combinations

r-combination

• When computing r-combination

thus canceling out all the terms in the larger

factorial

16

r

n n n r r

P n r r n r

C n r n = = − − + −

Example

• How many poker hands of 5 cards can be dealt

from a standard deck of 52 cards? Also, how

many ways are there to select 47 cards from a

standard deck of 52 cards?

• Choose 5 out of 52 cards: C(52,5)=52!/(5!47!)=

(52x51x50x49x48)/(5x4x3x2x1)=26x17x10x

x12=2,598,

• C(52,47)=52!/(47!5!)=2,5,98,

Combinatorial proof

• A combinatorial proof of an identity is a proof

that uses counting arguments to prove that

both sides of the identity count the same

objects but in different ways

• Proof of Corollary 2: Suppose that S is a set

with n elements. Every subset A of S with r

elements corresponds to a subset of S with n-r

elements, i.e.,. Thus, C(n,r)=C(n,n-r)

19

A

Example

• How many ways are there to select 5 players

from a 10-member tennis team?

• Choose 5 out of 10 elements, i.e., C(10,

• How many bit strings of length n contain

exactly r 1s?

• This is equivalent to choose r elements from n

elements, i.e., C(n,r)