0% found this document useful (0 votes)
33 views79 pages

Module 1

This document discusses principles of counting and combinations with repetition in discrete mathematics. It begins by explaining the sum and product rules for counting, which state that if tasks can be performed independently their counts are summed, and if tasks rely on each other their counts are multiplied. It provides examples of applying these rules, such as counting ways to select students or breakfast items. It then explains combinations with repetition using formulas and interpretations like distributing identical objects in containers. It gives examples such as counting ways to select coins from multiple denominations.

Uploaded by

Dhinesh T
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)
33 views79 pages

Module 1

This document discusses principles of counting and combinations with repetition in discrete mathematics. It begins by explaining the sum and product rules for counting, which state that if tasks can be performed independently their counts are summed, and if tasks rely on each other their counts are multiplied. It provides examples of applying these rules, such as counting ways to select students or breakfast items. It then explains combinations with repetition using formulas and interpretations like distributing identical objects in containers. It gives examples such as counting ways to select coins from multiple denominations.

Uploaded by

Dhinesh T
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/ 79

MODULE-1

Principles of Inclusion and Exclusion

CLASS-1

DISCRETE MATHEMATICS AND GRAPH THEORY 18-04-2023


 CONTENT
 Basics of Counting:

 The Sum Rule, the Product Rule

 Combinations with Repetition

 Pigeonhole Principle

 The Principle of Inclusion Exclusion

 The Generalizations of the Principles

 Derangements– Nothing is in its Right Place

 Rook Polynomials

 Arrangements with Forbidden Positions.

DISCRETE MATHEMATICS AND GRAPH THEORY 18-04-2023


PRINCIPLES OF COUNTING
The Rules of Sum and Product

In many situations of computational work, we employ two basic rules of counting, called the Sum Rule and the Product

Rule. These rules are restated and illustrated in the following paragraphs.

The Sum Rule

Suppose two tasks 𝑇1 and 𝑇2 are to be performed. If the task 𝑇1 can be performed in 𝑚 different ways and the task 𝑇2

can be performed in n different ways and if these two tasks cannot be performed simultaneously, then one of the two tasks

(𝑇1 and 𝑇2 ) can be performed in 𝑚 + 𝑛 ways.

More generally, if 𝑇1 , 𝑇2 , 𝑇3 …….𝑇𝑘 are 𝑘 tasks such that no two of these tasks can be performed at the same time

and if the task 𝑇𝑖 can be performed in 𝑛𝑖 different ways, then one of the 𝑘 tasks (namely 𝑇1 or 𝑇2 or 𝑇3 …….or 𝑇𝑘 ) can be

performed in 𝑛1 + 𝑛2 + 𝑛3 +…….+𝑛𝑘 different ways.


18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 3
PRINCIPLES OF COUNTING

Example 1: Suppose there are 16 boys and 18 girls in a class and we wish to select one of these students (either a boy or a

girl) as the class representative.

The number of ways of selecting a boy is 16 and the number of ways of selecting a girl is 18. Therefore, the number of

ways of selecting a student (boy or girl) is 16 + 18 = 34.

Example 2: Suppose a Hostel library has 12 books on Mathematics, 10 books on Physics, 16 books on Computer Science

and 11 books on Electronics. Suppose a student wishes to choose one of these books for study.

The number of ways in which he can choose a book is 12 + 10 + 16 + 11 = 49.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 4


PRINCIPLES OF COUNTING

The Product Rule

Suppose that two tasks 𝑇1 and 𝑇2 are to be performed one after the other. If 𝑇1 can be performed in 𝑛1 different ways, and

for each of these ways 𝑇2 can be performed in 𝑛2 different ways, then both of the tasks can be performed in 𝑛1 𝑛2

different ways.

More generally, suppose that 𝑘 tasks 𝑇1 , 𝑇2 , 𝑇3 …….𝑇𝑘 are to be performed in a sequence. If 𝑇1 can be performed in 𝑛1

different ways and for each of these ways 𝑇2 can be performed in 𝑛2 different ways, and for each of 𝑛2 different ways of

performing 𝑇1 and 𝑇2 in that order, 𝑇3 can be performed in 𝑛3 different ways, and so on, then the sequence of tasks 𝑇1 ,

𝑇2 , 𝑇3 …….𝑇𝑘 can be performed in 𝑛1 𝑛2 𝑛3 …….𝑛𝑘 different ways.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 5


PRINCIPLES OF COUNTING

Example 4. Suppose a person has 8 shirts and 5 ties. How many different ways of choosing a shirt and a tie?

SOLUTION: Then he has 8 × 5 = 40 different ways of choosing a shirt and a tie.

Example 5. Suppose we wish to construct sequences of four symbols in which the first 2 are English letters and the

next 2 are single digit numbers.

SOLUTION: If no letter or digit can be repeated then the number of different sequences that we can construct is

26 × 25 × 10 × 9 = 58500.

If repetition of letters and digits are allowed then the number of different sequences that we can construct is

26 × 26 × 10 × 10 = 67600.
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 6
Example 6. Suppose a restaurant sells 6 South Indian dishes, 4 North Indian dishes, 3 hot beverages
and 2 cold beverages, for breakfast, a student wishes to buy 1 South Indian dish and 1 hot beverage,
or 1 North Indian dish and 1 cold beverage.

SOLUTION: Then he can have the first choice in 6 × 3 = 18 ways and he can have the second choice in 4 ×
2 = 8 ways. The total number of ways he can buy his breakfast items is 18 + 8 = 26.

Example 7. There are 20 married couple in a party. Find the number of ways of choosing one woman
and one man from the party such that the two are not married to each other.

SOLUTION: from the party, a woman can be chosen in 20 ways. Among the 20 men in the party, one is her
husband. Out of the 19 other men one can be chosen in 19 ways. Therefore, the required number is 20 × 19
= 380.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 7


• Example 8. A license plate consists of two English letters followed by four digits. If repetitions are allowed, how many of the

plates have only vowels (A, E, I, O, U) and even digits (0, 2 , 4 , 6, 8)?

SOLUTION: Each of the first two positions in a plate can be filled in 5 ways (with vowels and each of the remaining four places can

be filled in 5 ways (with digits 0, 2, 4, 6, 8). Therefore, the number of possible license plates of the given type is (5 × 5) × (5 × 5 × 5 ×

5) = 56 = 15,625.

• Example 9. There are four bus routes between the places A and B and three bus routes between the places B and C. Find the

number of ways a person can make a round trip from A via B if he does not use route more than once.

SOLUTION: The person can travel from A to B in four ways and from B to C in three ways, but only two ways from C to B and only

in three ways from B to A if he does not use a route more than once. Therefore, the number of ways he can make the round trip under

the given condition is 4 × 3 × 2 × 3 = 72.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 8


Example 10. Cars of a particular manufacturer come in 4 models, 12 colours, 3 engine sizes, and 2 transmission types.

(a) How many distinct cars (of this company) can be manufactured? (b) Of these how many have the same colour?

SOLUTION:

(a) By the product rule, it follows that the number of distinct cars that can be manufactured is 4 × 12 × 2 × 3 = 288.

(b) (b) For any chosen colour, the number of distinct cars that can be manufactured is

• 4 × 3 × 2 = 24.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 9


Example 11. Find the number of 3-digit even numbers with no repeated digits

SOLUTION: Here we consider numbers of the form xyz, where each of x, y, z represents a digit under given

restrictions. Since xyz has to be even, z has to be 0, 2, 4, 6, or 8. If z is 0, then x has 9 choices and if z is 2, 4, 6 or 8 (4

choices) then x has 8 choices. (Note that x cannot be zero). Therefore, z and x can be chosen in (1 × 9) + (4 × 8) = 41

ways. For each of these ways, y can be chosen in 8 ways. Hence, the desired number is 41 × 8 = 328.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 10


Example 12. Find the total number of positive integers that can be formed from the digits 1, 2, 3, 4 if no digit is

repeated in any one integer.

SOLUTION: We first note that no integer of the required type can contain more than 4 digits. Let s1, s2, s3, s4 denote the

number of integers of the required type containing one, two, three, four digits respectively.

• Since there are four digits, there are four integers containing exactly one digit (i.e. s1 = 4), there are 4 × 3 = 12 integers

containing exactly two digits (i.e. s2 = 12), there are 4 × 3 × 2 = 24 integers containing exactly three digits (i.e. s3 = 24)

and there are 4 × 3 × 2 × 1 = 24 integers containing exactly three digits (i.e. s4 = 24). Therefore, the required number is

• s1 + s2 + s3 + s4 = 64

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 11


Combinations with Repetitions

• Suppose we wish to select, with repetition, a combination of r objects from a set of n distinct

objects. The number of such selections is given by

(𝑛+𝑟−1)!
• 𝐶 𝑛 + 𝑟 − 1, 𝑟 ≡ ≡ 𝐶 𝑟 + 𝑛 − 1, 𝑛 − 1
𝑟!(𝑛−1)!

In other words, 𝐶 𝑛 + 𝑟 − 1, 𝑟 ≡ 𝐶 𝑟 + 𝑛 − 1, 𝑛 − 1 represents the number of combinations of n

distinct objects, taken r at a time, with repetitions allowed.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 12


The following are other interpretations of this number:

1) 𝐶 𝑛 + 𝑟 − 1, 𝑟 ≡ 𝐶 𝑟 + 𝑛 − 1, 𝑛 − 1 represents the number of ways in which r identical objects can be


distributed among n distinct containers.

2) 𝐶 𝑛 + 𝑟 − 1, 𝑟 ≡ 𝐶 𝑟 + 𝑛 − 1, 𝑛 − 1 represents the number of non-negative integer solutions of the equation.

𝑥1 + 𝑥2 + … … . . . + 𝑥𝑛 = 𝑟

Example 1. A bag contains coins of seven different denominations, with at least one dozen coins in each
denomination. In how many ways can we select a dozen coins from the bag?

 The selection consists in choosing with repetitions, r = 12 coins of n = 7 distinct denominations. The number of
ways of making this selection is

18!
• 𝐶 7 + 12 − 1, 12 = 𝐶 18,12 = = 18,564
12!6!
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 13
Example 2. In how many ways can we distribute 10 identical marbles among 6 distinct containers?

• The selection consists in choosing with repetitions, r = 10 marbles for n=6 distinct containers. The required number is

15!
• 𝐶 6 + 10 − 1, 10 = 𝐶 15,10 = = 3003
10!5!

Example 3. A cake shop sells 20 kinds of cakes. If there are at least a dozen cakes of each kind, in how many ways a dozen
cakes can be chosen?

• The required number is

• 𝐶 20 + 12 − 1, 12 = 𝐶 31,12 = 141,120,525

Example 4. Find the number of non-negative integer solutions of the equation 𝐱𝟏 + 𝐱𝟐 + 𝐱𝟑 + 𝐱𝟒 + 𝐱𝟓 = 𝟖

 The required number is 𝐶 5 + 8 − 1, 8 = 𝐶 12, 8 = 495

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 14


Example 6. Find the number of non-negative integer solutions of the equations 𝑥1 + 𝑥2 + 𝑥3 + ⋯ … + 𝑥6 < 10

 We have to find the number of non-negative integer solutions of the equation

𝑥1 + 𝑥2 + 𝑥3 + ⋯ … + 𝑥6 = 9 − 𝑥7

Where 9 − 𝑥7 ≤ 9 so that 𝑥7 is a non-negative integer. Thus, the required number is the number of non-negative

solutions of the equation

𝑥1 + 𝑥2 + 𝑥3 + ⋯ … + 𝑥7 = 9

This number is

15!
𝐶 7 + 9 − 1, 9 = 𝐶 15,9 = = 5005
9! 6!

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 15


Example 7. Find the number of positive integer solutions of the equation 𝑥1 + 𝑥2 + 𝑥3 = 17 we have 𝑥1 ≥ 1,

𝑥2 ≥ 1, 𝑥3 ≥ 1.

Let us set 𝑦1 = 𝑥1 − 1, 𝑦2 = 𝑥2 − 1, 𝑦3 = 𝑥3 − 1. The 𝑦1 , 𝑦2 , 𝑦3 are all non-negative integers.

• When written in terms of y’s, the given equation reads

• (𝑦1 +1) + 𝑦2 + 1 + (𝑦3 +1) = 17, 𝑜𝑟 𝑦1 + 𝑦2 + 𝑦3 = 14

• The number of non-negative integer solutions of this equation is the required number. This number is

16! 16 ×15
• 𝐶 3 + 14 − 1, 14 = 𝐶 16, 14 = = = 120
14!2! 2

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 16


Example 8. Find the number of integer solutions of 𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 = 30 Where 𝑥1 ≥ 2, 𝑥2 ≥ 3,

𝑥3 ≥ 4, 𝑥4 ≥ 2, 𝑥5 ≥ 0.

 Let us set 𝑦1 = 𝑥1 − 2, 𝑦2 = 𝑥2 − 3, 𝑦3 = 𝑥3 − 4, 𝑦4 = 𝑥4 − 2, 𝑦5 = 𝑥5 . Then 𝑦1 , 𝑦2 , . . 𝑦5 are all non-negative

integers. When written in terms of y’s, the given equation reads,

• (𝑦1 +2) + 𝑦2 + 3 + (𝑦3 +4) + (𝑦4 +2) + 𝑦5 = 30 or 𝑦1 + 𝑦2 + 𝑦3 + 𝑦4 + 𝑦5 = 19

• The number of non-negative integer solutions of this equation is the required number, and the number is

23!
• 𝐶 5 + 19 − 1, 19 = 𝐶 23, 19 = = 8855.
19!4!

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 17


PIGEONHOLE PRINCIPLE

Statement: - If 𝑛 pigeons occupy 𝑚 pigeonholes and if 𝑚 < 𝑛 then at least one pigeonhole contains two or more

pigeons

The use of pigeonhole principle is to

 Identify the pigeons (objects)

 Identify the pigeonhole (categories the desired characteristics)

A simple Illustration of above principle is that, If 6 pigeons occupy 4 pigeon holes, then at least one pigeonhole must

contain two or more pigeons in it.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 18


EXTENDED PIGEONHOLE PRINCIPLE: -

𝑛−1
Statement: - If 𝑛 pigeon are assigned to 𝑚 pigeonholes then one of the pigeonholes must contains at least +1
𝑚

pigeons.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 19


PROBLEMS

1. Show that if you pick any five numbers from the integers 1-8, then two of them must add up to 9.

Solution: - Let us first write all the numbers from 1 to 8 as (1,2,3,4,5,6,7,8)

Now let's take any 5 numbers from 1 to 8 such as (1,3,4,7,8)

As it given that any two of the numbers out of the 5 numbers we have chosen should be equal to sum 9.

Let's add every two numbers so that we can get one such pair of numbers whose sum would be 9.

Case 1>. 1 + 3 = 4

Case 2>. 3 + 4 = 7

Case 3>. 4 + 7 = 11

Case 4>. 7 + 8 = 15

Case 5>. 8 + 1 = [ 9 ]
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 20
PROBLEMS

Hence in Case 5 we get a pair of numbers 8 and 1 whose sum is equal to 9 , so we present them together in a same set as

{8,1}.So according to Pigeonhole Principle ,We can take any 5 numbers and there will always exist one pair whose sum is

equal to 9.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 21


PROBLEMS
2. ABC is an equilateral triangle whose sides are of the length 1cm each. If we select 5

points inside the triangles, Prove that at least two of these points are such that the

distance is less than ½ cm.

Solution: -

Consider a Δ DEF formed by midpoint of the sides BC, CA, AB divide ABC into four small

equilateral triangle(position) each of which has sides equal to ½ cm.

Treating each of the triangle as pigeonhole and 5 points chosen inside the triangle as a pigeon.

We find by using pigeonhole principle that at least one portion must contain two or more

points.

Evidently the distance between such points is less than ½ cm

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 22


PROBLEMS

3. Show that if 30 dictionaries in a library contain a total of 61,327 pages, then one of the dictionaries must have at

least 2045 pages.

Solution: - Given that pigeon(n) = 61327 and pigeonhole(m) = 30

We need to prove p + 1 = 2045

𝑛−1
Therefore 𝑝+1= +1
𝑚

61327 − 1
= +1
30

= 2044.2 + 1

= 2044 + 1 = 𝑝 + 1 = 2045

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 23


PROBLEMS

4. Show that if seven colors are used to paint 50 bicycles, at least eight bicycles will be the same color.

Solution: - Given that pigeon(n) = 50 and pigeonhole(m) = 7

We need to prove p + 1 = 8

n−1
Therefore p+1 = +1
m

50−1
= +1
7

= 7 + 1

p + 1 = 8

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 24


PROBLEMS

5. If 13 people are assembled in a room, show that at least two of them must have their birthdays in the same month.

Solution: - Given that pigeon(n) = 13 and pigeonhole(m) = 12

We need to prove p + 1 = 2

n−1
Therefore p+1 = +1
m

13−1
= +1
12

= 1 + 1

p+1 =2

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 25


PROBLEMS

6. How many friends must you have to guarantee that at least 5 of them will have birthdays in the same month?

Solution: - Given that pigeon(n) = ? and pigeonhole(m) = 12, p + 1 = 5

We have to find n = ?

n−1
Therefore p + 1 = +1
m
48 = n – 1
n−1
5= +1
12 n = 48 +1

n−1
5−1= n = 49
12

n−1
4=
12

4 × 12 = n − 1

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 26


PROBLEMS

7. Six books each of physics, chemistry, mathematics and four books of biology totally contains 12225 pages. Find the

number of pages contained in a book. [Homework].

8.Find how many of a sample size of 1000 people,

a. Are born in the same month.

b. Born on a particular day are born in the same hour. [Homework].

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 27


PRINCIPLE OF INCLUSION EXCLUSION

If S is a finite set, then the number of elements in S is called cardinality of S and is denoted by S . If A and B are subset of S,

then the cardinality of A ∪ B is given by the formula.

A ∪ B = A + B − A ∩ B −− −(1)

Thus, to determine the elements of A ∪ B, we include all elements of A and B, but exclude all elements common to A and B.

ഥ∩ B
A ഥ = A ∪ B and

A∪B = S − A∪B

ഥ∩ B
A ഥ = A ∪ B = S − A − B + A ∩ B − −(2)

The formula (1) and (2) are equivalent to one another, and either of these is referred to as Addition Principle or the Principle

of inclusion-exclusion.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 28


PRINCIPLE OF INCLUSION EXCLUSION

Principle of Inclusion-Exclusion for 𝒏 sets

| A1  A2  A3 | = | A1 | + | A2 | + | A3 | - | A1  A2 | - | A1  A3 | - | A2  A3 | + | A1  A2  A3 |

| A1  A2  . . .  An | = Σ | Ai | - Σ | Ai  Aj | + Σ | Ai  Aj  Ak | - . . …… + (-1)n-1 Σ | A1  A2  ...  An |-----(3)

By De’morgan law, we have

A1  A2  . . .  An = 𝐴1 ∩ 𝐴2 ∩ 𝐴3……………….∩ 𝐴𝑛 .

Since 𝐴ҧ = 𝑆 − 𝐴 for any subset 𝐴 𝑜𝑓 𝑆, this yields

𝐴1 ∩ 𝐴2 ∩ 𝐴3 …. .∩ 𝐴𝑛 = A1  A2  . . .  An

= 𝑆 − A1  A2  . . .  An

Using equation (3), this becomes

𝐴1 ∩ 𝐴2 ∩ 𝐴3 …. .∩ 𝐴𝑛 = 𝑆 −Σ | Ai |+ Σ | Ai  Aj |- Σ | Ai  Aj  Ak |- . . + (-1)n Σ | A1  A2  ...  An |-----(4)


18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 29
PRINCIPLE OF INCLUSION EXCLUSION

Equation (4) can also be written as

N= 𝑆1 − 𝑆2 + 𝑆3 + ⋯ … . . +(−1)n−1 𝑆𝑛 -----(5)

ഥ = 𝑆0 − 𝑆1 + 𝑆2 − 𝑆3 + ⋯ … . . +(−1)n 𝑆𝑛 -----(6)
𝑁

Where 𝑆0 = 𝑆

𝑆1 = Σ | Ai |

𝑆2 = Σ | Ai  Aj |

𝑆3 = Σ | Ai  Aj  Ak |

𝑆𝑛 = Σ | A1  A2  ...  An |
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 30
GENERALIZATION

The principle of inclusion-exclusion as given by equation (6) gives the number of elements in 𝑠 that satisfy none of the

conditions.

The following expression determines the number of elements in 𝑆 that satisfy exactly 𝑚 𝑜𝑓 𝑛 conditions 0 ≤ 𝑚 ≤ 𝑛 .

𝑚+1 𝑚+2 𝑛
𝐸𝑚 = 𝑆𝑚 − 𝑆𝑚+1 + 𝑆𝑚+2 − ⋯ … … + (−1)n−m 𝑆
1 2 𝑛−𝑚 𝑛

For 𝑚 = 0, this expression reduces to equation (6).

Further, the following expression determines the number of elements in 𝑆 that satisfy at least 𝑚 𝑜𝑓 𝑛 conditions 1 ≤ 𝑚 ≤ 𝑛 .

𝑚 𝑚+1 𝑛−1
𝐿𝑚 = 𝑆𝑚 − 𝑆𝑚+1 + 𝑆𝑚+2 − ⋯ … … + (−1)n−m 𝑆
𝑚−1 𝑚−1 𝑚−1 𝑛

for 𝑚 = 1, this expression in reduces to eq (5).

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 31


PROBLEMS

EXAMPLE 01

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 32


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 33


PROBLEMS

EXAMPLE 02

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 34


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 35


PROBLEMS

EXAMPLE 03

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 36


36
PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 37


37
PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 38


38
PROBLEMS

EXAMPLE 04

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 39


39
PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 40


40
PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 41


PROBLEMS

EXAMPLE 05

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 42


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 43


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 44


PROBLEMS

EXAMPLE 06

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 45


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 46


PROBLEMS

EXAMPLE 07

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 47


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 48


PROBLEMS
EXAMPLE 08

Solution:

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 49


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 50


PROBLEMS

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 51


PROBLEMS (Home Work)

EXAMPLE 09

EXAMPLE 10

EXAMPLE 11

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 52


DERANGEMENTS – NOTHING IS IN ITS RIGHT PLACE
Derangements:The word ‘arrangement’ refers as things in order. The word derangement is opposite of arrangements

which refers as nothing is in its right place.

A permutation of 𝑛 distinct objects in which none of the objects is in its original place is called derangement. The number

of possible derangement of 𝑛 distinct things is denoted by Dn or dn.

If there are n integers 1 2 3 ⋯ 𝑛, then the derangement is that 1 should not be in first place, 2 should not be second place, 3

should not be in third place, and so on.

Examples:

i. If there is only one thing, evidently 𝑑1 = 0.

ii. Suppose we have 2 things, the arrangement is 1 2 and the only possible derangement is 2 1. Hence 𝐷2 = 1.

iii. Suppose we have 3 things, the arrangement is 1 2 3 and the only possible derangements are 3 1 2 and 2 3 1. Hence

𝐷318-04-2023
= 2. DISCRETE MATHEMATICS AND GRAPH THEORY 53
DERANGEMENTS – NOTHING IS IN ITS RIGHT PLACE

Formula for 𝑑𝑛 for 𝑛 ≥ 1 is given by

1 1 1 −1 𝑛
𝑑𝑛 = 𝑛! 1 − + − ± ⋯ +
1! 2! 3! 𝑛!

𝑛
−1 𝑘
𝑑𝑛 = 𝑛! × ෍
𝑘!
𝑘=0
If 𝑛 is large that is 𝑛 ≥ 7 𝑑𝑛 = 𝑛! × 𝑒 −1 .

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 54


PROBLEMS
1. Compute 𝐃𝟒 and verify the result by actually listing all the derangements of 1234.
Solution
Here there ae 4 objects. Therefore, the number arrangements is,

1 1 1 −1 𝑛
𝑑𝑛 = 𝑛! 1 − + − ± ⋯ +
1! 2! 3! 𝑛!

1 1 1 1
𝑑4 = 4! 1 − + − +
1! 2! 3! 4!
1 1 1
= 24 × 1 − 1 + − +
2 6 24
= 12 − 4 + 1 = 9
Now we check that the nine derangements of 1 2 3 4 are
2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321 totally 9 arrangement.
Thus, 𝐷4 = 9 and the same is verified by listing all derangements.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 55


PROBLEMS
2. Find the number of ways of the alphabets A, B, C, D, E, F, G are arranged such that A is not in first position, B is not
in second position,…, G is not in seventh position.
Solution
Here we need to find d7 as there are 7 objects
dn = n! × e−1
d7 = 7! × e−1 = 5040 × 0.3679 = 1854.11 ≈ 1854

3. Seven books are distributed among 7 students for reading. The books are recollected and redistributed. In how many
ways will each student get to read two different books.
Solution
Given 7 books are distributed to 7 students in 7 P7 = 7! Ways.
As books are recollected and redistributed so that each student get to read two different books means that we need to find the
derangement of 7 books multiplied total number of arrangements = 7! × 7! × e−1 = 9342708.48 ≈ 9342709

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 56


PROBLEMS
Note:
From the set of all permutation of 𝑛 distinct objects, one permutation is chosen at random. What is the probability that it
is not a derangement?
 The number of permutation of 𝑛 distinct object is 𝑛!.
The number of derangement of these objects is 𝑑𝑛 .
Therefore , the probability that a permutation chosen is not a derangement is

𝑑𝑛 1 1 −1 𝑛
𝑝=1− = 1 − + − ⋯….
𝑛! 1! 2! 𝑛!
For 𝑛 ≥ 7, this is approximated to
𝑝 = 1 − 𝑒 −1 = 1 − 0.3679 = 0.6321

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 57


PROBLEMS

4.How many permutations of 1, 2, 3, 4, 5, 6, 7, 8 are not derangements?


Solution
The number of permutation of 1, 2, …,8 are 8!
The number of derangements 1, 2, …,8 are d8
d8 = 8! × e−1 = 40320 × 0.3679 = 14832.89 ≈ 14833
Thus required number of permutations that are not derangements is denoted by d8
d8 = 8! − d8 = 40320 − 14833 = 25487

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 58


ROOK POLYNOMIALS

Introduction

Chess is an indoor game played between to opponents on opposite side using board which contain 64 of alternating

colours. Each player has 16 pieces of pawns in opposite colours white and black with various names placed on each square

of keeping top 2 rows and bottom 2 rows on the board having 8 rows and 8 columns consist 16 squares.

Rook is the name of the pawn placed on square of the chess board. Two of the pawns placed on any board having squares

greater than or equal to two are said to be attack each other if they are in the same row or column.

Rook Polynomial:

Consider a board 𝐶, that assemble a chess board or part of a chess board, consisting of 𝑛 number of a square pawns are to

be placed in the squares such that no two pawns occupy the same squares. Two pawns on the board having more than two

squares are set to be captured each other. If they(pawns) are in the same row or same column of the same board.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 59


ROOK POLYNOMIALS

For 2 ≤ 𝑘 ≤ 𝑟, let 𝑟𝑘 denote the number of ways in which 𝑘 pawns can be placed on a board 𝐶 such that no two pawns

can captured each other, then the polynomial denoted by

𝑅𝑘 𝑥 = 𝑟 𝐶, 𝑥 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥 2 + 𝑟3 𝑥 3 + … … … + 𝑟𝑛 𝑥 𝑛

is the rook polynomial for each board 𝐶. Here 𝑟1 always represents the number of squares on the board.

Product Formula:

Suppose a board 𝐶 is made of two parts 𝐶1 and 𝐶2 where 𝐶1 and 𝐶2 have no square in same row or column of 𝐶 such

parts of 𝐶 are called disjoint sub board of 𝐶 then the rook polynomial of 𝐶 can be written as 𝑟 𝐶, 𝑥 = 𝑟 𝐶1 , 𝑥 𝑟 𝐶2 , 𝑥

In generally,

If 𝐶 is made up of pair wise disjoint sub board 𝑐1 , 𝑐2 , 𝑐3 … … . . 𝑐𝑛 are of

𝑟 𝐶, 𝑥 = 𝑟 𝑐1 , 𝑥 𝑟 𝑐2 , 𝑥 … … … 𝑐𝑛 , 𝑥

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 60


ROOK POLYNOMIALS

Expansion Formula:

Let 𝐶 be the given board we choose particular square ⊛. Let D be the board obtained from C by deleting the row and

column containing the ⊛ and let E be the board obtained from C by deleting only the square ⊛.

The rook polynomial for board C can be written has 𝑟 𝐶, 𝑥 = 𝑥𝑟 𝐷, 𝑥 + 𝑟 𝐸, 𝑥

Note: Shaded portion of board is called forbidden position.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 61


PROBLEMS

1. Find the rook polynomial for the following 𝟏 × 𝟏 board


1

Solution

w.k.t 𝑟 𝐶, 𝑘 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥 2 + 𝑟3 𝑥 3 + … … … + 𝑟𝑛 𝑥 𝑛

Here 𝑟1 = 1 as there is only one square. And all other 𝑟2 = 𝑟3 = ⋯ = 𝑟𝑛 = 0

Thus rook polynomial is given by

𝑟 𝐶, 𝑥 = 1 + 𝑥

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 62


PROBLEMS

2. Find the rook polynomial for the following 𝟐 × 𝟐 board 1 2


Solution
3 4
w.k.t 𝑟 𝐶, 𝑥 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥2 + 𝑟3 𝑥3 + … … … + 𝑟𝑛 𝑥𝑛.

For this board 𝑟1 = 4

The number of ways in which two rooks can be place on this board such that no two pawns capture each other is 𝑟2 = 2

Because the two possible such positions are 1,4 & (2,3)

Three rooks cannot be place in this board such that no two pawns capture each other. Thus 𝑟3 = 0. Similarly, 𝑟4 = 0 and

so on.

Accordingly, the rook polynomial for the board is

𝑟 𝐶, 𝑥 = 1 + 4𝑥 + 2𝑥 2
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 63
PROBLEMS
1 2 3
3. Find the rook polynomial for the following 𝟑 × 𝟑 board
4 5 6

Solution 7 8 9

w.k.t 𝑟 𝐶, 𝑥 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥 2 + 𝑟3 𝑥 3 + … … … + 𝑟𝑛 𝑥 𝑛 .

For this board 𝑟1 = 9

We note that 2 non-capturing rooks can be placed on the board in the following

positions

1,5 , 1,6 , 1,8 , 1,9 , 2,4 , 2,7 , 2,6 , 2,9 , 3,4 , 3,5 , 3,7 , 3,8 , 4,8 , 4,9 ,

5,7 , 5,9 , 6,7 , (6,8)

Thus 𝑟2 = 18

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 64


PROBLEMS
1 2 3

4 5 6
Next, we look out for the positions of placing 3 mutually non attacking rooks. The

positions are as follows. 7 8 9

1,5,9 , 1,6,8 , 2,4,9 , 2,6,7 , 3,4,8 , (3,5,7)

Thus, 𝑟3 = 6

Later we find that four or more mutually non-capturing rooks can not be placed on

board. Thus 𝑟4 = 0. Similarly, 𝑟5 = 0 and so on.

Accordingly, the rook polynomial for the board is 𝑟 𝐶, 𝑥 = 1 + 9𝑥 + 18𝑥 2 + 6𝑥 3

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 65


PROBLEMS

Note:

 Rook polynomial for 4 × 4 board is given by

𝑟 𝐶, 𝑥 = 1 + 16𝑥 + 72𝑥 2 + 96𝑥 3 + 24𝑥 2

 Rook polynomial for 𝑛 × 𝑛 board can be obtained by the following expansion

𝑟 𝐶, 𝑥 = 1 + 1! (𝑛 𝐶1 )2 𝑥 + 2! (𝑛 𝐶2 )2 𝑥 2 + 3! (𝑛 𝐶3 )2 𝑥 3 + ⋯ + 𝑛! (𝑛 𝐶𝑛 )2 𝑥 𝑛

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 66


PROBLEMS 1 2
4. Find the rook polynomial for the following board
3 4
Solution:w.k.t 𝑟 𝐶, 𝑥 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥2 + 𝑟3 𝑥3 + … … … + 𝑟𝑛 𝑥𝑛.

For this board 𝑟1 = 7 5 6 7

The positions for 2 non-capturing rooks are 1,4 , 1,5 , 1,7 , 2,3 , 2,5 , 2,6 , 3,5 ,

3,7 , 4,5 , 4,6 . Thus 𝑟2 = 10

The positions for 3 non-capturing rooks are 1,4,5 , (2,3,5). Thus 𝑟3 = 2

The board has no positions for four or more mutually non-capturing rooks cannot be placed on

board. Thus 𝑟4 = 0. Similarly, 𝑟5 = 0 and so on.

Accordingly, the rook polynomial for the board is

𝑟 𝐶, 𝑥 = 1 + 7𝑥 + 10𝑥 2 + 2𝑥 3

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 67


PROBLEMS

5. Find the rook polynomial for the following board [homework]

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 68


PROBLEMS

6. Find the rook polynomial for the 𝟑 × 𝟑 board by using expansion formula
Solution
w.k.t 𝑟 𝐶, 𝑥 = 1 + 𝑟1 𝑥 + 𝑟2 𝑥 2 + 𝑟3 𝑥 3 + … … … + 𝑟𝑛 𝑥 𝑛 .
The 3 × 3 board is given below
1 2 3

4 5 6

7 8 9

Let us mark the square which is at the centre of the board as ⊛. Then the boards 𝐷 and 𝐸 as
shown bellow (the shaded parts are the deleted parts)

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 69


PROBLEMS D E

1 2 3 1 2 3

4 5 6 4 5 6

7 8 9 7 8 9

For the board 𝐷 we find that 𝑟1 = 4

The positions for 2 non-capturing rooks are 1,9 , 3,7 . Thus 𝑟2 = 2

The board 𝐷 has no positions for three or more mutually non-capturing rooks cannot be placed on

board. Thus 𝑟3 = 0. Similarly, 𝑟4 = 0 and so on.

Accordingly, the rook polynomial for the board is

𝑟 𝐷, 𝑥 = 1 + 4𝑥 + 2𝑥 2
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 70
PROBLEMS E

1 2 3

4 5 6

7 8 9

For the board 𝐸 we find that 𝑟1 = 8

The positions for 2 non-capturing rooks are

1,5 , 1,7 , 1,8 , 2,4 , 2,5 , 2,6 , 2,8 , 3,4 , 3,6 , 3,7 , 4,7 , 4,8 , 5,6 , 5,7

Thus 𝑟2 = 14

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 71


PROBLEMS

The positions for 3 non-capturing rooks are 1,5,7 , 2,4,8 , 2,5,6 , (3,4,7). Thus 𝑟3 = 4

The board has no positions for four or more mutually non-capturing rooks cannot be placed on board. Thus 𝑟4 = 0.

Similarly, 𝑟5 = 0 and so on.

Accordingly, the rook polynomial for the board is 𝑟 𝐸, 𝑥 = 1 + 8𝑥 + 14𝑥 2 + 4𝑥 3

Thus, by expansion formula, the rook polynomial for board C can be written has

𝑟 𝐶, 𝑥 = 𝑥𝑟 𝐷, 𝑥 + 𝑟 𝐸, 𝑥

𝑟 𝐶, 𝑥 = 𝑥 1 + 4𝑥 + 2𝑥 2 + 1 + 8𝑥 + 14𝑥 2 + 4𝑥 3

𝑟 𝐶, 𝑥 = 1 + 9𝑥 + 18𝑥 2 + 6𝑥 3.

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 72


PROBLEMS

7. Find the rook polynomial for the board shown below (shaded part)

1 2
3 4
5 6
7 8

9 10 11

Solution

We note that the given board 𝐶 is made up of two disjoint sub-boards 𝐶1 and 𝐶2, where 𝐶1 is the 2 × 2 board with

squares numbered 1 𝑡𝑜 4 and 𝐶2 is the board with squares numbered 5 to 11

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 73


PROBLEMS

Since C1 is the 2 × 2 board we have [by problem 2]

r C1 , x = 1 + 4x + 2x 2

For the board C2 the rook polynomial is given by [by problem 4]

r C2 , x = 1 + 7x + 10x 2 + 2x 3

Therefore, the product formula yields the rook polynomial for the given board as

r C, x = r C1 , x r C2 , x

r C, x = 1 + 4x + 2x 2 1 + 7x + 10x 2 + 2x 3

r C, x = 1 + 11x + 40x 2 + 56x 3 + 28x 4 + 4x 5

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 74


PROBLEMS

8. Find the rook polynomial for the shaded region [HOMEWORK]

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 75


Arrangement with forbidden position

Suppose 𝑚 objects are to be arranged in 𝑛 places, where 𝑛 ≥ 𝑚. Suppose there are


constraints under which some objects cannot occupy certain places - such places are called
the forbidden positions for the said objects. The number of ways of carrying out this task is
gives by the following rule:

Her 𝑟𝑘 is the coefficient of 𝑥 𝑘 in the rook polynomial of the board of 𝑚 rows and 𝑛 columns
whose squares represent the forbidden places (under the specified conditions).
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 76
PROBLEMS

1. An apple, a banana, a mango and an orange are to be distributed to four boys B1,
B2, B3, B4 The boys B1 and B2 do not wish to have apple, the boy B3 does not
want banana or mango, and B4 refuses orange. In how many ways the distribution
can be made so that no boy is displeased?

Solution: The situation can be described by the board shown below in which the rows respectively
represent apple, banana, mango and orange, and the columns represent the boys B1, B2, B3, B4,
respectively. Also, the shaded squares together represent the forbidden places in the distribution.

Let us consider the board C consisting of the shaded squares in above Figure. We
note that C is formed by the mutually disjoint boards C1, C2, C3 shown in below
figure

18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 77


C3
C1
C2

Then by the formula

As such, the rook polynomial for C is (by the product formula)

By inspection, we find that


Therefore

Accordingly, we have

This is the number of ways the distribution can be


made so that no boy is displeased.

Thus we have r1 =5, r2 = 8, r3 = 4.


18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 78
PROBLEMS
2. Five teachers T1, T2, T3, T4, T5 are to be made class teachers for five class C1, C2, C3, C4, C5, one
teacher for each class. T1 and T2 do not wish to become the class teachers for C1 or C2, T3 and T4 for
C4 or C5, and T5 for C3 or C4 or C5. In how many ways can the teachers be assigned the work
(without displeasing any teacher)?

Solution: The situation can be represented by the board


By example 7, we know that
C1, C2, C3, C4, C5
T1

T2
𝑆𝑜 = 5! = 120, 𝑆1 = (5 − 1)!. 𝑟1 = 264
T3

T4 therefore

T5
18-04-2023 DISCRETE MATHEMATICS AND GRAPH THEORY 79

You might also like