Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

2 - Counting

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

Counting techniques

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

• Denote number of elements in A


by n(A)
Example
If A = {1, 3, 9} then n(A) = 3
• if A = ∅ then n(A) = 0

4 / 45
Notation

• Denote number of elements in A


by n(A)
Example
If A = {1, 3, 9} then n(A) = 3
• if A = ∅ then n(A) = 0

4 / 45
Notation

• Denote number of elements in A


by n(A)
Example
If A = {1, 3, 9} then n(A) = 3
• if A = ∅ then n(A) = 0

4 / 45
Inclusion–Exclusion
Principle

n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

5 / 45
Proof

• n(A ∪ B): the number of elements in


either A or B
• In n(A) + n(B), an element lies in both
A and B, it is counted twice
• To make up for this double counting,
we must subtract the number of
elements counted twice, namely,
n(A ∩ B)
• So n(A ∪ B) = n(A) + n(B) − n(A ∩ B)6 / 45
Example
In the year 2012, Executive magazine
surveyed the presidents of the 500 largest
corporations in the United States. Of
these 500 people, 310 had degrees (of
any sort) in business, 238 had under-
graduate degrees in business, and 184
had graduate degrees in business. How
many presidents had both undergrad-
uate and graduate degrees in business

7 / 45
Solution

• A = {presidents with an undergraduate


degree in business}
• B ={presidents with a graduate degree
in business}.
then A ∪ B = {presidents with at least one
degree in business} and
A ∩ B = {presidents had both undergraduate
and graduate degrees in business}
8 / 45
We have
n(A) = 238, n(B) = 184, n(A∪B) = 310
By inclusion - exclusion principle, we
have
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
So
n(A∩B) = n(A)+n(B)−n(A∪B) = 238+1

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

The number of Americans who received


a Nobel Prize is the total contained in
the circle A , which is 236+26+1+60
= 323.
14 / 45
Practice

1 How many Americans received


Nobel Prizes in fields other than
chemistry and peace during this
period?
2 How many Americans received
the Nobel Peace Prize during
this period? 15 / 45
Practice
Among 170 clients
using media, there are
115 use television (T),
100 use radio (R), 130
use magazines (M), 75
use television and radio,
95 use radio and
Complete the Venn
magazines, 85 use
diagram to display
television and
the clients’ use of
magazines, 70 use all
mass media.
three 16 / 45
Table of contents
1 A Fundamental Principle of Count-
ing
2 Venn Diagrams and Counting
3 The Multiplication Principle
4 Permutations and Combinations

17 / 45
Example - Routes between Cities

Suppose that there are three different


routes from city A to city B and five
different routes from city B to city C.

Count the number of different routes


from A to C that pass through B
18 / 45
Solution

All possible routes is


 
 (1, 4) (1, 5) (1, 6) (1, 7) (1, 8) 
(2, 4) (2, 5) (2, 6) (2, 7) (2, 8)
(3, 4) (3, 5) (3, 6) (3, 7) (3, 8)
 

The number of routes is 3 × 5 = 15 19 / 45


Example - Experiment in Two Parts
Consider an experiment that has the
following two characteristics:
i The experiment is performed in
two parts.
ii The first part of the experiment
has m possible outcomes
x1, . . . , xm, and, regardless of
which one of these outcomes xi
occurs, the second part of the
experiment has n possible
outcomes y1, . . . , yn.
20 / 45
Each outcome in the sample space Ω
of such an experiment will therefore
be a pair having the form (xi, yj)
 

 (x1, y1) (x1, y2) . . . (x1, yn) 

(x2, y1) (x2, y2) . . . (x2, yn)
 
Ω=

 ... 

(xm, y1) (xm, y2) . . . (xm, yn)
 

Total number of outcomes in Ω is


n(Ω) = mn
21 / 45
Tree diagram in which end-nodes represent

outcomes

22 / 45
Multiplication rule

• Suppose there is a job that has 2


steps
• There are m ways to do step 1
• There are n ways to do step 2
• There are m × n ways to do the
job.

23 / 45
Multiplication rule

• Suppose there is a job that has 2


steps
• There are m ways to do step 1
• There are n ways to do step 2
• There are m × n ways to do the
job.

23 / 45
Multiplication rule

• Suppose there is a job that has 2


steps
• There are m ways to do step 1
• There are n ways to do step 2
• There are m × n ways to do the
job.

23 / 45
Multiplication rule

• Suppose there is a job that has 2


steps
• There are m ways to do step 1
• There are n ways to do step 2
• There are m × n ways to do the
job.

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

A corporation has a board of direc-


tors consisting of 10 members. The
board must select from among its mem-
bers a chairperson, vice chairperson,
and secretary. In how many ways can
this be done?

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

Number of ways is 10 × 9 × 8 = 720

28 / 45
Example

There are 6 balls of different colors.


How many ways to arrange them on
a straight line?

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

A telecommunications channel trans-


mits digits that are either 0 or 1. A se-
quence of four digits is transmitted.

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

The number of permutations of n ob-


jects taken r at a time is
P(n, r) = n(n − 1) . . . (n − r + 1)

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

The board of directors of a corpora-


tion has 10 members. In how many
ways can they choose a committee of
three board members to negotiate a
merger?

41 / 45
Example

The board of directors of a corpora-


tion has 10 members. In how many
ways can they choose a committee of
three board members to negotiate a
merger?

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

Eight horses are entered in a race in


which a first, second, and third prize
will be awarded. Assuming no ties,
how many different outcomes are pos-
sible?

42 / 45
Example

Eight horses are entered in a race in


which a first, second, and third prize
will be awarded. Assuming no ties,
how many different outcomes are pos-
sible?

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

P(8, 3) = 8.7.6 = 336

43 / 45
Practice

A club has 10 members. In how many


ways can they choose a slate of four
officers, consisting of a president, vice
president, secretary, and treasurer?

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

You might also like