Lec 8
Lec 8
st
Dept. of Cyber Security 1 Class 2023-2024
M.SC. Suha Alhussieny LEC .8
Counting techniques
In the previous lesson, we learned that the classical approach to assigning
probability to an event involves determining the number of elements in the
event and the sample space. There are many situations in which it would be
too difficult and/or too tedious to list all of the possible outcomes in a sample
space. when the sample space or event space are very large, that it isn’t
feasible to write it out. In that case, it helps to have mathematical tools for
counting the size of the sample space and event space. These tools are known
as counting techniques.
1-The multiplication
If an experiment takes place in k stages with ni possible outcomes at stage i,
the total number of possible outcomes is n1⋅n2⋅⋯⋅nk
Example 2: A restaurant offers 3 choices for appetizer, 2 for main course, and
5 for dessert. How many meal variations are possible if a diner chooses 1 of
each?
1
solution:
There are 3 × 2 × 5 = 30 different meal variations.
Example 4:
2
2- Permutations
The word ‘permutations’ means ‘arrangements’. We use it to refer to the
number of ways of arranging a set of objects. In other words, we use
permutations when we are concerned about ‘order’.
Permutation of n objects
an ordered arrangement of the n objects
3
We often call such a permutation a “permutation of n objects
taken n at a time,” .
Factorial, written n!
n!=n⋅(n−1)⋅(n−2)⋯2⋅1
Permutation of n objects taken r at a time
ordered arrangement of different objects in positions. The
number of such permutations is:
6! = 6*5*4*3*2*1= 720
4
Example 2: Permutation for Race Cars
Assume that 10 cars are in a race. In how many ways can three cars finish in
first, second and third place?
Solution
Solution
The order in which the officers are chosen matters so this is a permutation.
3- Combinations
Combinations is a technical term meaning ‘selections’. We use it to refer to
the number of different sets of a certain size that can be selected from a larger
collection of object where order does not matter.
5
Example 1 : Combination for Picking Books
A student has a summer reading list of eight books. The student must read five
of the books before the end of the summer. In how many ways can the student
read five of the eight books?
Solution
The order of the books is not important, only which books are read. This is a
combination of eight items taking five at a time.
6
Example 3: Permutation or Combination for Choosing Men and Women
A class consists of 15 men and 12 women. In how many ways can two men
and two women be chosen to participate in an in-class activity?
Solution
This is a combination since the order in which the people is chosen is not
important.
Choose two men:
7
Example 4: Twelve (12) patients are available for use in a research study.
Only seven (7) should be assigned to receive the study treatment. How many
different subsets of seven patients can be selected?