Chapter 2 Combinatorics: 5.1 Basic Counting Principles
Chapter 2 Combinatorics: 5.1 Basic Counting Principles
Chapter 2 Combinatorics
Combinatorics as the study of arrangements of objects is an important part of discrete mathematics:
It was studied in 17th century when combinatorial questions arose in the study of gambling.
Enumeration, an important of combinatorics deals with the counting of objects with certain
properties to solve many different types of problems.
Permutations and Combination are arrangements in terms of ordered or unordered arrangements of
objects of a set.
Pigeonhole principle which states that when objects are placed in the boxes and there are more
objects than boxes, then there is a box containing at least two objects.
Principle of Inclusion can solve many counting problems such as: finding the number of primes less
than a positive integer, counting the number of onto function from one finite set to another.
Generating function can be used to solve many types of counting number, such as the number of ways
to select or distribute objects of different kinds, subject to a variety of constraint.
Recurrence relations can solve counting problems by finding relations, between the terms of
sequence.
In this module, basic techniques of counting will be discussed which serve as the foundation for almost all
counting techniques.
Suppose that a procedure can be broken down into a sequence of two tasks. If there are n1 ways to do the
first task and n2 ways to do the second task after the first task has been done, then there are n1 n2ways to do
the procedure.
Example 5.1.1
a. If a woman has two blouses and three skirts, how many different outfits consisting of a blouse and a skirt can she
wear?
CS 213: COMBINATORICS AND GRAPH THEORYMODULE 5.0: FUNDAMENTAL PRINCIPLE OF COUNTINGPREPARED BY: EDITHA RIVERA JORDA, Ph. D.
1ST semester, SY 2020-2021
2
s1 b1 s1
b1 s2 b 1 s2
s3 b 1 s3
s1 b 2 s1
b2 s2 b 2 s2
s3 b 2 s3
The method involves two steps. First, the woman chooses a blouse. She two choices: b 1 or
b 2. If she chooses b 1, she has three skirts to match it with: s1 , s 2 , or s3. Likewise,
If she chooses b 2 , she can match it with the three skirts: s1 , s 2 , or s3. Hence, by the
product rule there are 2 ways to choose the blouse and three ways to choose the skirts. That is,
b. A vehicle license plate consists of three letters followed by four digits. How many such license plates are possible?
Solution: Since there are 26 letters and 10 digits, the following are the choices for each.
Solution: Since there are two choices for each question, then
The eight possibilities are: TTT, TTF, TFT, TFF, FTF, FFT, FFF
Note that the first letter is each possibility is the answer corresponding to the first question, the second letter
corresponds to the answer to the second question and so on.
CS 213: COMBINATORICS AND GRAPH THEORYMODULE 5.0: FUNDAMENTAL PRINCIPLE OF COUNTINGPREPARED BY: EDITHA RIVERA JORDA, Ph. D.
1ST semester, SY 2020-2021
3
Solution: Suppose there are four chairs in a row, and proceed to put four people in these seats.
There are four choices for the first chair. Once a person sits down in that chair, there are only three choices for
the second chair, and so on. Thus, the table illustrates in how many different ways can four people be seated in a row.
e. How many ways three-letter word sequences can be formed using the letter { A , B , C } if no letter is to be repeated?
Suppose a child having three building blocks labelled A , B , C and put these blocks on top of each other to
make word sequences. For the first letter he has three choices, namely, A , B , C . Suppose he chooses the first to be a
B ,then for the second, he has only two choices, A or C . And for the last letter, he has only one choice. The table shows
the choices below.
First letter Second letter Third letter
3 2 1
Solution: Each of the seven bits can be chosen in two ways, since each bit is either 0 or 1.
Therefore, by product rule there are 2 ∙2 ∙ 2∙ 2∙ 2 ∙2 ∙2=27 different bit strings of length seven.
Example 5.1.2 Find the number of positive divisors of 600, inclusive of 1 and 600 itself.
Solution: Note that the number 600 has a unique factorization, namely,
600=23 × 31 × 52
Thus, it follows that a positive integer m is a divisor of 600 if and only if m is of the form
m=2a ×3 b × 5c where a , b , c ∈ Z
CS 213: COMBINATORICS AND GRAPH THEORYMODULE 5.0: FUNDAMENTAL PRINCIPLE OF COUNTINGPREPARED BY: EDITHA RIVERA JORDA, Ph. D.
1ST semester, SY 2020-2021
4
THE SUM RULE. If a first task can be done in n1 ways and a second task in n2
ways, and if these tasks cannot be done at the same time, then there are
n1 +n 2 ways to do one of these tasks.
Example 5.1.3
a. Suppose that either a member of the mathematics faculty or a student who is mathematics major is chosen as a
representative to a university committee. How many different choices are there for this representative if there are 37
members of the mathematics faculty and 83 mathematics majors?
Solution: n1 is the first task to choose a member of the mathematics faculty. The first task can be done in 37 ways.
n2 is the second task to choose a mathematics major. The second task can be done in 83 ways.
b. One can reach city Q from city P by sea, air, and road. Suppose there are 2 ways by the sea, 3 ways by the air and 2
ways by the road.
Solution: n1 is the first task to city Q from city P by sea. There are 2 ways.
n2 is the second task to city Q from city P by air. There are 3 ways.
n1 is the third task to city Q from city P by road. There are 2 ways.
i=2 , ( 1 )2+ ( 1 )2=2; ( 1 )2 + (−1 )2=2 ; (−1 )2+ ( 1 )2=2; (−1 )2 + (−1 )2=2
So, S3=∅
2 2 2 2 2 2 2 2
i=4 , ( 0 ) + ( 2 ) =4 ; ( 0 ) + (−2 ) =4 ; ( 2 ) + ( 0 ) =4 ; (−2 ) + ( 0 ) =4
Exercise 5.1
Surname, Name, MI. _________________________ Course & Yr._______ Module no._____ Date of Submission: ___
Direction: Please answer Exercises 5.1 and submit based on the following requirements:
Write the answer on the blank provide for.
Answer should be handwritten.
Scan your answer.
1. There are 18 mathematics major and 325 computer science majors at a college
a. How many ways are there to pick representatives, so that one is a mathematics major
and the other is a computer science major?
b. How many ways are there to pick one representative who is either a mathematics
major or a computer science major?
2. A multiple-choice test contains ten questions. There are four possible answers for each question.
a. How many ways can a student answer the questions on the test if every question is
answered?
b. How many ways can a student answer the questions on the test if the student can
leave answers blank?
3. Find the number of ways to choose a pair { a , b } of distinct numbers from the set { 1,2 , … ,50 } such that
a. |a−b|=5
b. |a−b|≤ 5
4. In each of the following, find the number of positive divisors of n (inclusive of n ) which are multiples of 3.
a. n=210
CS 213: COMBINATORICS AND GRAPH THEORYMODULE 5.0: FUNDAMENTAL PRINCIPLE OF COUNTINGPREPARED BY: EDITHA RIVERA JORDA, Ph. D.
1ST semester, SY 2020-2021
6
b. n=630
5. How many bit strings of length ten begin and end with a 1?
CS 213: COMBINATORICS AND GRAPH THEORYMODULE 5.0: FUNDAMENTAL PRINCIPLE OF COUNTINGPREPARED BY: EDITHA RIVERA JORDA, Ph. D.
1ST semester, SY 2020-2021