0% found this document useful (0 votes)
9 views10 pages

Data Structure Lect15

Uploaded by

Hasnain Nisar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Data Structure Lect15

Uploaded by

Hasnain Nisar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Discrete Structure

Lecture 15
Topics
 Pigeon Hole Principal

 Permutation

 Example of Permutation

 Combinations

 Examples of Combination

 Binomial Coefficients
Permutation
A permutation of a set of distinct objects is an ordered arrangement of these objects.
We also are interested in ordered arrangements of some of the elements of a set. An
ordered arrangement of r elements of a set is called an r-permutation.

If n and r are integers with 0 ≤ r ≤ n,

then

P (n, r) = n! .
(n − r)!
Example 1
How many ways are there to select a first-prize winner, a second-prize winner,
and a third-prize winner from 5 different people who have entered a contest?

A B C D E

___________ , ___________, __________


1st Position 2nd Position 3rd Position

P (5, 3) = 100 · 99 · 98 = 970,200.


Example 1A
How many ways are there to select a first-prize winner, a second-prize winner,
and a third-prize winner from 100 different people who have entered a contest?

____100_______ , ____99_______ , _____98_____


1st Position 2nd Position 3rd Position
100 x 99 x 98 = 970,200

P (100, 3) = 100 ! = 100 x 99 x 98 x 97! = 100 · 99 · 98 = 970,200


(100-3)! 97!
Example 2
There are 5 Persons ABCDE and a 5 positions to take their picture. How many
ways the group can be formed.

Solution:
Five persons A B C D E
Five positions ____,___, ____, ___, ____
5 4 3 2 1
5 x4 x 3x 2 x 1 = 120
nP = 5P5 = 5! = 5! = 120 = 120
r
(5-5)! 0! 1
IF n=r then
nP = n! = n! = n!
r
(n-r)! (n-n)! 1
Example 2
Suppose that there are eight runners in a race. The winner receives a gold
medal, the second place finisher receives a silver medal, and the third-place
finisher receives a bronze medal. How many different ways are there to award
these medals, if all possible outcomes of the race can occur and there are no
ties?

Solution:
The number of different ways to award the medals is the number of 3-
permutations of a set with eight elements. Hence, there are
P (8, 3) = 8 · 7 · 6 = 336
possible ways to award the medals.
Example 3
How many permutations of the letters ABCDEFGH contain the string ABC ?

Solution:
Because the letters ABC must occur as a block, we can find the answer by finding
the number of permutations of six objects, namely, the block ABC and the
individual letters D, E, F, G, and H.
Because these six objects can occur in any order, there are 6! = 720 permutations
of the letters ABCDEFGH in which ABC occurs as a block.
Example 4
In how many ways can we select three students from a group of eight students to
stand in line for a picture? In how many ways can we arrange all 8 of these students
in a line for a picture?

To arrange all eight students in a line for a picture, we select the first student in
eight ways, the second in seven ways, the third six ways, the fourth in five ways,
the fifth in four ways, sixth in three ways , seventh in 2 ways and eighth in 1 ways.
Consequently, there are
8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40320 ways to arrange all eight students in a line for a
picture.
Permutation

Order of placement the object is important.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy