2 - Counting
2 - Counting
2 - Counting
1 / 45
Why need counting
• Suppose (Ω, P) has equally
likely outcomes.
• To calculate P(E), we need to
count the number of elements in
E and Ω.
• Need to learn counting
technique.
2 / 45
Why need counting
• Suppose (Ω, P) has equally
likely outcomes.
• To calculate P(E), we need to
count the number of elements in
E and Ω.
• Need to learn counting
technique.
2 / 45
Why need counting
• Suppose (Ω, P) has equally
likely outcomes.
• To calculate P(E), we need to
count the number of elements in
E and Ω.
• Need to learn counting
technique.
2 / 45
Table of contents
1 A Fundamental Principle of Count-
ing
2 Venn Diagrams and Counting
3 The Multiplication Principle
4 Permutations and Combinations
3 / 45
Notation
4 / 45
Notation
4 / 45
Notation
4 / 45
Inclusion–Exclusion
Principle
5 / 45
Proof
7 / 45
Solution
9 / 45
Table of contents
1 A Fundamental Principle of Count-
ing
2 Venn Diagrams and Counting
3 The Multiplication Principle
4 Permutations and Combinations
10 / 45
Basic regions
Each Venn diagram divides the sam-
ple space U into a certain number of
regions.
11 / 45
Example
Let
• U = {Nobel laureates during the
period 1901–2011}
• A = American Nobel laureates
during the period 1901–2011
• C = Chemistry Nobel laureates
during the period 1901–2011
• P = Nobel Peace Prize laureates
during the period 1901–2011
12 / 45
How many Americans received a No-
bel Prize during the period 1901–2011?
13 / 45
Solution
17 / 45
Example - Routes between Cities
outcomes
22 / 45
Multiplication rule
23 / 45
Multiplication rule
23 / 45
Multiplication rule
23 / 45
Multiplication rule
23 / 45
General multiplication
rule
Suppose that a task consists of k steps
performed consecutively. Suppose that
step 1 can be performed in m1 ways;
for each of these, step 2 in m2 ways;
for each of these, step 3 in m3 ways;
and so forth. Then the task can be
performed in
m = m1m2 . . . mk
ways
24 / 45
Example
25 / 45
Solution
• The task Select the three
officers can be divided into
three consecutive steps
Select chairperson → Select
vice chairperson → Select
secretary
• Step 1: there are 10 ways to
select chairperson
• After select chairperson, there
are 9 directors left
• Step 2: three are 9 ways to
select vice chairperson
26 / 45
• After this step, there are 8
directors who are possible
candidates for secretary
• Step 3: there are 8 ways to
select secretary
• the number of possible ways to
perform the sequence of three
choices equals 10 .9 . 8, or 720
• So the officers of the board can
be selected in 720 ways.
27 / 45
Sequential selection process
28 / 45
Example
29 / 45
Solution
• Think of a line with 6 positions
• 6 ways to choose ball for 1st
position
• 5 ways for 2nd position, 4 for
3rd ...
• Total 6 · 5 · 4 . . . 2 · 1 = 6! = 720
ways
30 / 45
Solution
• Think of a line with 6 positions
• 6 ways to choose ball for 1st
position
• 5 ways for 2nd position, 4 for
3rd ...
• Total 6 · 5 · 4 . . . 2 · 1 = 6! = 720
ways
30 / 45
Solution
• Think of a line with 6 positions
• 6 ways to choose ball for 1st
position
• 5 ways for 2nd position, 4 for
3rd ...
• Total 6 · 5 · 4 . . . 2 · 1 = 6! = 720
ways
30 / 45
Solution
• Think of a line with 6 positions
• 6 ways to choose ball for 1st
position
• 5 ways for 2nd position, 4 for
3rd ...
• Total 6 · 5 · 4 . . . 2 · 1 = 6! = 720
ways
30 / 45
Sequential selection process
Number of ways is 6 · 5 · 4 . . . 2 · 1 =
6! = 720
31 / 45
Practice
32 / 45
Assuming that the outcomes are equiprob
able. Find the probability that
1 all transmitted digits are the
same?
2 no two consecutive digits are
the same?
3 there are at least three
successive 1’s transmitted?
4 there are exactly three
successive 1’s transmitted?
33 / 45
Table of contents
1 A Fundamental Principle of Count-
ing
2 Venn Diagrams and Counting
3 The Multiplication Principle
4 Permutations and Combinations
34 / 45
Example
Problem A
How many words (by which we
mean strings of letters) of two
distinct letters can be formed from
the letters a, b, c?
Problem B
Problem B A construction crew has
three members. A team of two must
be chosen for a particular job. In
35 / 45
Solution
Enumerate all possibilities
Problem A
There are six possible words
ab ac ba bc ca cb
Problem B
Designate the three crew members
by a, b, and c. Then there are three
possible two-person teams 36 / 45
Both problems are concerned with count-
ing the numbers of arrangements of
the elements of the set {a, b, c}, taken
two at a time, without allowing repe-
tition. (For example, aa was not al-
lowed.) However, in Problem A, the
order of the arrangement mattered,
whereas in Problem B it did not. Ar-
rangements of the sort considered in
Problem A are called permutations,
whereas those in Problem B are called
combinations.
37 / 45
Permutation
Given a set of n distinguishable ob-
jects. Then a permutation of n ob-
jects taken r at a time is an arrange-
ment of r of the n objects in a specific
order.
Combination
A combination of n objects taken r
at a time is a selection of r objects
from among the n, with order disre-
garded. 38 / 45
Permutation formula
39 / 45
Combination formula
The number of combinations of n ob-
jects taken r at a time is
P(n, r) n . . . (n − r + 1)
C(n, r) = =
r! r(r − 1) . . . 1
Another convenient formula
n!
C(n, r) =
r!(n − r)!
n
Alternative notation of C(n, r) is r
read ”n choose r” 40 / 45
Example
41 / 45
Example
41 / 45
Solution
Since the committee of three
involves no ordering of its members,
we are concerned here with
combinations. The number of
combinations of 10 people taken 3 at
a time is C(10, 3) = 120
42 / 45
Example
42 / 45
Example
42 / 45
Solution
we are considering ordered
arrangements of three horses, so we
are dealing with permutations. The
number of permutations of eight
horses taken three at a time is
43 / 45
Practice
43 / 45
Practice
Suppose that an experiment consists
of tossing a coin 10 times and observ-
ing the sequence of heads and tails.
1 How many different outcomes
are possible?
2 How many different outcomes
have exactly four heads?
44 / 45
Practice
An urn contains 25 numbered balls,
of which 15 are red and 10 are white.
A sample of 5 balls is to be selected.
1 How many different samples are
possible?
2 How many samples contain all
red balls?
3 How many samples contain 3
red balls and 2 white balls?
4 How many samples contain at
least 4 red balls?
45 / 45