Professional Documents
Culture Documents
PRINCIPLES OF COUNTING
Module 2
Sajith P
LBSITW
October 1, 2020
A reason for this importance has arisen from the growth of Computer
Science and the increasing use of algorithmic methods for solving
real-world practical problems.
These have led application of counting technique in a wide range of
subject areas, both within and outside Mathematics, including
network analysis, coding theory, analysis of algorithams, and
probability.
A reason for this importance has arisen from the growth of Computer
Science and the increasing use of algorithmic methods for solving
real-world practical problems.
These have led application of counting technique in a wide range of
subject areas, both within and outside Mathematics, including
network analysis, coding theory, analysis of algorithams, and
probability.
Example
Suppose there are 23 girls and 15 boys in a class. One of the students is
to be elected as a class representative. In how many different ways a
students can be elected as class representative.
Solution
Let T1 be the task of selecting a girl student as class representative.
And T2 be the task of selecting a boy student as class representative.
Then T1 can be performed in 23 ways.
Then T2 can be performed in 15 ways.
Then T1 or T2 can be performed in 23 + 15 = 38 ways.
Example
A department library has 35 text book in Computer Science and 40 books
in electronics. In how many ways a student at this department can select a
book.
Solution
Let T1 be the task of selecting a computer science book.
And let T2 be the task of selecting an electronics book.
Then T1 can be performed in 35 ways.
Then T2 can be performed in 40 ways.
Then T1 or T2 can be performed in 35 + 40 = 75 ways.
Suppose T be a task.
The task T is broken into two task first and
second tasks.
Let the first task be T1 and the second task be
T2 .
Let T1 can be performed in m ways.
And T2 can be performed in n ways.
Then toatl task T can be performed in m . n
ways.
Example
Suppose there are 23 girls and 15 boys in a class.
One girl and a boy is to be selected as class
representative. In how many different ways a girl
and a boy can be elected as class representative.
Solution
This problem illustrates the difference between the product rule and the
sum rule.
If we must make one choice and then another choice, the product rule
applies.
If we must make one choice or another choice, the sum rule applies .
Here we want to do two things, one after the other.
So we use product rule.
Let T1 be the task of selecting a girl student as class representative.
And T2 be the task of selecting a boy student as class representative.
Then T1 can be performed in 23 ways.
Then T2 can be performed in 15 ways.
Then T1 and T2 can be performed in 23 . 15 = 345 ways.
Example
A new company have two employees. The
company rents a floor of a building with 12
offices. How many ways are there to assign
different offices to these two employees?
Solution
Let T1 be the task of alloting an office to the first employee.
Then T1 can be performed in 12 different ways
Let T2 be the task of alloting an office to the second employee.
After alloting an office to the first employee left with only 11 office.
Then T2 can be performed in 11 different ways.
Then T1 and T2 can be performed in 12 . 11 = 132 ways.
Ways to assign different offices to these two employees = 132
Example
The chairs of an auditorium are to be labeled with
an uppercase English letter followed by a positive
integer not exceeding 100. What is the largest
number of chairs that can be labeled differently?
Solution
Let T1 be the task of alloting a label with uppercase English letter.
Then T1 can be performed in 26 different ways
Let T2 be the task of alloting one of the 100 possible integers.
Then T2 can be performed in 100 different ways.
Then T1 and T2 can be performed in 26 . 100 = 2600 ways.
The largest number of chairs that can be labeled differently = 2600.
Example
There are 18 electronics majors and 325 computer science majors at a
college.
1 In how many ways can a student can pick two different majours, so
that one is an electronics major and the other is a computer science
major?
2 In how many ways can one student be picked which is either a
electronics major or a computer sci- ence major?
Solution
Let T1 be the task of selecting an electronics major.
Then T1 can be performed in 18 different ways
Let T2 be the task of selecting acomputer science major.
Then T2 can be performed in 325 different ways.
1 T1 and T2 can be performed in 18 . 325 = 5850 ways.
2 T1 or T2 can be performed in 18 + 325 = 343 ways.
Example
How many three digit natural numbers with distinct digits can be formed
using digits 1 . . . . . . , 9 such that each digit is odd or each digit is even?
Solution
Let T1 be the task of selecting the fist digit.
Let T2 be the task of selecting the second digit.
Let T3 be the task of selecting the third digit.
First part
Each digit is odd.So the selection is don from the set
{1, 3, 5, 7, 9 } and the digits are diffent.
Then T1 can be performed in 5 different ways
Then T2 can be performed in 4 different ways.
Then T3 can be performed in 4 different ways.
So number three digit numbers with each digit odd
= T1 . T2 . T3 = 5. 4. 3 = 60
Solution
In second part
Each digit is even. So the selection is don from the set
{2, 4, 6, 8 } and the digits are diffent.
Then T1 can be performed in 4 different ways
Then T2 can be performed in 3 different ways.
Then T3 can be performed in 2 different ways.
So number three digit numbers with each digit odd
= T1 . T2 . T3 = 4. 3. 2 = 24
Number of three digits with each digit odd or even = 60 + 24 = 84
Example
Alice has 15 different books. In how many ways can she place her books
on two shelves so that there is at least on book in each shelves?
Solution
Let T1 be the task of arrianging 15 books in two shelves.
Then T1 can be performed in 15 ! different ways
Let T2 be the task of arrianging the books in two shelves so that there is
at least one book on each shelf.
Then T2 can be performed in the following 14 different ways.
sh-1 1 2 3 4 5 6 7 8 9 10 11 12 13 14
sh-2 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Then T1 and T2 can be performed in 14 .15 ! ways.
Example
A computer password is to consist of two lower case letters followed by
four digits. Determine how many passwords are possible if repetition of
letters and digits is permitted
Solution
Let T1 be the task of selecting fist letter in the password. This can be don
in 26 different ways
Let T2 be the task of selecting second letter in the password.This can be
don in 26 different ways
Let T3 be the task of selecting a number in the third place in the
password. This can be don in 10 different ways
Let T4 be the task of selecting a number in the fourth place in the
password.This can be don in 10 different ways
Let T5 be the task of selecting a number in the fifth place in the password.
This can be don in 10 different ways
Solution
Let T6 be the task of selecting a number in the sixth place in the password.
This can be don in 10 different ways
Then total number of password can be formed Let T6 be the task of
selecting a number in the sixth place in the password.
This can be don in 10 different ways
Then total number of password can be formed
Example
How many bit strings of length ten both begin
and end with a 1?
Solution
Let T1 be the task of selecting first bit. This can be don in only one way
Let T2 be the task of selecting the 10th bit. This also can be don in one
way
Let T3 be the task of selecting 8 bits inbetween first and last bit. This can
be don in 28 ways, since each bit can be selected in 2 ways either o or 1
So the total number of bit of string of length 10
both begin and end with 1 = 1. 28 . 1 = 256
Example
Prove P(n, r ) = n(n − 1)(n − 2)(n − 3) . . . (n − r + 1)