Anda di halaman 1dari 41

Basic Counting Rules

Pigeonhole Principle
Permutation
Combination
Basics of Counting, Pigeonhole Principle,
Permutation, Combination
Richard Bryann Chua
CS 55 (Discrete Mathematical Structures)
June 8, 2010
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Outline
1
Basic Counting Rules
2
Pigeonhole Principle
3
Permutation
4
Combination
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
Denition
(Sum Rule) If there are |A| ways to do A and |B| ways to do B,
and these tasks cannot be done at the same time, then the
number of ways to do either task is |A| + |B|. This can be
expanded to any number of terms.
Denition
(Product Rule) Suppose that a procedure can be broken into 2
tasks. If there are |A| ways to do A, and |B| ways to do B after
the rst task has been done, then there are |A| |B| ways to do
the procedure. This can be expanded to any number of terms.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
Denition
(Sum Rule) If there are |A| ways to do A and |B| ways to do B,
and these tasks cannot be done at the same time, then the
number of ways to do either task is |A| + |B|. This can be
expanded to any number of terms.
Denition
(Product Rule) Suppose that a procedure can be broken into 2
tasks. If there are |A| ways to do A, and |B| ways to do B after
the rst task has been done, then there are |A| |B| ways to do
the procedure. This can be expanded to any number of terms.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
Determine how many 3-digit numbers can be formed from
the digits 1 to 9 if no digit is to be repeated? if to be
repeated?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
Aling Lita is opening a restaurant with a lunch hour special.
For Php60, a customer has a choice of rice (plain or fried),
a main dish and dessert. There are 3 main dishes: chicken
adobo, pork chop, chicken barbeque, and 2 desserts: fruit
salad and leche an. How many different combination
meals are possible?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
A telephone company wants to set up a system for a
certain province. Company ofcials are thinking of using a
system where each telephone number has 6 digits: the
rst 2 digits with 44, 45, 47 or 49 and the last 4 digits being
any number from 1-9. What is the largest number of
customers that the system can service?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
A certain company uses identication numbers consisting
of 4 different digits for all its employees. Male employees
have odd ID numbers while female employees have even
ID numbers. Furthermore, the rank and le employees
have ID numbers that begin with 3, 4, 5, 6, or 7. What is
the maximum number of female rank and le employees
that can be given ID numbers?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
2 Basic Counting Rules
On a certain computer system a valid password is a
sequence of between 6 and 8 symbols. The rst symbol
must be a letter (which can be lowercase or uppercase),
and the remaining symbols must be either letters or digits.
How many different passwords are possible?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Outline
1
Basic Counting Rules
2
Pigeonhole Principle
3
Permutation
4
Combination
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Pigeonhole Principle
Theorem
If k +1 or more objects are placed into k boxes, then there is at
least one box containing 2 or more of the objects.
Proof: (By contradiction) Suppose that none of the k boxes
contain more than one object then the total number of objects
would be k. This is a contradiction since we have k +1 or more
objects.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Pigeonhole Principle
Theorem
If k +1 or more objects are placed into k boxes, then there is at
least one box containing 2 or more of the objects.
Proof: (By contradiction) Suppose that none of the k boxes
contain more than one object then the total number of objects
would be k. This is a contradiction since we have k +1 or more
objects.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Pigeonhole Principle
How many students must be in a class to guarantee that at
least 2 students receive the same score on the nal exam,
if the exam is graded on a scale from 0-100 points?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Pigeonhole Principle
How many people must be in an organization to ensure
that at least 2 of them have the same birthday?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Pigeonhole Principle
How many English words do you need to ensure that 2
words start with the same letter?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Generalized Pigeonhole Principle
Theorem
(Generalized Pigeonhole Principle) If N objects are placed
into k boxes, then there is at least 1 box containing N/k
objects.
Proof: (By contradiction) Suppose that none of the k boxes contains more than N/k 1 objects, then the total
number of objects is at most k(N/k 1). Note that

N
k

<
N
k
+ 1

N
k

1 <
N
k
+ 1 1
k

N
k

< k

N
k
+ 1 1

= N
This is a contradiction since there are N objects.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Generalized Pigeonhole Principle
Theorem
(Generalized Pigeonhole Principle) If N objects are placed
into k boxes, then there is at least 1 box containing N/k
objects.
Proof: (By contradiction) Suppose that none of the k boxes contains more than N/k 1 objects, then the total
number of objects is at most k(N/k 1). Note that

N
k

<
N
k
+ 1

N
k

1 <
N
k
+ 1 1
k

N
k

< k

N
k
+ 1 1

= N
This is a contradiction since there are N objects.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Generalized Pigeonhole Principle
Among 100 people, what is the minimum number of people
that were born in the same month?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Generalized Pigeonhole Principle
What is the minimum number of students required in a
class to be sure there are at least 6 who will receive the
same grade, if there are 5 possible grades, A, B, C, D and
F?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Generalized Pigeonhole Principle
What is the least number of area codes needed to
guarantee that 25M phones in a state have distinct 10-digit
telephone number? (Assume that telephone numbers are
of the form NXX-NXX-XXXX, where the rst 3 digits form
the area code, N represents a digit from 2 to 9 inclusive,
and X represents any digit.)
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Outline
1
Basic Counting Rules
2
Pigeonhole Principle
3
Permutation
4
Combination
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Permutation
Denition
Suppose there is an arrangement of k objects taken from a set
of n different objects, the order of arrangement is important.
Then such an arrangement is called a permutation. The total
number of permutations of n objects taken k at a time will be
denoted by P(n, k).
Theorem
The number of permutations of n distinct objects taken k at a
time is given by
P(n, k) =
n!
(n k)!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Permutation
Denition
Suppose there is an arrangement of k objects taken from a set
of n different objects, the order of arrangement is important.
Then such an arrangement is called a permutation. The total
number of permutations of n objects taken k at a time will be
denoted by P(n, k).
Theorem
The number of permutations of n distinct objects taken k at a
time is given by
P(n, k) =
n!
(n k)!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Permutation
There are 4 runners in a race. How many results are
possible for rst, second and third place?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Permutation
In how many ways can 7 books be chosen from 18
different books and arranged in 7 spaces on a bookshelf?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Permutation
In how many ways can 4 boys and 4 girls be seated in a
row if
1
they may sit anywhere?
2
the boys and girls must alternate?
3
the girls must be together?
4
a particular boy B and a particular G cannot sit beside each
other?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Division Rule
Denition
(Division Rule) If k permutations of A all point to one event in
B, then |B| = |A|/k.
In how many different ways can you place 2 identical rooks
on a chessboard so that they do not share a row or
column?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Circular Permutation
Theorem
The number of ways to arrange n objects in circle is (n 1)!.
Proof: Let A be the linear arrangement of the n objects. Let B
be the circular arrangement of the n objects.
|B| =
|A|
n
=
n!
n
=
n(n 1)!
n
= (n 1)!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Circular Permutation
In how many ways can 4 people be seated in a circle?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Circular Permutation
In how many ways can 4 boys and 7 girls be seated
around a circular table if:
1
there are no restrictions?
2
the girls form a single block?
3
no 2 boys are adjacent?
4
a particular boy and a particular girl must not be adjacent?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Identical Permutation
Theorem
Let l
1
, . . . , l
m
be distinct elements. The number of sequences
with k
1
occurrences of l
1
, and k
2
occurrences of l
2
, . . ., and k
m
occurrences of l
m
is
(k
1
+ k
2
+ . . . + k
m
)!
k
1
!k
2
!, . . . , k
m
!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Identical Permutation
Liza has to arrange 3 red, and 2 yellow banners in a row.
How many different patterns are there?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Identical Permutation
Find the number of distinct permutations of the letters in
the word SITSIRITSIT?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Outline
1
Basic Counting Rules
2
Pigeonhole Principle
3
Permutation
4
Combination
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
Denition
A combination of n objects taken k at a time is a subset of k
elements selected from a set of n elements. The total number
of k-subsets of a set of n elements will be denoted by C(n, k)
or

n
k

.
Theorem
The number of combinations of n distinct objects taken k at a
time is given by
C(n, k) =
n!
k!(n k)!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
Denition
A combination of n objects taken k at a time is a subset of k
elements selected from a set of n elements. The total number
of k-subsets of a set of n elements will be denoted by C(n, k)
or

n
k

.
Theorem
The number of combinations of n distinct objects taken k at a
time is given by
C(n, k) =
n!
k!(n k)!
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
A committee of 5 is to be chosen from 12 members of
Congress, 3 of whom are senators. How many ways can
this be done if at least 2 of the committee members must
be senators?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
There are 20 points in a plane, no 3 of which are collinear.
How many different line segments can be drawn having
these points as endpoints?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
How many 5-letter words can be formed if exactly 2 of the
letters are vowels? Assume that repetition of letters is
allowed.
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
In how many ways can you form a 4-of-a-kind from a
standard deck?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination
Basic Counting Rules
Pigeonhole Principle
Permutation
Combination
Combination
In how many ways can you form a full house from a
standard deck?
Richard Bryann Chua CS 55 (Discrete Mathematical Structures) Basics of Counting, Pigeonhole Principle, Permutation, Combination

Anda mungkin juga menyukai