0% found this document useful (0 votes)
26 views

Module 1 DS 2 Final

This module introduces foundational counting principles including permutations, combinations, and the pigeonhole principle. It contains 4 lessons: Lesson 1 covers basics of counting using the product and sum rules to solve problems involving permutations. Lesson 2 defines permutations as arrangements where order matters, and provides the formula for calculating permutations of n objects taken r at a time. Lessons 3 will cover combinations, where order does not matter. Lesson 4 will discuss the pigeonhole principle, which proves the existence of objects with certain properties.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Module 1 DS 2 Final

This module introduces foundational counting principles including permutations, combinations, and the pigeonhole principle. It contains 4 lessons: Lesson 1 covers basics of counting using the product and sum rules to solve problems involving permutations. Lesson 2 defines permutations as arrangements where order matters, and provides the formula for calculating permutations of n objects taken r at a time. Lessons 3 will cover combinations, where order does not matter. Lesson 4 will discuss the pigeonhole principle, which proves the existence of objects with certain properties.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Module 1 1

Module 1
COUNTING

Lesson 1 Basics of Counting

Lesson 2 The Permutation Rule

Lesson 3 The Combination Rule

Lesson 4 The Pigeonhole Principle


Module 1 2

INTRODUCTION

This module presents the principles of counting. Counting mainly encompasses


fundamental counting rule, the permutation rule and the combination rule. This
chapter will let you learn several tools for counting then concludes with a discussion
of the pigeonhole principle, which often allows us to prove the existence of an object
with certain properties.

OBJECTIVES

After studying the module, you should be able to:

1. solve counting problems.


2. compute the number of permutations and combinations.
3. perform pigeonhole principle.

DIRECTIONS/MODULE
ORGANIZER

There are four lessons in the module. Read each lesson carefully then answer
the exercises/activities to find out how much you have learned from it. Work on these
exercises carefully and submit your output to your instructor.
In case you encounter difficulty, discuss this with your instructor during the
face-to-face meeting. If not, you may contact your instructor.
God bless and enjoy the rest of this module!
Module 1 4

LESSON 1

BASICS OF COUNTING

The Product Rule

A procedure can be broken down into a sequence of two tasks. There are n 1 ways to
do the first task and n2 ways to do the second task. Then, there are n1 x n2 ways to do
the procedure.

Example 1. How many bit strings of length eight are there?


Solution: 2x2x2x2x2x2x2x2 = 28 = 256

8 times is the length of the bit string and a bit


2 choices 8 times may consist of 2 possible values either 1 or 0.

Example 2. How many different license plates can be made if each plate contains a
sequence of three uppercase English letters followed by two digits?
Solution:
_ _ _ _ _ 263 x 102 = 1,757,600

There are 10 choices include 0-9 digits


26 choices and 26 letters of the alphabet.

10 choices

Example 3. A company with three employees, Mark, Luke and John, rents a floor of a
building with 12 offices. How many ways are there to assign different offices to these
three employees?
Module 1 4

Solution:
The procedure of assigning offices to these three employees consists of assigning an
office to Mark, which can be done in 12 ways, assigning an office to Luke, which can
be done in 11 ways and assigning an office to John different from the offices assigned
to Mark and Luke, which can be done in 10 ways. By the product rule, there are
12·11·10 = 1320 ways to assign offices to these three employees.

The Sum Rule

If a task can be done either in one of n1 ways or in one of n2 ways, where none of the
set of n1 ways is the same as any of the n2 ways, then there are n1+ n2 ways to do the
task.

Example 1. The computer science department must choose either a student or a


faculty member as a representative for a university committee. How many choices are
there for this representative if there are 35 members of the computer science faculty
and 65 computer science majors and no one is both a faculty and a student?
Solution: 35 + 65 = 100
There are 35 ways to choose a member of the computer science faculty and there are
65 ways to choose a student who is a computer science major. Choosing a member of
the computer science faculty is never the same as choosing a student who is a
computer science major because no one is both a faculty member and a student. By
the sum rule it follows that there are 35 + 65 = 100 possible ways to pick this
representative.

Example 2. A boy lives at X and wants to go to School at Z. From his home X he has to
first reach Y and then Y to Z. He may go X to Y by either 3 bus routes or 2 train
routes. From there, he can either choose 4 bus routes or 5 train routes to reach Z.
How many ways are there to go from X to Z?
Module 1 4

Solution: From X to Y, he can go in 3+2=5 ways (Sum Rule). Thereafter, he can go Y to


Z in 4+5=9 ways (Sum Rule). Hence from X to Z he can go in 5×9=45 ways (Product
Rule).

ASSESSMENT ACTIVTY

Name: ____________________________________ Date: ____________


Year & Section: ____________________________ Score: ___________

Directions: Read each statement carefully and answer the following


problems using the Product or Sum Rule. Write your solution on the
space provided.
1. An event manager has ten patterns of chairs and eight patterns of
tables. In how many ways can he make a pair of table and chair?
_____________________________________________________________
_____________________________________________________________

2. 25 buses are running between two places P and Q. In how many


ways can a person go from P to Q and return by a different bus?
_____________________________________________________________
_____________________________________________________________

3. A coin is tossed 3 times. Find out the number of possible


outcomes?
_____________________________________________________________
_____________________________________________________________

4. Find out the number of ways in which 6 rings of different types


can be worn in 3 fingers?
_____________________________________________________________
_____________________________________________________________

5. In how many ways can we get a sum 7 when two distinguishable


dice are rolled?
_____________________________________________________________
_____________________________________________________________
Module 1 4

6. A bank password consists of two letters of English alphabet followed by


two digits. How many different passwords are there?
_________________________________________________________________
_________________________________________________________________

7. How many five-digit telephone numbers are possible if:


a.) only even digits are used and
b.) only odd digits are used?
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________

8. From a deck of playing cards, find the number of ways in which we can
draw:
a.) an ace or a king and
b.) a card of diamond or a spade?
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
_________________________________________________________________
Module 1 7

LESSON 2

THE PERMUTATION RULE

A permutation is an arrangement of some elements in which order matters. In other


words, a permutation is an ordered combination of elements.
The number of permutations of ‘n’ different things taken ‘r’ at a time is denoted by
𝑛Pr

𝑛!
𝑛Pr = (𝑛 − 𝑟)!
where 𝑛! = 1.2.3. … (𝑛 − 1).

Proof − Let there be ‘n’ different elements.


There are n number of ways to fill up the first place. After filling the first place (n-1)
number of elements is left. Hence, there are (n-1) ways to fill up the second place.
After filling the first and second place, (n-2) number of elements is left. Hence, there
are (n-2) ways to fill up the third place. We can now generalize the number of ways
to fill up r-th place as [n – (r–1)] = n–r+1
So, the total no. of ways to fill up from first place up to r-th-place −
𝑛Pr = 𝑛(𝑛 − 1)(𝑛 − 2) … . (𝑛 − 𝑟 + 1)
= [𝑛(𝑛 − 1)(𝑛 − 2). . . (𝑛 − 𝑟 + 1)][(𝑛 − 𝑟)(𝑛 − 𝑟 − 1) … 3.2.1]/[(𝑛 − 𝑟)(𝑛 − 𝑟 − 1) … 3.2.1]
Hence,
𝑛Pr = 𝑛!/(𝑛 − 𝑟)!

Some Important Formulas of Permutation


▪ If there are n elements of which a 1 are alike of some kind, a2 are alike of
another kind; a3 are alike of third kind and so on and ar are of rth kind, where
(a1+a2+...ar) = 𝒏.
Module 1 8

Then, number of permutations of these n objects is 𝒏!/[(a1!(a2!)…(ar!)].


▪ Number of permutations of n distinct elements taking n elements at a time is
𝒏Pn= 𝒏!
▪ The number of permutations of n dissimilar elements taking r elements at a
time, when x particular things always occupy definite places is 𝒏−xPr−x
▪ The number of permutations of n dissimilar elements when r specified things
always come together is r!(𝒏−r+1)!
▪ The number of permutations of n dissimilar elements when r specified things
never come together is n!–[r!(n−r+1)!]n!–[r!(n−r+1)!]
▪ The number of circular permutations of n different elements taken x elements
n
at time is Px/x
▪ The number of circular permutations of n different things is nPn/n

Example 1. From a set S ={x, y, z} by taking two at a time, all permutations are
− xy,yx,xz,zx,yz,zy.

Example 2. We have to form a permutation of three digit numbers from a set of


numbers S={1,2,3}. Different three-digit numbers will be formed when we
arrange the digits. The permutation will be = 123, 132, 213, 231, 312, 321

Example 3. From a bunch of 6 different cards, how many ways we can permute it?
Solution: As we are taking 6 cards at a time from a deck of 6 cards, the permutation
will be 6P6 = 𝟔! = 𝟕𝟐𝟎

Example 4. In how many ways can the letters of the word 'READER' be arranged?
Solution: There are 6 letters word (2 E, 1 A, 1D and 2R.) in the word 'READER'.
The permutation will be
𝟔!
=
(𝟐!)(𝟏!)(𝟏!)(𝟐!)
= 180
Module 1 9

Example 5. In how ways can the letters of the word 'ORANGE' be arranged so that the
consonants occupy only the even positions?
Solution: There are 3 vowels and 3 consonants in the word 'ORANGE'. Number of ways
3P =3!=6.
of arranging the consonants among themselves 3 The remaining 3
vacant places will be filled up by 3 vowels in 3P3=3!=6 ways. Hence, the total
number of permutation is 6×6=36.
Module 1 10

ASSESSMENT ACTIVTY

Name: ____________________________________ Date: ____________


Year & Section: ____________________________ Score: ___________

Directions: Read each statement carefully and answer the following


problems using Permutation. Write the letter of your answer on the
space provided from the choices given and show your solution on a
separate paper.

______1. How many words can be formed by using all letters of the
word 'BIHAR'?
A. 720 B. 24 C. 120 D. 60
______2. What is the value of 100P ?
2

A. 9801 B. 12000 C. 5600 D. 9900


______3. In how many ways can 5 man draw water from 5 taps if no
tap can be used more than once?
A. None of these B. 720 C. 60 D. 120
______4. How many 6-digit telephone numbers can be formed if each
number starts with 35 and no digit appears more than once?
A. 720 B. 360 C. 1420 D. 1680
______5. In how many different ways can 5 girls and 5 boys form a
circle such that the boys and the girls alternate?
A. 2880 B. 1400 C. 1200 D. 3212
Module 1 11

______6. In how many different ways can the letters of the word
'RUMOUR' be arranged?
A. None of these B. 128 C. 360 D. 180
______7. How many words with or without meaning, can be formed by
using all the letters of the word, 'DELHI' using each letter
exactly once?
A. 720 B. 24 C. None of these D. 120
______8. 18. How many 3-digit numbers can be formed from the digits 2,
3, 5, 6, 7 and 9 which are divisible by 5 and none of the digits is
repeated?
A. 20 B. 16 C. 8 D. 24
Module 1 12

LESSON 3

THE COMBINATION RULE

A combination is selection of some given elements in which order does not matter.
The number of all combinations of n things, taken r at a time is −
nC 𝒏!
r=
r!(𝒏−r)!

Example 1. Find the number of subsets of the set {1,2,3,4,5,6} having 3 elements.
Solution: The cardinality of the set is 6 and we have to choose 3 elements from the
set. Here, the ordering does not matter. Hence, the number of subsets will be
6
C3=20.

Example 2. There are 6 men and 5 women in a room. In how many ways we can
choose 3 men and 2 women from the room?
Solution: The number of ways to choose 3 men from 6 men is 6C3 and the number of
ways to choose 2 women from 5 women is 5C2
Hence, the total number of ways is − 6C3×5C2=20×10=200

Example 3. How many ways can you choose 3 distinct groups of 3 students from total
9 students?
Solution: Let us number the groups as 1, 2 and 3
For choosing 3 students for 1st group, the number of ways − 9C3
The number of ways for choosing 3 students for 2nd group after choosing 1st group −
6C
3

The number of ways for choosing 3 students for 3rd group after choosing 1st and 2nd
group − 3C3
Hence, the total number of ways =9C3×6C3×3C3=84×20×1=1680
Module 1 13

ASSESSMENT ACTIVTY

Name: ____________________________________ Date: ____________


Year & Section: ____________________________ Score: ___________

Directions: Read each statement carefully and answer the following


problems using Combination. Write the letter of your answer on the
space provided from the choices given and show your solution on a
separate paper.
______1. Out of 7 consonants and 4 vowels, how many words of 3
consonants and 2 vowels can be formed?
A. 24400 B. 21300 C. 210 D. 25200
______2. In a group of 6 boys and 4 girls, four children are to be
selected. In how many different ways can they
be selected such that at least one boy should be there?
A. 159 B. 209 C. 201 D. 212
______3. In how many ways can a group of 5 men and 2 women be
made out of a total of 7 men and 3 women?
A. 1 B. 126 C. 63 D. 64
______4. From a group of 7 men and 6 women, five persons are to be
selected to form a committee so that at least 3 men are there
in the committee. In how many ways can it be done??
A. 624 B. 702 C. 756 D. 812
______5. A box contains 4 red, 3 white and 2 blue balls. Three balls
are drawn at random. Find out the
number of ways of selecting the balls of different colors?
A. 62 B. 48 C. 12 D. 24
______6. A question paper has two parts P and Q, each containing 10
questions. If a student needs to choose 8 from part P and 4 from
part Q, in how many ways can he do that?
A. None of these B. 6020 C. 1200 D. 9450
Module 1 14

______7. In how many ways can a selection of 3 men and 2 women can be
made from a group of 5 men and 5 women?
A. 10 B. 20 C. 30 D. 100
30
______8. C2
A. 435 B. 870 C. 470 D. 835
Module 1 15

LESSON 4

THE PIGEONHOLE PRINCIPLE

In 1834, German mathematician, Peter Gustav Lejeune Dirichlet, stated a principle


which he called the drawer principle. Now, it is known as the pigeonhole principle.

Pigeonhole Principle: If N objects are placed into k boxes, then there is at least one
box containing at least ⌈N/k⌉ objects.
If n > k (# pigeons > # pigeonholes) then at least one pigeonhole contains at least two
pigeons.
In problem solving, the “pigeons” are often numbers or objects, and the
“pigeonholes” are properties that the numbers/objects might possess.

Formula:
𝑁 = 𝑘 (𝑟 − 1) + 1
N−1
𝑘=
r−1
Example 1: Given a group of 100 people, at minimum, how many people were born in
the same month?
Solution: We have 12 months, so 100/12 = 8.33 gives us the content of each month.
But we cannot have partial people in each month, so we round up:
100
=9
2
Example 2. In the movie “Cheaper by the Dozen,” there are 12 children in the family.
(a) Prove that at least two of the children were born on the same day of the week;
Module 1 16

Solution: There are 12 children (pigeons) which we are placing into 7 days of the week
(pigeonholes), so by the PHP, some day of the week has two children.

(b) Prove that at least two family members (including mother and father) are born in
the same month;
Solution: There are 14 family members (pigeons) and only 12 months they can be born
in (holes), so some two family members must be born in the same month by the PHP.

(c) Assuming there are 4 children’s bedrooms in the house, show that there are at
least 3 children sleeping in at least one of them.
Solution: If no bedroom had at least 3 children, then each one would have 2 or fewer
children, so with four bedrooms the number of children would be ≤ 4×2 = 8, but we
know there are 12 children.

Example 3. Pigeonhole Elementary School has 500 students. Show that at least two of
them were born on the same day of the year.
Solution: There are 500 students, and only 366 days they could have been born on, so
by the PHP some two students were born on the same day.

Example 4. If you have 5 pigeons sitting in 2 pigeonholes, then one of the


pigeonholes must have at least 5/2 = 2.5 pigeons—but since (hopefully) the boxes
can’t have half-pigeons, then one of them must in fact contain 3 pigeons.

Example 5. There are 50 baskets of apples. Each basket contains no more than 24
apples. Show that there are at least 3 baskets containing the same number of apples.
Solution: The baskets are the pigeons, and we place each of them in one of 24
pigeonholes according to how many apples are in it. Thus, the ratio n/k of pigeons to
pigeonholes is 50/24 = 2.08. By Generalized PHP there are at least this many baskets
with the same number of apples, so there must be at least 3.
Module 1 17

ASSESSMENT ACTIVTY

Name: ____________________________________ Date: ____________


Year & Section: ____________________________ Score: ___________
Directions: Read each statement carefully then answer and prove the
following problems using Pigeonhole Principle. Write your solution on
the space provided.
1. There are 800,000 pine trees in a forest. Each pine tree has no more
than 600,000 needles. Show that at least two trees have the same
number of needles.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
2. A school has 15 classes with 26 students. Prove that at least two of
them celebrate birthday the same day.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
3. On an apple stand in a supermarket there are 16 boxes with 3 types
of apples. Each box contains apples of one type. Prove that there are
at least 6 boxes with apples of one type.
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Module 1 18

4. Prove that from any 12 natural numbers one can choose two those
difference is divisible by 11.
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
5. Sam has (many) pairs of red, yellow and purple socks. He gets up early
and wants to get his clothes without waking up his roommate. So he does
not turn on the light and grabs some socks in a dark. How many socks
should he take out to be sure to get at least four socks all of the same
color?
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
6. 51 numbers are chosen from the integers between 1 and 100 inclusively.
Prove that 2 of the chosen integers are consecutive.
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
7. Agoo East Elementary School has 1000 students. Show that at least two
of them were born on the same day of the year.
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
Module 1 19

MODULE SUMMARY

In module 1, you have learned about counting. There are four lessons in module 1.
Lesson 1 is the basics of counting namely the product rule and sum rule. The
product rule states that a procedure can be broken down into a sequence of two
tasks. There are n1 ways to do the first task and n2 ways to do the second task. Then,
there are n1 x n2 ways to do the procedure. The sum rule states that if a task can be
done either in one of n1 ways or in one of n2 ways, where none of the set of n1 ways
is the same as any of the n2 ways, then there are n1+n2 ways to do the task.
Lesson 2 deals with the permutation rule which is an ordered combination of
elements.
Lesson 3 discusses the combination rule which is selection of some given
elements in which order does not matter.
Lesson 4 presents the pigeonhole principle. If k is a positive integer and k + 1
objects are placed into k boxes, then at least one box contains two or more objects.
Congratulations! You have just studied Module 1. Now you are ready to evaluate how
much you have benefited from your reading by answering the summative test. Good
Luck!!!
Module 1 20

SUMMATIVE TEST

Name: ____________________________________ Date: ____________


Year & Section: ____________________________ Score: ___________
Directions: Read each problem carefully then solve. (2 pts. each item)
I. True/False. Write D if the statement is correct otherwise S.
______1. The Pigeonhole Principle tells us that if we have n + 1 pigeons
and n holes, since n + 1 > n, each box will have at least one pigeon.
______2. The Pigeonhole Principle tells us that with n pigeons and k holes
each hole can have at most [n/k] pigeons.
______3. In sum rule, there are n1+n2 ways to do the task.
______4. There are n1 x n2 ways to do the procedure in the product rule.
______5. A combination is an ordered combination of elements.

II. Solve the following. Use the next page to answer and show your solution.
(3 pts. each item)
Permutation
1. There are 7 members in a committee. How many ways are there to
choose a chairman, deputy chairman, secretary and a cash keeper?
2. Eight students promised to send a postcard each other. How many
postcards did they send together?
Combination
1. On a circle there are 9 points selected. How many triangles with
edges in these points exist?
2. In how many ways you can choose 8 of 32 playing cards not
considering their order?
3. In how many ways can a coach choose three swimmers from among
five swimmers?

Pigeonhole Principle

1. There are 38 different time periods during which classes at a


university can be scheduled. If there are 677 different classes, what
is the minimum number of different rooms that will be needed?
Module 1 21

Answer Sheet:
Module 1 22

REFERENCES

Aspnes, J. (2018). Notes on Discrete Mathematics.


http://www.cs.yale.edu/homes/aspnes/classes/202/notes.pdf
Brown, J. (2013). Discrete Structures and Their Interactions. Available at
https://sites.google.com/view/ccselibrary/home
Chandrasekaren, N. et al. (2015). Discrete Mathematics. Available at
https://sites.google.com/view/ccselibrary/home
Clifford Stein, Robert L. Drysdale and Kenneth Bogart (2011). Discrete
Mathematics for Computer Scientists. Massachusetts: Pearson Education,
Inc.
Farrel, J. (2018). Programming Logic Design: Comprehensive. 9th Ed. Cengage
Learning.
Hein,J. (2017). Discrete Structures, Logic, and Computability. Available at
https://sites.google.com/view/ccselibrary/home
Hunter, D. (2017). Essentials of Discrete Mathematics. Available at
https://sites.google.com/view/ccselibrary/home
Johnsonbaugh, R. (2018). Discrete Mathematics, 8th Edition. Pearson.
Kohar, R. (2016). Basic Discrete Mathematics: Logic, Set Theory, and
Probability. Available at
https://sites.google.com/view/ccselibrary/home
Kolman, B., et. al. (2018). Discrete Mathematical Structures (Classic Version),
6th Edition. Pearson.
Korfhage, R. (2014). Discrete Computational Structures. Available at
https://sites.google.com/view/ccselibrary/home
Pace, G.(2012). Mathematics of Discrete Structures for Computer Science.
Available at
Module 1 23

https://sites.google.com/view/ccselibrary/home

Panda, B.S., et. al. (2018). Algorithms and Discrete Applied Mathematics.
Springer International Publishing.
Pilato (2015). Framework of Digital Signal Processing. NY. Research Press.
Rosen, Kenneth H. (2018). Discrete Mathematics and Its Applications. Eight
Edition. New York: McGraw-Hill
Rubinfeld, Ronitt and Meyer, Albert R. (2005). Mathematics for Computer
Science. http://ocw.mit.edu/courses/electrical-engineering-and-
computer-science/6-042j-mathematics-for-computer-science-fall-
2005/index.htm
Vector illustrations used from https://www.vectorfair.com/

You might also like