Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

ISTANBUL AYDIN UNIVERSITY

FACULTY OF ENGINEERING
ELECTRICAL & ELECTRONICS ENGINEERING DEPT.

EEE247: DISCRETE MATHEMATICS

Basic of Counting- II

Instructor:
Dr. Mohammed Alkrunz
Electrical & Electronics Engineering Dept.
Permutation & Combinations
 A permutation of a set “S” of objects is a sequence that contains each
object in “S” exactly once. [No Repetition]

 An ordered arrangement of “r” distinct elements of “S” is called r-


permutation of “S”.

 The number of r-permutations of a set “S” with 𝑛 = 𝑆 elements is:

𝒏!
𝑷 𝒏, 𝒓 = 𝒏 𝒏 − 𝟏 𝒏 − 𝟐 … … … 𝒏 − 𝒓 + 𝟏 =
𝒏−𝒓 !

Dr. M. Alkrunz
07.12.2019 2
EEE247: Discrete Mathematics
Urn Models
 We are given a set of “n” objects in an urn.

 We are going to pick (select) “r” objects from the urn in sequence.

 After we choose an object:

 We can replace it (Selection with replacement). [Probability Course]

 Or not (Selection without replacement. [This case is considered]

 How many different possible sequence for “r” objects are there?!!!

 Does the order of the objects matter or not?!!!

Dr. M. Alkrunz
07.12.2019 3
EEE247: Discrete Mathematics
Urn Models
 Two common counting problem associated with the selection without
replacement of “r” objects from the urn with “n” objects.

[Permutation of the objects]

 How many different arrangements (Ordered Lists) of “r” objects can be


formed from a set of “n” distinct objects?

[Combination of the objects]

 How many different selections (Unordered Lists) of “r” objects can be


made from a set of “n” distinct objects?
Dr. M. Alkrunz
07.12.2019 4
EEE247: Discrete Mathematics
Permutation
Permutation:

 It is an arrangement or ordering of “n” distinct objects.

 If 𝑟 ≤ 𝑛, then the arrangement using “r” of the “n” distinct objects is called
r-permutation.

 The number of different r-permutations of a set of “n” distinct elements is


denoted as 𝑃(𝑛, 𝑟),

𝒏!
𝑷 𝒏, 𝒓 = 𝒏 𝒏 − 𝟏 𝒏 − 𝟐 … … … 𝒏 − 𝒓 + 𝟏 =
𝒏−𝒓 !

Dr. M. Alkrunz
07.12.2019 5
EEE247: Discrete Mathematics
Permutation
Example:
If a bomb planted in your city, and it is your job to disable it by cutting wires
of the trigger device. There are 10 wires to the bomb. If you cut exactly the
right 3 wires, in exactly the right order, you will disable the bomb. Otherwise,
it will explode!!
If the wires all look the same, what are your chances of survivals?!!

 The number of ordered cutting from 10 wires:

𝑛! 10! 10!
𝑃 10, 3 = = = = 720
𝑛−𝑟 ! 10 − 3 ! 7!
1
 Chance of survival is: ∗ 100% = 0.13%
720
Dr. M. Alkrunz
07.12.2019 6
EEE247: Discrete Mathematics
Permutation
Example:

How many different 3-digits numbers can be formed using the digits 5, 6, 7, 8,
9 without repetition?!!

𝑛! 5! 5!
𝑃 5, 3 = = = = 60
𝑛−𝑟 ! 5 − 3 ! 2!

If you remember the previous technique, it gives the same answer:

5 4 3

Dr. M. Alkrunz
07.12.2019 7
EEE247: Discrete Mathematics
Combinations
Combination:
 Now, we turn our attention to counting unordered selections of objects.
 In order the idea to be clear, consider the following example:
Example:
How many different committees of the 3 students can be formed from a
group of 4 students?!!
 To answer this question, we need only to find the number of subsets with
three elements from the set containing the four students.

 𝑇 ⊆ 𝑆, 𝑇 = 3 and 𝑆 = 4

 Choosing 3 students is the same as choosing one student leave out the
group. Thus, we have four such subsets.

Dr. M. Alkrunz
07.12.2019 8
EEE247: Discrete Mathematics
Combinations
Example: (Continue)

 This means that there are four ways to choose the three students for the
committee, where the order in which these students are chosen does not
matter.

 Let "𝑆" be the set 1, 2, 3, 4 . Then, 1, 3, 4 is a 3-combination from "𝑆“.

 Note that 4, 1, 3 is the same combinations as 1, 3, 4 since the order in


which the elements of a set are listed does not matter.

Dr. M. Alkrunz
07.12.2019 9
EEE247: Discrete Mathematics
Combinations
 The number of r-combinations of a set with n-elements with 0 ≤ 𝑟 ≤ 𝑛 is:

𝑷 𝒏, 𝒓 𝒏!
𝑪 𝒏, 𝒓 = =
𝑷 𝒓, 𝒓 𝒓! 𝒏 − 𝒓 !

 Selection of r-combinations of n-elements is the same like outing (n-r)-


combination from n-elements
𝑪 𝒏, 𝒓 = 𝑪 𝒏, 𝒏 − 𝒓

Dr. M. Alkrunz
07.12.2019 10
EEE247: Discrete Mathematics
Combinations
Example:
How many distinct 7-card hands can be drown from a standard 52-cards?

𝑃 52, 7 52 51 (50)(49)(48)(47)(46)
𝐶 52, 7 = = = 133,784,560
𝑃 7, 7 (7)(6)(5)(4)(3)(2)(1)

Or

52!
𝐶 52, 7 = = 133,784,560
7! 45!

Dr. M. Alkrunz
07.12.2019 11
EEE247: Discrete Mathematics
Combinations
Example:
How many bit strings of length 4 has exactly two ones or two zeros?

4!
𝐶 4, 2 = =6
2! 2!

 They are: 0011, 0101, 1001, 0110, 1010, 1100

Example:
How many bit strings of length 10 contains 4 ones?

10!
𝐶 10, 4 = = 210
4! 6!

Dr. M. Alkrunz
07.12.2019 12
EEE247: Discrete Mathematics
Combinations
Example:
We need to form a committee of 7 people, 3 from Math, and 4 from Physics.
There are 9 Math candidates, and 11 Physics.

 Two separate problems that need to be combined using two product rule.

 𝐶(9, 3) possibilities for Math, and 𝐶(11, 4) possibilities for Physics.

9!
𝐶 9, 3 = = 84
3! 6!

11!
𝐶 11, 4 = = 330
4! 7!
𝑻𝒐𝒕𝒂𝒍 = 𝑪 𝟗, 𝟑 × 𝑪 𝟏𝟏, 𝟒 = 𝟖𝟒 × 𝟑𝟑𝟎 = 𝟐𝟕, 𝟕𝟐𝟎

Dr. M. Alkrunz
07.12.2019 13
EEE247: Discrete Mathematics
Combinations
Example:
Suppose you flip a fair coin “n” times. How many different ways can you get:
 No heads:

𝑛!
 𝐶 𝑛, 0 = = 1 [The case when all of them no heads]
𝑛! 0!

 Exactly one head:

 𝐶 𝑛, 1

 Exactly two heads:

 𝐶 𝑛, 2

 Exactly “r” heads:

 𝐶 𝑛, 𝑟
Dr. M. Alkrunz
07.12.2019 14
EEE247: Discrete Mathematics
Combinations
Example: (Continue)

 At least two heads:

 𝐶 𝑛, 2 + 𝐶 𝑛, 3 + 𝐶 𝑛, 4 + . . . . . . . . . . . . . . . +𝐶(𝑛, 𝑛) [too long]

 Or: 2𝑛 − 𝐶 𝑛, 0 − 𝐶(𝑛, 1) [where: 𝟐𝒏 is all the possibilities]

Dr. M. Alkrunz
07.12.2019 15
EEE247: Discrete Mathematics
Binomial Coefficients
 We will now study some properties of the binomial coefficients.

 First, the binomial theorem:

𝑛
𝑛
𝑛 𝑛−𝑗 𝑗 𝑛 𝑛 𝑛 𝑛−1
𝑥+𝑦 =෍ 𝑗 𝑥 𝑦 = 𝑥 + 𝑥 𝑦+ . . . . . . . . . .
0 1
𝑗=0

Where: 𝑛, 𝑗 ≥ 0 and 𝑛 ≥ 𝑗

𝑛
 𝑗 is considered as a different notation for 𝐶(𝑛, 𝑗)

Dr. M. Alkrunz
07.12.2019 16
EEE247: Discrete Mathematics
Binomial Coefficients
Example:
What is the coefficient of 𝒙𝟐 𝒚 in the expression of (𝒙 + 𝒚)𝟑 ?!!

 We know: (𝑥 + 𝑦)3 = 𝑥 3 + 𝟑𝒙𝟐 𝒚 + 3𝑥𝑦 2 + 𝑦 3

3!
 𝐶 3, 2 = 𝐶 3,1 = =3
2! 1!

Example:
What is the coefficient of 𝒙𝟏𝟐 𝒚𝟏𝟑 in the expression of (𝒙 + 𝒚)𝟐𝟓 ?!!

 Let us apply the same idea as the previous example

25!
 𝐶 25, 12 = 𝐶 25,13 = = 5,200,300
12! 13!

Dr. M. Alkrunz
07.12.2019 17
EEE247: Discrete Mathematics
Binomial Coefficients
Example:
What is the coefficient of 𝒙𝟏𝟐 𝒚𝟏𝟑 in the expression of (𝟐𝒙 − 𝟑𝒚)𝟐𝟓 ?!!

 First, replace 𝒂 = 𝟐𝒙 and 𝒃 = −𝟑𝒚

 The coefficient of 𝑎12 𝑏13 in (𝑎 + 𝑏)25 is 𝑪(𝟐𝟓, 𝟏𝟐)

𝐶 25, 12 𝑎12 𝑏13 =


𝐶 25, 12 (2𝑥)12 (−3𝑦)13 =

𝑪 𝟐𝟓, 𝟏𝟐 (𝟐)𝟏𝟐 (−𝟑)𝟏𝟑 𝑥 12 𝑦13


𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡

Dr. M. Alkrunz
07.12.2019 18
EEE247: Discrete Mathematics
Binomial Coefficients
Special Case:
𝒏
𝒏
𝟐𝒏 =෍ 𝒋
𝒋=𝟎
Proof:
We know that:
𝑛
𝑛
(𝑥 + 𝑦)𝑛 = ෍ 𝑗 𝑥 𝑛−𝑗 𝑦 𝑗
𝑗=0
Now set: 𝑥 = 1 and 𝑦 = 1, then:
𝑛 𝑛
𝑛 𝑛
2𝑛 𝑛−𝑗 𝑗
= ෍ 𝑗 (1) (1) = ෍ 𝑗
𝑗=0 𝑗=0

Dr. M. Alkrunz
07.12.2019 19
EEE247: Discrete Mathematics
Binomial Coefficients
Some Other Special Cases:

𝒏
𝒏
෍(−𝟏)𝒋 𝒋 = 𝟎 Set: 𝑥 = 1 and 𝑦 = −1
𝒋=𝟎

𝒏
𝒏
෍(𝟐)𝒋 𝒋 = 𝟑𝒏 Set: 𝑥 = 1 and 𝑦 = 2
𝒋=𝟎

Dr. M. Alkrunz
07.12.2019 20
EEE247: Discrete Mathematics
Binomial Coefficients
Pascal’s Identity: (Pascal’s Triangle)

𝒏+𝟏 𝒏 𝒏
= 𝒋−𝟏 + 𝒋
𝒋

where: 𝑛, 𝑗 ≥ 0 and 𝑛 ≥ 𝑗
Application:

(𝑥 + 𝑦)2 = 𝑥 2 + 2𝑥𝑦 + 𝑦 2 1 2 1

(𝑥 + 𝑦)3 = 𝑥 3 + 3𝑥 2 𝑦 + 3𝑥𝑦 2 + 𝑦 3 1 3 3 1

(𝑥 + 𝑦)4 = 𝑥 4 + 4𝑥 3 𝑦 + 6𝑥 2 𝑦 2 + 4𝑥𝑦 3 + 𝑦 4 1 4 6 4 1

Dr. M. Alkrunz
07.12.2019 21
EEE247: Discrete Mathematics
Binomial Coefficients
Pascal’s Identity: (Pascal’s Triangle)
As general:

(𝑥 + 𝑦)2 1 2 1

(𝑥 + 𝑦)3 1 3 3 1

(𝑥 + 𝑦)4 1 4 6 4 1

(𝑥 + 𝑦)5 1 5 10 10 5 1

(𝑥 + 𝑦)6 1 6 15 20 15 6 1

(𝑥 + 𝑦)7 1 7 21 35 35 21 7 1

……. ……….

Dr. M. Alkrunz
07.12.2019 22
EEE247: Discrete Mathematics
*Questions

Dr. M. Alkrunz
07.12.2019 23
EEE247: Discrete Mathematics
*Thanks
Dr. M. Alkrunz
07.12.2019 24
EEE247: Discrete Mathematics

You might also like