Combinatorics 14

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

MTL180 - Discrete Mathematical Structures

Lecture 13

Course Instructor : Prof. Biplab Basak

Department of Mathematics
Indian Institute of Technology Delhi

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 1 / 11


Multiset
A multiset is like a set, except that elements may appear more than
once.
{a, a, b, b, b, c} is an example of a multiset, where a appears 3 times,
b appears 2 times and c appears only once.
To distinguish multisets from sets, and to shorten the expression in
most cases, we use a repetition number with each element. For an
example, the multiset {a, a, b, b, b, c} is denoted by {2 · a, 3 · b, 1 · c}.
We also allow elements to be included an infinite number of times,
indicated with ∞ for the repetition number, like {∞ · a, ∞ · b, ∞ · c}.
A multiset is finite if it contains only a finite number of distinct
elements, and the repetition numbers are all finite.
The total number of elements (with repetition)of a multiset is called
the size of that multiset.
{5 · a, 3 · b, 2 · c} and {4 · a, 4 · b, 2 · c} are finite submutisets of the
infifnite multiset {∞ · a, ∞ · b, ∞ · c}, and both have size 10.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 2 / 11


Problem 1
Given a multiset {∞ · x1 , ∞ · x2 , . . . , ∞ · xn }, how many finite submultisets
does it have of size k?
equivalent to solving y1 + y2 .. yn = k.
Solution:
Consider that we have k + n − 1 “blank spaces”.
Now, we randomly place n − 1 number of markers X in some of these
blank spaces.
This uniquely gives a finite submultisets of size k, and vice-verse: fill
all blanks up to the first X with x1 , up to the second X with x2 , and
so on, and fill all blanks after the (n − 1)-th X with xn .
Since there are k + n − 1 “blank spaces” and n − 1 spaces are
occupied by X, the remaining (k + n − 1) − (n − 1) = k spaces are
occupied by xi , 1 ≤ i ≤ n.
Thus, those collection of xi ’s gives a submultiset of size k, and it is
uniquely determined by the choices of those n − 1 numbers of X.
Since there are n+k−1
n−1 choices for placing n − 1 numbers of X in
k + n − 1 number of blank spaces, there are n+k−1

n−1 number of
submultisets of size k.
(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 3 / 11
Problem 2
How many solutions does x1 + x2 + x3 + x4 = 20 have in non-negative
integers?

Solution:
The problem is equivalent to finding: given a multiset
{∞ · x1 , ∞ · x2 , ∞ · x3 , ∞ · x4 }, how many finite submultisets does it
have of size 20?
4+20−1 23
Thus, there are 4−1 = 3 number of submultisets of size 20.
23
Therefore, the equation has 3 number of solution.

Problem 3
Find the number of solutions to x1 + x2 + x3 + x4 = 20 with x1 ≥ 0,
x2 ≥ 1, x3 ≥ 2 and x4 ≥ −1. integers?

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 4 / 11


Solution:
Note that ‘x1 ≥ 0, x2 ≥ 1, x 3 ≥ 2 and x4 ≥ −1’ is equivalent to
‘x1 ≥ 0, x2 − 1 ≥ 0, x3 − 2 ≥ 0 and x4 + 1 ≥ 0’.
Consider, y1 = x1 , y2 = x2 − 1, y3 = x3 − 2 and y4 = x4 + 1.
Then the problem is reduced to: finding the number of non-negative
integer solution of the equation y1 + y2 + 1 + y3 + 2 + y4 − 1 = 20,
i.e., y1 + y2 + y3 + y4 = 18.
The problem is now equivalent to finding: given a multiset
{∞ · y1 , ∞ · y2 , ∞ · y3 , ∞ · y4 }, how many finite submultisets does it
have of size 18?
4+18−1 21
Thus, there are 4−1 = 3 number of submultisets of size 18.
21
Therefore, the given equation has 3 number of solution.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 5 / 11


The Pigeonhole Principle
Suppose that n + 1 (or more) pigeons are put into n holes. Then some
hole contains at least two pigeons.

Proof:
We prove the principal via contradiction.
If possible the statement ‘some hole contains at least two pigeons’ is
not true.
Then each hole contains at most one pigeon.
Then the total number of pigeons is at most 1 + 1 + · · · + 1 = n, a
contradiction.
This proves the pigeonhole principle.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 6 / 11


Problem 1
Among any 13 people, at least two share a birth month.

Solution:
Label the 12 months with holes and label 13 people with pigeons.
By the Pigeonhole Principle, some hole contains at least two pigeons,
i.e., some month is shared by at least two people.

Problem 2
Suppose 5 pairs of socks are in a drawer. Picking 6 socks guarantees that
at least one pair is chosen.

Solution:
Consider the 5 pairs of socks are colored by 1, 2, 3, 4 and 5.
Label the 5 colors with 5 holes and label the socks with pigeons.
If we select 6 socks then, by the Pigeonhole Principle, some color
must be obtained by at least two socks.
Thus, picking 6 socks guarantees that at least one pair is chosen.
(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 7 / 11
Lemma
Suppose a1 , . . . , an are integers. Then some “consecutive sum”
ak + ak+1 + ak+2 + · · · + ak+m is divisible by n.

Proof:
Consider these n sums: s1 = a1 ; s2 = a1 + a2 ; s3 = a1 + a2 + a3 ; · · · ;
s n = a1 + a 2 + · · · + an
If one of them is divisible by n then we are done.
If not, then let ri be the reminder when si is divided by n for
1 ≤ i ≤ n, where 1 ≤ ri < n.
Here r1 , r2 , . . . , rn can take only n − 1 values (as 1 ≤ ri < n).
Label 1, 2, . . . , n − 1 by holes and label r1 , r2 , . . . , rn by pigeons.
Thus, by the the Pigeonhole Principle, some number must be
attended by at least two ri ’s, say ri and rj .
Without loss of generality, assume 1 ≤ i < j ≤ n, then ri = rj .
Then sj − si = ai + ai+1 + · · · + aj is divisible by n.
(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 8 / 11
Chinese Remainder Theorem
If m and n are relatively prime, and 0 ≤ a < m and 0 ≤ b < n, then there
is an integer x such that x = a (mod m) and x = b (mod n).

Proof:
Consider the integers a, a + m, a + 2m, . . . , a + (n − 1)m, each with
remainder a when divided by m. consider n integers

We wish to show that one of these integers has remainder b when


divided by n, in which case that number satisfies the desired property.
If possible let none of the integers a, a + m, a + 2m, . . . , a + (n − 1)m
has remainder b when divided by n.
Let ri be the remainder when a + im is divisible by n for 0 ≤ i ≤ n − 1.
By our assumption, ri 6= b for all 0 ≤ i ≤ n − 1.
Thus, ri can take only n − 1 values from 0, . . . , b − 1, b + 1, . . . n − 1.
Label the n − 1 integers 0, . . . , b − 1, b + 1, . . . n − 1 by holes and
label r1 , r2 , . . . , rn by pigeons.

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 9 / 11


Thus, by the the Pigeonhole Principle, some number must be
attended by at least two ri ’s, say ri and rj .
Without loss of generality, assume 1 ≤ i < j ≤ n, then ri = rj = r
(say).
Consider, a + im = q1 n + r and a + jm = q2 n + r .
Then (a + jm) − (a + im) = (q2 n + r ) − (q1 n + r ) and q2 > q1 .
This implies, (j − i)m = (q2 − q1 )n.
This implies, n divides (j − i)m.
Since m and n are relatively prime, n divides j − i.
This is a contradiction as 0 < j − i < n.
Therefore, one of these integers, say a + qm = x has remainder b
when divided by n, where 0 ≤ q ≤ n − 1.
Thus, x = a (mod m) and x = b (mod n).

(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 10 / 11


Theorem
Suppose that r1 , . . . , rn are positive integers. If X ≥ ( ni=1 ri ) − n + 1
P

number of objects are put into n boxes labeled 1, 2, 3, . . . , n, then some


box labeled i contains at least ri objects.

Proof:
We prove this via contradiction.
If possible, let the statement is not true.
Then the total number of objects in the boxes is at most
(r1 − 1) + (r2 − 1) + (r3 − 1) + · · · + (rn − 1) = ( ni=1 ri ) − n < X .
P

This a contradiction. This proves the result.

Corollary
Suppose r > 0 and X ≥ n(r − 1) + 1 objects are placed into n boxes.
Then some box contains at least r objects.

Proof:
Apply the previous theorem with ri = r for all i.
(Maths Dept., IIT Delhi) MTL180 - Discrete Mathematical Structures, Tutorial-1 11 / 11

You might also like