0% found this document useful (0 votes)
2 views160 pages

Combinat or Ics

The document provides an overview of combinatorics, focusing on counting techniques such as the Fundamental Theorem of Counting, the Pigeonhole Principle, permutations, combinations, and the Binomial Theorem. It emphasizes the importance of counting arrangements of objects and presents various examples and rules, including the Product Rule and the Sum Rule, to illustrate how to calculate possible outcomes in different scenarios. The content is structured with definitions, examples, and solutions to demonstrate the application of these counting principles.

Uploaded by

praisezaoneka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views160 pages

Combinat or Ics

The document provides an overview of combinatorics, focusing on counting techniques such as the Fundamental Theorem of Counting, the Pigeonhole Principle, permutations, combinations, and the Binomial Theorem. It emphasizes the importance of counting arrangements of objects and presents various examples and rules, including the Product Rule and the Sum Rule, to illustrate how to calculate possible outcomes in different scenarios. The content is structured with definitions, examples, and solutions to demonstrate the application of these counting principles.

Uploaded by

praisezaoneka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 160

COMBINATORICS

KETTIE NTHAKOMWA MTEMA

LUANAR-BUNDA

September 4, 2023

1 / 58
Outline

Fundamental Theorem of Counting (FTC)


Pigeonhole principle
Permutations
Combinations
The Binomial Theorem

2 / 58
Introduction

Combinatorics: The study of arrangements of


objects.

3 / 58
Introduction

Combinatorics: The study of arrangements of


objects.
Counting of objects with respect to certain
properties (enumeration) is a very important
aspect of combinatorics.

3 / 58
Introduction

Combinatorics: The study of arrangements of


objects.
Counting of objects with respect to certain
properties (enumeration) is a very important
aspect of combinatorics.
Counting of objects is a must in responding to
some many different types of problems.

3 / 58
Introduction

Combinatorics: The study of arrangements of


objects.
Counting of objects with respect to certain
properties (enumeration) is a very important
aspect of combinatorics.
Counting of objects is a must in responding to
some many different types of problems.
Different counting techniques are used to solve
such problems i.e. case of phone numbers,
number plates, time tabling, passwords.
3 / 58
THE Fundamental Theory of Counting

The FTC: Is a rule that is used to count the


number of possible outcomes for a given
situation.

4 / 58
THE Fundamental Theory of Counting

The FTC: Is a rule that is used to count the


number of possible outcomes for a given
situation.
It addresses the problem of counting without
actually counting the objects.

4 / 58
THE Fundamental Theory of Counting

The FTC: Is a rule that is used to count the


number of possible outcomes for a given
situation.
It addresses the problem of counting without
actually counting the objects.
With specified properties, we can figure out
how many properties there are without
actually enumerating each of them.

4 / 58
THE Fundamental Theory of Counting

The FTC: Is a rule that is used to count the


number of possible outcomes for a given
situation.
It addresses the problem of counting without
actually counting the objects.
With specified properties, we can figure out
how many properties there are without
actually enumerating each of them.
For example, consider the following scenario of
shaking hands.
4 / 58
The FTC

EXAMPLE OF SHAKING HANDS


If 2 people are to shake hands, how many
different handshakes will be there?

5 / 58
The FTC

EXAMPLE OF SHAKING HANDS


If 2 people are to shake hands, how many
different handshakes will be there?
What about 3 people?

5 / 58
The FTC

EXAMPLE OF SHAKING HANDS


If 2 people are to shake hands, how many
different handshakes will be there?
What about 3 people?
What about 10 people?

5 / 58
The FTC

EXAMPLE OF SHAKING HANDS


If 2 people are to shake hands, how many
different handshakes will be there?
What about 3 people?
What about 10 people?
What about 100 people?

5 / 58
The FTC

EXAMPLE OF SHAKING HANDS


If 2 people are to shake hands, how many
different handshakes will be there?
What about 3 people?
What about 10 people?
What about 100 people?
FTC helps us to count large collections of things
quickly and precisely.

5 / 58
The Basic Counting Rules/Techniques

THE PRODUCT RULE


This rule states that if an event A can occur in
m ways, and for each of these ways of doing
event A, there are n ways of doing event B,
then the event “A and B ”can occur in m · n
ways.

6 / 58
Product rule: Example 1

The university department has two groups of


students which are to be assigned to the 7
available Lecture Theaters. How many ways are
there to assign different Lecture Theaters to these
2 categories of students?

7 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.

8 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.
First task can be carried out in 7 ways.

8 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.
First task can be carried out in 7 ways.
Assigning a different LT to the second group
can be done in

8 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.
First task can be carried out in 7 ways.
Assigning a different LT to the second group
can be done in 6 ways.

8 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.
First task can be carried out in 7 ways.
Assigning a different LT to the second group
can be done in 6 ways.
Therefore, be definition of the product rule,
there are 7 · 6 =

8 / 58
Example 1: Solution

There are two events: assigning a LT to first


group of studets and assigning a LT to second
group of students.
First task can be carried out in 7 ways.
Assigning a different LT to the second group
can be done in 6 ways.
Therefore, be definition of the product rule,
there are 7 · 6 = 42 ways of assigning a
different LT to these two categories of
students.
8 / 58
Example 2

The chairs in Multipurpose Hall can be labelled


with an uppercase english alphabet letters
followed by a positive number not exceeding 100.
What is the largest number of chairs that can be
labelled differently?

9 / 58
Example 2: Solution

The labelling procedure has 2 events:

10 / 58
Example 2: Solution

The labelling procedure has 2 events:


Assigning one of the 26 uppercase alphabet
letters to the chair, and

10 / 58
Example 2: Solution

The labelling procedure has 2 events:


Assigning one of the 26 uppercase alphabet
letters to the chair, and
Assigning to that chair, one of the 100 possible
numbers

10 / 58
Example 2: Solution

The labelling procedure has 2 events:


Assigning one of the 26 uppercase alphabet
letters to the chair, and
Assigning to that chair, one of the 100 possible
numbers
Using the product rule, there are 26 · 100 different
ways a chair can be labeled.

10 / 58
Example 2: Solution

The labelling procedure has 2 events:


Assigning one of the 26 uppercase alphabet
letters to the chair, and
Assigning to that chair, one of the 100 possible
numbers
Using the product rule, there are 26 · 100 different
ways a chair can be labeled. Therefore, the largest
number of chairs that can be labeled differently is
2600.
10 / 58
Generalised Product rule

Suppose there are more than 2 events, i.e.


E1 , E2 , E3 , . . . E m .

11 / 58
Generalised Product rule

Suppose there are more than 2 events, i.e.


E1 , E2 , E3 , . . . E m .
If each event can be carried out in ni ways,
i = 1, 2, 3, . . . , m (one after the other,
regardless of how the previous was conducted)

11 / 58
Generalised Product rule

Suppose there are more than 2 events, i.e.


E1 , E2 , E3 , . . . E m .
If each event can be carried out in ni ways,
i = 1, 2, 3, . . . , m (one after the other,
regardless of how the previous was conducted)
Then there are n1 · n2 · n3 · ... · nm ways of
carrying out a the procedure.

11 / 58
Generalised Product rule

Suppose there are more than 2 events, i.e.


E1 , E2 , E3 , . . . E m .
If each event can be carried out in ni ways,
i = 1, 2, 3, . . . , m (one after the other,
regardless of how the previous was conducted)
Then there are n1 · n2 · n3 · ... · nm ways of
carrying out a the procedure.
Thus,
Ym
ni = n1 · n2 · n3 · ... · nm
i=1 11 / 58
Example 3

How many license plates can be made if each


plate contains a sequence of two uppercase english
alphabet letters followed by four numerical digits?

12 / 58
Example 3

How many license plates can be made if each


plate contains a sequence of two uppercase english
alphabet letters followed by four numerical digits?
Solution:

12 / 58
Example 3

How many license plates can be made if each


plate contains a sequence of two uppercase english
alphabet letters followed by four numerical digits?
Solution:
We have 26 choices for each letter and 10 choices
for each digit.

12 / 58
Example 3

How many license plates can be made if each


plate contains a sequence of two uppercase english
alphabet letters followed by four numerical digits?
Solution:
We have 26 choices for each letter and 10 choices
for each digit.
Using the product rule, we have

12 / 58
Example 3

How many license plates can be made if each


plate contains a sequence of two uppercase english
alphabet letters followed by four numerical digits?
Solution:
We have 26 choices for each letter and 10 choices
for each digit.
Using the product rule, we have
26 · 26 · 10 · 10 · 10 · 10 = 6, 760, 000
possible number plates.
12 / 58
Example 4:

How many three digit natural numbers can be


formed using the digits 1, 2, . . . , 9?

13 / 58
Example 4:

How many three digit natural numbers can be


formed using the digits 1, 2, . . . , 9?
Solution:

13 / 58
Example 4:

How many three digit natural numbers can be


formed using the digits 1, 2, . . . , 9?
Solution: Each digit is chosen in 9 ways.

13 / 58
Example 4:

How many three digit natural numbers can be


formed using the digits 1, 2, . . . , 9?
Solution: Each digit is chosen in 9 ways.
Therefore, using the product rule, there are

13 / 58
Example 4:

How many three digit natural numbers can be


formed using the digits 1, 2, . . . , 9?
Solution: Each digit is chosen in 9 ways.
Therefore, using the product rule, there are
9 · 9 · 9 = 729 three-digit natural numbers that
can be formed.

13 / 58
Example 5: Counting functions

How many functions are there from set with m


elements to a set with n elements?

14 / 58
Example 5: Counting functions

How many functions are there from set with m


elements to a set with n elements?
Solution:

14 / 58
Example 5: Counting functions

How many functions are there from set with m


elements to a set with n elements?
Solution:
Recall: What is a function?
Thus, each of the m elements in the domain
has n choices in the co-domain.

14 / 58
Example 5: Counting functions

How many functions are there from set with m


elements to a set with n elements?
Solution:
Recall: What is a function?
Thus, each of the m elements in the domain
has n choices in the co-domain.
By the product rule, we have
n · n · n · · · · · n = nm
functions from set A to set B.
TASK: What if f : {a, b, c, d , e} → {1, 2, 3, 4}?
14 / 58
Product rule in set theory

The product rule can also be used to count in set


theory.
Suppose we have A1, A2, · · · , Am finite sets.

15 / 58
Product rule in set theory

The product rule can also be used to count in set


theory.
Suppose we have A1, A2, · · · , Am finite sets.
Then the number of elements in the Cartesian
product of these sets is the product of the
number of elements in each set.

15 / 58
Product rule in set theory

Relating this to the product rule, You will note


that the task of choosing an element in the
Cartesian product A1 × A2 × · · · × Am is done
by choosing an element in A1, an element in
A2, · · · , and an element in Am .

16 / 58
Product rule in set theory

Relating this to the product rule, You will note


that the task of choosing an element in the
Cartesian product A1 × A2 × · · · × Am is done
by choosing an element in A1, an element in
A2, · · · , and an element in Am .
By the product rule it follows that
|A1 × A2 × · · · × Am | = |A1| × |A2| × · · · × |Am |.

16 / 58
The Sum Rule

This rule states that if an event A can occur in m


ways, and event B can occur in n disjoint ways,
then the event “A or B ”can occur in m + n ways.

17 / 58
The Sum Rule

This rule states that if an event A can occur in m


ways, and event B can occur in n disjoint ways,
then the event “A or B ”can occur in m + n ways.
NOTE: Both events A and B can not occur
simultaneously or are non-overlapping

17 / 58
Example 6

Suppose that either a member of SCOM or


CCAPSO is chosen as a representative to a
religious committee. How many different choices
are there for this representative if there are 230
members of SCOM and 260 CCAPSO members
and no one is both a SCOM and a CCAPSO
member?

18 / 58
Example 6 - Solution

There are 230 ways to choose a SCOM


member and 260 to choose a CCAPSO
member

19 / 58
Example 6 - Solution

There are 230 ways to choose a SCOM


member and 260 to choose a CCAPSO
member
Since a member cannot be from both
organizations, then by the sum rule, there are
230 + 260 ways of choosing a representative to
this religious committee.

19 / 58
Example 7

How many two letter words start with either A or


B?

20 / 58
Example 7

How many two letter words start with either A or


B?
Solution:
If the first letter starts with an A , the second
letter can be any of the 26 alphabet letters and
this can be accomplished in 26 ways (1 · 26).

20 / 58
Example 7

How many two letter words start with either A or


B?
Solution:
If the first letter starts with an A , the second
letter can be any of the 26 alphabet letters and
this can be accomplished in 26 ways (1 · 26).
Similary for the two letter words that start with
a B.

20 / 58
Example 7

How many two letter words start with either A or


B?
Solution:
If the first letter starts with an A , the second
letter can be any of the 26 alphabet letters and
this can be accomplished in 26 ways (1 · 26).
Similary for the two letter words that start with
a B.
By the sum rule, we have a total of 52 two
letter words.
20 / 58
Example 7

How many two letter words start with either A or


B?
Solution:
If the first letter starts with an A , the second
letter can be any of the 26 alphabet letters and
this can be accomplished in 26 ways (1 · 26).
Similary for the two letter words that start with
a B.
By the sum rule, we have a total of 52 two
letter words.
20 / 58
Generalised Sum Rule

Similarly, if a task can be broken down into a


sequence on m events, then there will be
n1 + n2 + · · · + nm ways to perform that particular
task.

21 / 58
Example 8

A student can choose a project to work on from


one of four lists provided by the faculty. The four
lists contain 13, 21, 9 and 10 possible projects,
respectively. No project is on more than one list.
How many possible projects are there to choose
from?

22 / 58
Example 8

A student can choose a project to work on from


one of four lists provided by the faculty. The four
lists contain 13, 21, 9 and 10 possible projects,
respectively. No project is on more than one list.
How many possible projects are there to choose
from?
The student can choose from either of the list.

22 / 58
Example 8

A student can choose a project to work on from


one of four lists provided by the faculty. The four
lists contain 13, 21, 9 and 10 possible projects,
respectively. No project is on more than one list.
How many possible projects are there to choose
from?
The student can choose from either of the list.
Since no project is on more than one list, by
the sume rule, the student has 13 + 21 + 9 + 10
possible ways to chose a project.
22 / 58
Sum rule in set theory

If A1, · · · , Am are pairwise disjoint finite sets,

23 / 58
Sum rule in set theory

If A1, · · · , Am are pairwise disjoint finite sets,


then the number of elements in the union of
these sets is the sum of the numbers of
elements in the sets.
Relating this to the sum rule, there are |Ai |
ways to choose an element from Ai
Because the sets are pairwise disjoint, when we
select an element from one of the sets Ai , we
do not also select an element from a different
set Aj
23 / 58
Sum rule in set theory

The number of ways to choose an element from


one of the sets, which is the number of elements
in the union, is
|A1 ∪ A2 ∪ · · · ∪ Am | = |A1| + |A2| + · · · + |Am |
when Ai ∩ Aj = 0 for all i, j .

24 / 58
Subtraction rule

Overcounting is one of the most common


enumeration error.

25 / 58
Subtraction rule

Overcounting is one of the most common


enumeration error.
This principle removes the overcounts in
enumaretion

25 / 58
Subtraction rule

Overcounting is one of the most common


enumeration error.
This principle removes the overcounts in
enumaretion
It states that if an event can be carried out in
either n ways or m ways, then the number of
ways to conduct the event is n + m minus the
number of ways to do the task that are
common to the two different ways.
25 / 58
Example 9-Subtraction rule

How many bit strings of length eight either start


with a 1 bit or end with the two bits 00?

26 / 58
Example 9-Subtraction rule

How many bit strings of length eight either start


with a 1 bit or end with the two bits 00?
Solution:

26 / 58
Example 9-Subtraction rule

How many bit strings of length eight either start


with a 1 bit or end with the two bits 00?
Solution:

Therefore, the number of ... 128 + 64 − 32 = 160


26 / 58
Subtraction rule in set theory

If A1 and A2 are sets, then


|A1 ∪ A2| = |A1| + |A2| − |A1 ∩ A2|.

27 / 58
Example 10-Subtraction rule

LUANAR receives 5000 applications from students


to join the University. Suppose 3400 of these
applicants applied for a Bachelor in Biostatistics,
1900 applied for Bachelor in Education, and 800
applied for both Biostatistics and Education
programs. How many of these applicants applied
for neither Biostatistics nor Education program?

28 / 58
Example 10-Solution

Let A1 and A2 be the set of students who applied


for a Biostatistics and Education programs
respectively.

29 / 58
Example 10-Solution

Let A1 and A2 be the set of students who applied


for a Biostatistics and Education programs
respectively.
Then,

29 / 58
Example 10-Solution

Let A1 and A2 be the set of students who applied


for a Biostatistics and Education programs
respectively.
Then,
|A1 ∪ A2| = |3400| + |1900| − |800|.

29 / 58
Example 10-Solution

Let A1 and A2 be the set of students who applied


for a Biostatistics and Education programs
respectively.
Then,
|A1 ∪ A2| = |3400| + |1900| − |800|.
Therefore, 5000 − 4500 = 500 applied for neither
of the two programs.

29 / 58
Inclusion-Excusion Principle: 3 sets

Suppose we have three sets, A, B and C . Then


|A ∪ B ∪ C | = |A| + |B| + |C |
− |A ∩ B| − |A ∩ C | − |B ∩ C |
+ |A ∩ B ∩ C |

30 / 58
Example 11

An examination in three subjects, Algebra,


Biology, and Chemistry, was taken by 41 students.
The following table shows how many students
failed in each single subject and in their various
combinations:

Subject A B C AB AC BC ABC
Failed 12 5 8 2 6 3 1

How many students failed at least one subject?


31 / 58
Theorem (Advanced, so skip)

32 / 58
Exercise

1. How many two letter words start with one of


the 5 vowels?
2. How many different bit strings of length twelve
are there?
3. Each user on a computer system has a
password, which is six to eight characters long,
where each character is an uppercase letter or a
digit. Each password must contain at least one
digit. How many possible passwords are there?
33 / 58
exercise

4. A total of 1232 students have taken a course


in Spanish, 879 have taken a course in French,
and 114 have taken a course in Russian.
Further, 103 have taken courses in both
Spanish and French, 23 have taken courses in
both Spanish and Russian, and 14 have taken
courses in both French and Russian. If 2092
students have taken at least one of Spanish,
French, and Russian, how many students have
taken a course in all three languages?
34 / 58
The Pigeonhole principle

Suppose a flock of 10 pigeons flies into a set of


9 pigeonholes, at least one of these 9
pigeonholes must have at least 2 pigeons in it.
Why is this so?

35 / 58
The Pigeonhole principle

Suppose a flock of 10 pigeons flies into a set of


9 pigeonholes, at least one of these 9
pigeonholes must have at least 2 pigeons in it.
Why is this so?
This illustrates a general principle called the
pigeonhole principle, which states that if
there are more pigeons than
pigeonholes, then there must be at least
one pigeonhole with at least 2 pigeons
in it.
35 / 58
The Pigeonhole principle
Theorem
The Pigeonhole Principle: If n is a positive
integer and n + 1 or more objects are placed into
n boxes, then there is at least one box containing
two or more of the objects.
Proof: By Contradiction

36 / 58
The Pigeonhole principle
Theorem
The Pigeonhole Principle: If n is a positive
integer and n + 1 or more objects are placed into
n boxes, then there is at least one box containing
two or more of the objects.
Proof: By Contradiction

Suppose each box contains at most one object


in it.

36 / 58
The Pigeonhole principle
Theorem
The Pigeonhole Principle: If n is a positive
integer and n + 1 or more objects are placed into
n boxes, then there is at least one box containing
two or more of the objects.
Proof: By Contradiction

Suppose each box contains at most one object


in it.
Then the total number of objects is at most n.

36 / 58
The Pigeonhole principle
Theorem
The Pigeonhole Principle: If n is a positive
integer and n + 1 or more objects are placed into
n boxes, then there is at least one box containing
two or more of the objects.
Proof: By Contradiction

Suppose each box contains at most one object


in it.
Then the total number of objects is at most n.
This contradicts the fact that there are n + 1
or more objects. 36 / 58
Corollary 1
A function f from a set with k + 1 or more
elements to a set with k elements is not
one-to-one.

37 / 58
Corollary 1
A function f from a set with k + 1 or more
elements to a set with k elements is not
one-to-one.
The pigeonhole principle tell us that there
must be at least two elements in the domain
that have the same image in the co-domain.

37 / 58
Corollary 1
A function f from a set with k + 1 or more
elements to a set with k elements is not
one-to-one.
The pigeonhole principle tell us that there
must be at least two elements in the domain
that have the same image in the co-domain.

37 / 58
Example 12

Show how the pigeonhole principle is used.


1
Among any group of 8 people, there must be
at least 2 born on the same day of the week.

38 / 58
Example 12

Show how the pigeonhole principle is used.


1
Among any group of 8 people, there must be
at least 2 born on the same day of the week.
2
Among any group of 367 people, there must
be at least two with the same birthday.

38 / 58
Example 12

Show how the pigeonhole principle is used.


1
Among any group of 8 people, there must be
at least 2 born on the same day of the week.
2
Among any group of 367 people, there must
be at least two with the same birthday.
3
In a group of 13 people, there must be at least
2 who were born in the same month.

38 / 58
Example 12

Show how the pigeonhole principle is used.


1
Among any group of 8 people, there must be
at least 2 born on the same day of the week.
2
Among any group of 367 people, there must
be at least two with the same birthday.
3
In a group of 13 people, there must be at least
2 who were born in the same month.
4
In any group of 27 English words, must there
be at least 2 that begin with the same letter.
38 / 58
Example 13

1 How many students must be in a class so that


at least 2 students receive the same score if the
exam is graded on a scale of 0 to 40 marks?

39 / 58
Example 13

1 How many students must be in a class so that


at least 2 students receive the same score if the
exam is graded on a scale of 0 to 40 marks?
2
Suppose there are 5 integers (not necessarily
consecutive). Show that there are two integers
with the same remainder when divided by 4.

39 / 58
The Generalized Pigeonhole Principle

What if the number of objects exceeds a multiple


of the number of boxes?

40 / 58
The Generalized Pigeonhole Principle

What if the number of objects exceeds a multiple


of the number of boxes?
Theorem
The Generalized Pigeonhole Principle: If
N objects are placed into k boxes, where N > k,
then
 N  there is at least one box containing at least
k objects.

40 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there
 is no box containing more than
k − 1 objects.

41 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there is no box containing more than
k − 1 objects.
Then
 N the total
 number of objects is at most
k k −1 .

41 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there is no box containing more than
k − 1 objects.
Then
 N the total
 number of objects is at most
k k −1 .
Notice that Nk < ( Nk ) + 1. This implies that
 
     
N N
k −1 <k +1 −1 =N
k k

41 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there is no box containing more than
k − 1 objects.
Then
 N the total
 number of objects is at most
k k −1 .
Notice that Nk < ( Nk ) + 1. This implies that
 
     
N N
k −1 <k +1 −1 =N
k k

This means there are a total N objects,

41 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there is no box containing more than
k − 1 objects.
Then
 N the total
 number of objects is at most
k k −1 .
Notice that Nk < ( Nk ) + 1. This implies that
 
     
N N
k −1 <k +1 −1 =N
k k

This means there are a total N objects,which is


a contradiction. Thus, the theorem is true.
41 / 58
Proof: The Generalized Pigeonhole Principle

Suppose
 N  there is no box containing more than
k − 1 objects.
Then
 N the total
 number of objects is at most
k k −1 .
Notice that Nk < ( Nk ) + 1. This implies that
 
     
N N
k −1 <k +1 −1 =N
k k

This means there are a total N objects,which is


a contradiction. Thus, the theorem is true.
41 / 58
Example 14: The Generalized Pigeonhole Principle

1 Among a group of 1000 people, at least three


have the same birthday.

42 / 58
Example 14: The Generalized Pigeonhole Principle

1 Among a group of 1000 people, at least three


have the same birthday.
2
In a group of 100 people, there are at least
nine who were born in the same month.

42 / 58
Example 14: The Generalized Pigeonhole Principle

1 Among a group of 1000 people, at least three


have the same birthday.
2
In a group of 100 people, there are at least
nine who were born in the same month.

42 / 58
The Generalized Pigeonhole Principle cont’

Suppose we want to find the minimum number


of objects such that at least r objects must be
in k boxes.

43 / 58
The Generalized Pigeonhole Principle cont’

Suppose we want to find the minimum number


of objects such that at least r objects must be
in k boxes.
If we have N objects, then using the GPP,
there must be at least r objects in one of the k
N
boxes as long as ≥ r.
k

43 / 58
The Generalized Pigeonhole Principle cont’

Suppose we want to find the minimum number


of objects such that at least r objects must be
in k boxes.
If we have N objects, then using the GPP,
there must be at least r objects in one of the k
N
boxes as long as ≥ r.
k
The smallest integer N, with N/k > r − 1,
satisfying this inequality is
N = k(r − 1) + 1.
43 / 58
The Generalized Pigeonhole Principle cont’

Suppose we want to find the minimum number


of objects such that at least r objects must be
in k boxes.
If we have N objects, then using the GPP,
there must be at least r objects in one of the k
N
boxes as long as ≥ r.
k
The smallest integer N, with N/k > r − 1,
satisfying this inequality is
N = k(r − 1) + 1.
43 / 58
Example 15

1 What is the minimum number of students


required in a Discrete maths class to be sure
that at least 5 will receive the same grade, if
the possible grades are
A+, A, A−, B +, B, B −, C +, C , C −, D, and F ?

44 / 58
Example 15

1 What is the minimum number of students


required in a Discrete maths class to be sure
that at least 5 will receive the same grade, if
the possible grades are
A+, A, A−, B +, B, B −, C +, C , C −, D, and F ?
2
i. How many cards must be selected from a

standard deck of 52 cards to guarantee that


at least 3 cards of the same suit are chosen?

44 / 58
Example 15

1 What is the minimum number of students


required in a Discrete maths class to be sure
that at least 5 will receive the same grade, if
the possible grades are
A+, A, A−, B +, B, B −, C +, C , C −, D, and F ?
2
i. How many cards must be selected from a

standard deck of 52 cards to guarantee that


at least 3 cards of the same suit are chosen?
ii. How many cards must be selected so that
at least 3 spades are selected?
44 / 58
Example 15

1 What is the minimum number of students


required in a Discrete maths class to be sure
that at least 5 will receive the same grade, if
the possible grades are
A+, A, A−, B +, B, B −, C +, C , C −, D, and F ?
2
i. How many cards must be selected from a

standard deck of 52 cards to guarantee that


at least 3 cards of the same suit are chosen?
ii. How many cards must be selected so that
at least 3 spades are selected?
44 / 58
Example 15-Solution

Let N be the minimum number of students


required.

45 / 58
Example 15-Solution

Let N be the minimum number of students


required.
Using the generalized PP, at least
 5 students
N
will have the same grade if ≥ 5.
11

45 / 58
Example 15-Solution

Let N be the minimum number of students


required.
Using the generalized PP, at least
 5 students
N
will have the same grade if ≥ 5.
11
Thus,
N = 11(5 − 1) + 1 = 45.

45 / 58
Example 15-Solution

Let N be the minimum number of students


required.
Using the generalized PP, at least
 5 students
N
will have the same grade if ≥ 5.
11
Thus,
N = 11(5 − 1) + 1 = 45.
Therefore, with a class of 45 students, it’s
possible for at least 5 students to receive the
same grade.
45 / 58
Example 15-Solution

i. A standard deck of playing cards has 4 suits


(boxes).

46 / 58
Example 15-Solution

i. A standard deck of playing cards has 4 suits


(boxes). Using the GPP, if N cards are
selected, then thereis at
 least one box
N
containing at least cards.
4

46 / 58
Example 15-Solution

i. A standard deck of playing cards has 4 suits


(boxes). Using the GPP, if N cards are
selected, then thereis at
 least one box
N
containing at least cards.
4
Thus,
  3 cards of the same suit are chosen if
N
≥ 3.
4

46 / 58
Example 15-Solution

i. A standard deck of playing cards has 4 suits


(boxes). Using the GPP, if N cards are
selected, then thereis at  least one box
N
containing at least cards.
4
Thus,
  3 cards of the same suit are chosen if
N
≥ 3.
4
The smallest integer N such that the above
inequality is satisfied is
N = 4 · (3 − 1) = 9
46 / 58
Example 15-Solution

ii. We want N such that 3 spades are selected.

47 / 58
Example 15-Solution

ii. We want N such that 3 spades are selected.


In a worse scanario, we can select all other 3
suits before selecting a spade.

47 / 58
Example 15-Solution

ii. We want N such that 3 spades are selected.


In a worse scanario, we can select all other 3
suits before selecting a spade.
Then the next 3 cards selected will be spades.

47 / 58
Example 15-Solution

ii. We want N such that 3 spades are selected.


In a worse scanario, we can select all other 3
suits before selecting a spade.
Then the next 3 cards selected will be spades.
Therefore, we may need 39 + 3 = 42 cards to
select 3 spades.
NB: Why not the generalized pigeonhole
principle?

47 / 58
EXERCISE

A bowl contains 10 red balls and 10 blue balls.


A woman selects balls at random without
looking at them.
1 How many balls must she select to be sure
of having at least three balls of the same
color?
2
How many balls must she select to be sure
of having at least three blue balls?

48 / 58
Permutations

Counting problems can also be solved by


finding the number of ways to arrange a
specific number of elements orderly.

49 / 58
Permutations

Counting problems can also be solved by


finding the number of ways to arrange a
specific number of elements orderly.
For instance, in how many ways can we select 3
girls from a group of 5 to line up for a picture?

49 / 58
Permutations

Counting problems can also be solved by


finding the number of ways to arrange a
specific number of elements orderly.
For instance, in how many ways can we select 3
girls from a group of 5 to line up for a picture?
In this selection, the order in which the girls
are selected matters.

49 / 58
Permutations

Counting problems can also be solved by


finding the number of ways to arrange a
specific number of elements orderly.
For instance, in how many ways can we select 3
girls from a group of 5 to line up for a picture?
In this selection, the order in which the girls
are selected matters.
The first can be selected in 5 ways, the second
in 4 ways and the third in 3 ways. By product
rule, we have 5 · 4 · 3 = 60 ways.
49 / 58
Permutations

A permutation of a set of distinct objects is


an ordered arrangement of these objects.

50 / 58
Permutations

A permutation of a set of distinct objects is


an ordered arrangement of these objects.
An ordered arrangements of some of the
elements of a set (i.e. r ) is called an
r −permutation.

50 / 58
Permutations

A permutation of a set of distinct objects is


an ordered arrangement of these objects.
An ordered arrangements of some of the
elements of a set (i.e. r ) is called an
r −permutation.
For example, suppose A = {x, y , z}.

50 / 58
Permutations

A permutation of a set of distinct objects is


an ordered arrangement of these objects.
An ordered arrangements of some of the
elements of a set (i.e. r ) is called an
r −permutation.
For example, suppose A = {x, y , z}.
The ordered arrangement z, y , x is a
permutation of A, and

50 / 58
Permutations

A permutation of a set of distinct objects is


an ordered arrangement of these objects.
An ordered arrangements of some of the
elements of a set (i.e. r ) is called an
r −permutation.
For example, suppose A = {x, y , z}.
The ordered arrangement z, y , x is a
permutation of A, and
The ordered arrangement z, x is a
2−permutation of A.
50 / 58
Permutations

Suppose we have a set with n elements. The


number of r-permutations is found using the
product rule and it is denoted by P(n, r ).

51 / 58
Permutations

Suppose we have a set with n elements. The


number of r-permutations is found using the
product rule and it is denoted by P(n, r ).
Theorem
If n is a positive integer and r is an integer with
1 ≤ r ≤ n, then there are
P(n, r ) = n(n − 1)(n − 2) . . . (n − r + 1)
r-permutations of a set with n distinct elements.
51 / 58
Proof

The first element can be chosen in n ways, the


second can be chosen in (n − 1) ways, the
third in (n − 3) ways and so on until there are
n − (r − 1) = (n − r + 1) ways to choose the
rth term.

52 / 58
Proof

The first element can be chosen in n ways, the


second can be chosen in (n − 1) ways, the
third in (n − 3) ways and so on until there are
n − (r − 1) = (n − r + 1) ways to choose the
rth term.
By the product rule, there are
n(n − 1)(n − 2) . . . (n − r + 1)
r-permutations of the set.

52 / 58
Proof

The first element can be chosen in n ways, the


second can be chosen in (n − 1) ways, the
third in (n − 3) ways and so on until there are
n − (r − 1) = (n − r + 1) ways to choose the
rth term.
By the product rule, there are
n(n − 1)(n − 2) . . . (n − r + 1)
r-permutations of the set.
?? What about P(n,0)?
52 / 58
Corollary

If n and r are integers with 0 ≤ r ≤ n, then


(n!)
P(n, r ) = .
(n − r )!

?? Does this formula hold true when r = 0?

53 / 58
Corollary

If n and r are integers with 0 ≤ r ≤ n, then


(n!)
P(n, r ) = .
(n − r )!

?? Does this formula hold true when r = 0?

53 / 58
Example 16

1 How many ways are there to select a first-prize


winner, a second-prize winner, and a third-prize
winner from 60 different people contestesting?

54 / 58
Example 16

1 How many ways are there to select a first-prize


winner, a second-prize winner, and a third-prize
winner from 60 different people contestesting?
2
Suppose Mary has to tour 12 different cities for
a vacation. She must begin her trip in a
specified city, but she can visit the other seven
cities in any order she wishes. How many
possible visits does Mary have?

54 / 58
Example 16

1 How many ways are there to select a first-prize


winner, a second-prize winner, and a third-prize
winner from 60 different people contestesting?
2
Suppose Mary has to tour 12 different cities for
a vacation. She must begin her trip in a
specified city, but she can visit the other seven
cities in any order she wishes. How many
possible visits does Mary have?
3
How many permutations of the letters
ABCDEFGH contain the string EFGH ?
54 / 58
Example 16-Solution

1 We want 3-permutations from a set of 60


people. Thus,

55 / 58
Example 16-Solution

1 We want 3-permutations from a set of 60


people. Thus, n = 60 and r = 3.

55 / 58
Example 16-Solution

1 We want 3-permutations from a set of 60


people. Thus, n = 60 and r = 3.
Therefore,
P(60, 3) = 60(60 − 1)(60 − 2) = 205320.

55 / 58
Example 16-Solution

1 We want 3-permutations from a set of 60


people. Thus, n = 60 and r = 3.
Therefore,
P(60, 3) = 60(60 − 1)(60 − 2) = 205320.
Or
60!
P(60, 3) = = 205320.
(60 − 3)!

55 / 58
Example 16-Solution

2. The first city can only be visited in one way


and the remaining eleven cities in any of the
remaining ways.

56 / 58
Example 16-Solution

2. The first city can only be visited in one way


and the remaining eleven cities in any of the
remaining ways.
Therefore, the number of possible visits
between the cities is the number of
permutations of eleven elements.

56 / 58
Example 16-Solution

2.The first city can only be visited in one way


and the remaining eleven cities in any of the
remaining ways.
Therefore, the number of possible visits
between the cities is the number of
permutations of eleven elements. Thus, there
are 11! ways for Mary to tour the cities on her
vacation .
3. n = 5, r = 5.

56 / 58
Example 16-Solution

2.The first city can only be visited in one way


and the remaining eleven cities in any of the
remaining ways.
Therefore, the number of possible visits
between the cities is the number of
permutations of eleven elements. Thus, there
are 11! ways for Mary to tour the cities on her
vacation .
3. n = 5, r = 5. Therefore,

56 / 58
Example 16-Solution

2.The first city can only be visited in one way


and the remaining eleven cities in any of the
remaining ways.
Therefore, the number of possible visits
between the cities is the number of
permutations of eleven elements. Thus, there
are 11! ways for Mary to tour the cities on her
vacation .
3. n = 5, r = 5. Therefore,
P(n, r ) = 6!
56 / 58

You might also like