Вы находитесь на странице: 1из 26

COMBINATORICS

Number Theory :
Primes : A positive integer p>1is called a prime number of a prime if its only
divisors are ±1 and ±p.
Eg : 2,3,5,7,11,13,17,18,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97.
Note:
 Every integer n>1 can be written as a product of prime
 There is no largest prime, that is, there exists an infinite number of primes
 If n is a composite number then, n has a prime divisor less than or equal
to √𝑛
Q) Give the prime factorization of 100, 999, 641?
A) 100 = 2*2*5*5 = 22 52
999 = 3.3.3.37 = 33 *37
641 = 641
Q) Check if 37 is prime?
A) Primes less than √37 are 2,3,5 since 2,3,5 cannot divide 37, it is a prime.
GCD – Greatest Common Divisor : Let a and b be integers, not both zero. The
largest d such that d/a and d/b is called as GCD of a,b.
Eg : gcd(12,18) = 6
Divisors of 12 = 1,2,3,4,6
Divisors of 18 = 1,2,3,6,9
Common divisors = 1,2,3,6Greatest number
Euclid method :
Gcd(540,168)
168)540(3
504
36)168(4
144
24)36(1
24
12)24(2
24
0

Gcd(540,168) = 12
Prime factors method:
Gcd(a,b) = ?
Prime factors of a = 𝑃1 𝑎1 𝑃2 𝑎2 ….. 𝑃𝑛 𝑎𝑛
Prime factors of b = 𝑃1 𝑏1 𝑃2 𝑏2 ….. 𝑃𝑛 𝑏𝑛
Gcd(a,b) = 𝑃1 min⁡(𝑎1𝑏1) * 𝑃2 min⁡(𝑎2𝑏2) …..𝑃𝑛 min⁡(𝑎𝑛 𝑏𝑛)
Eg : gcd(120,500) = ?
120 = 23 *3*5
500 = 22 ∗ 53
Gcd(120,500) = 2min⁡(3,2) *3min⁡(1,0) ∗ 5min⁡(1,3)
= 22 ∗ ⁡ 30 ∗ 51 = 20
LCM – Least Common Multiple : The least common multiple of the positive
integers a and b is the smallest positive integer that is divisible by both a and b.
Eg : LCM(4,6) = ?
2 4,6
2 2,3
3 1,3
1,1
2*2*2 = 12
Prime factors Method :
LCM(a,b) = ?
Prime factors of a = 𝑃1 𝑎1 𝑃2 𝑎2 ….. 𝑃𝑛 𝑎𝑛
Prime factors of b = 𝑃1 𝑏1 𝑃2 𝑏2 ….. 𝑃𝑛 𝑏𝑛
Gcd(a,b) = 𝑃1 max⁡(𝑎1𝑏1) * 𝑃2 max⁡(𝑎2𝑏2) …..𝑃𝑛 max⁡(𝑎𝑛𝑏𝑛)
Eg : LCM(504,20) = ?
504 = 23 *32 *7
20 = 22 ∗ 5
LCM(500,20) = 2max⁡(3,2) *3max⁡(2,0) ∗ 5max⁡(0,1) ∗ 7max⁡(1,0)
= 23 ∗ ⁡ 32 ∗ 5 *7 = 2520
Co primes or Relative primes: Two integers a and b are said to be relatively
prime or co prime if gcd(a,b) = 1
Eg :
1,2,4,5 are co primes
21, 64 are co primes
Euler’s Number to find Co primes less than ‘N’ :
For a number ‘N’ if its prime factors are
N = 𝑃𝑎 𝑄𝑏 𝑅𝑐
Then Euler’s number is
1 1 1
E(N) = N(1- )(1- )(1- )
𝑃 𝑄 𝑅

which gives the number of co primes to N, less than N.


Q) Find the number of Co primes of 20 less than 20?
A) 20 =22 . 51
1 1
E(20) = 20(1- )(1- )
2 2
20∗1∗4
= =8
10

And the Co primes to 20 are 1,3,7,9,13,17,19


Q) Let n=𝒑𝟐 q where p,q are distinct prime numbers. How many numbers
m , satisfy 1≤m≤n and gcd(m,n) = 1?
a) p(q-1)
b) pq
c) (𝒑𝟐 − 𝟏)(𝒒 − 𝟏)
d) p(p-1)(q-1)
A) 1≤m≤n and gcd(m,n) = 1
We need co primes of ‘n’
1 1
Euler’s Number (N) = N(1- )(1- )
𝑃 𝑄
1 1
= 𝑝2 q(1- )(1- ) [Since N = 𝑝2 q]
𝑃 𝑄

= p(p-1)(q-1)
Modular Arithmetic
Congruence Modulo : A congruence to b modulo m is
a ≡ b(mod m)
if m divides a-b
Eg : 87≡23(mod 4)
As 8-23 = 64
Divided by 4, 27 ≢ 8(mod 4) as 9 cannot divide 27-8 = 19
Properties:
 ¥a, a ≡ a mod m
 a ≡ b mod m b ≡ a mod m
 a ≡ b mod m , b ≡ c mod m  a ≡ c mod m
Congruence Arithmetic
If a ≡ c mod m, b ≡ d mod m then
 (a+b) ≡ (c+d) mod m
 (a.b) ≡ (c.d) mod m
Residue classes
[x] ={a € z | a ≡ x (mod m)}
Eg: The residue classes of m = 3
[0] = {0, ±3, ± 6…….}
[1] = {±1, ±4. ±7……}
[2] = {±2, ±5, ±8……}
COMBINATORICS
Sequence and Summation
Arithmetic Progression (AP) : An arithmetic progression is a sequence of the
form.
A, a+d, a+2d, …….. a+(n-1)d where the initial term is ‘a’ and the
common difference is ‘d’ are real numbers.
Eg:
3,5,7,9……… a=3, d=2
0,5,10,15…… a=0, d=5
𝑵𝒕𝒉 term in AP :
𝑎𝑛 = a+(n-1)d

Sum of n terms in AP :
𝑛
𝑆𝑛 = [a+𝑎𝑛 ]
2

Or
𝑛
𝑆𝑛 = [2a+(n-1)d]
2

Proof :
d = 𝑎2 -𝑎1 = 𝑎3 − 𝑎2 = 𝑠𝑜⁡𝑜𝑛 …
𝑎1 = 𝑎
𝑎2 = 𝑎 + 𝑑
𝑎3 = 𝑎 + 2𝑑
.
.
𝑎𝑛 = 𝑎 + (𝑛 − 1)𝑑
S = 𝑎1 + 𝑎2 + 𝑎3 +𝑎𝑛 = a + (a+d) + (a+2d)……a+(n-1)d  equ 1
OR
𝑎1 = 𝑎𝑛 −(n-1)d
𝑎2 = 𝑎𝑛 − (𝑛 − 2)𝑑
.
.
𝑎𝑛−1 = 𝑎𝑛 − 𝑑
S = 𝑎𝑛 + (𝑎𝑛 − (𝑛 − 1)𝑑) + ⋯ 𝑎𝑛 − 𝑑 + 𝑎𝑛  equ 2
Equ 1 + Equ 2
2S = (𝑎1 + 𝑎𝑛 ) + (𝑎1 + 𝑎𝑛 )+… (𝑎1 + 𝑎𝑛 )
2S = n(𝑎1 + 𝑎𝑛 )
⁡𝑛
S = [𝑎1 +𝑎𝑛 ]
2

Geometric Progression (GP) : A geometric progression is a sequence of the


form
a,ar,𝑎𝑟 2 …..𝑎𝑟 𝑛−1
where the initial term ‘a’ and common ratio ‘r’ are real numbers.
Eg : 2,10,50,250….. a=2, r=5
𝑵𝒕𝒉 term in GP :
𝑎𝑛 = 𝑎𝑟 𝑛−1
Sum of n terms in GP :
𝑎𝑟 𝑛+1 −𝑎
𝑆𝑛 = r≠1
𝑟−1

= (n+1)a r=1
Proof :
𝑆𝑛 = ∑𝑛𝑖=0 𝑎𝑟 𝑖
𝑟𝑆𝑛 = 𝑟 ∑𝑛𝑖=0 𝑎𝑟 𝑖
= ∑𝑛𝑖=0 𝑎𝑟 𝑖+1
= ∑𝑛+1
𝑘=1 𝑎𝑟
𝑘
[since k = i+1]
=∑𝑛+1 𝑘
𝑘=1 𝑎𝑟 + 𝑎𝑟
𝑛+1
−𝑎
= 𝑆𝑛 + 𝑎𝑟 𝑛+1 − 𝑎
r𝑆𝑛 − 𝑆𝑛 = ⁡𝑎𝑟 𝑛+1 − 𝑎
𝑎𝑟 𝑛+1 −𝑎
𝑆𝑛 = r≠1
𝑟−1

When r=1
𝑆𝑛 = ∑𝑛𝑖=0 𝑎
= a+a+…a [n+1 times]
= (n+1)a
Harmonic Progression (HP) : A harmonic progression is formed by taking the
reciprocals by taking the reciprocals of an AP.
1 1 1 1
,⁡ ,⁡ ,……..⁡
𝑎 𝑎+𝑑 𝑎+2𝑑 𝑎+(𝑛−1)𝑑

𝑵𝒕𝒉 term in HP :
1
𝑎𝑛 =
𝑎+(𝑛−1)𝑑

Harmonic number :
1 1 1
𝐻𝑛 = 1 + + + ⋯ +
2 3 𝑛
1
𝐻𝑛 = ∑𝑛𝑘=1
𝑘
Note :
In HP sum of ‘n’ terms is not defined.
Calculating Mean :
For three numbers a,b,c
Arithmetic Mean(AM) :
𝑎+𝑐
b=
2

Geometric Mean (GM) :


b = √𝑎𝑐
Harmonic Mean (HM):
2𝑎𝑐
b=
𝑎+𝑐

Important Power Series Formulae :


1+1+1+…… = ∑ 1 = n
𝑛(𝑛+1)
1+2+3……… =∑ n =
2
𝑛(𝑛+1)(2𝑛+1)
12 + 22 + 32 …. = ∑ 𝑛2 =
6
𝑛2 (𝑛+1)2
13 + 23 + 33 …. = ∑ 𝑛3 =
4
𝟏
1) ∑𝟗𝟗
𝒙=𝟏 = (Gate 2015)
𝒙(𝒙+𝟏)
1 1 1
A) ∑99
𝑥=1 = ∑99
𝑥=1 ⁡[ ]
𝑥(𝑥+1) 𝑥 (𝑥+1)

1 1 1 1 1 1 1 1
= [ − ] + [ − ] + [ − ] …[ − ]
1 2 2 3 3 4 99 100
1 1 1 1 1 1 1
= 1+[− + ] + [−⁡ + ]…[-⁡ + ]-⁡
2 2 3 3 99 99 100
1
= 1-
100
99
= = 0.99
100

2) Let P =∑𝟏≤𝐢≤𝟐𝐤⁡ 𝒊 and Q =∑𝟏≤𝐢≤𝟐𝐤⁡ 𝒊


i is odd i is even
a)P=Q-k
b)P=Q+k
c)P=Q
d)P=Q+2k (Gate 2008)
A) P =∑1≤i≤2k⁡ 𝑖 in AP
Where a=1, d=2, n=k
𝑛
For P = 𝑆𝑛 = [2𝑎 + (𝑛 − 1)𝑑]
2
𝑘
= [2 + (𝑘 − 1)2]
2
𝑘
= [2 + 2𝑘 − 2]
2

= 𝑘2  1

For Q , a=2, d=2 n=k


𝑛
𝑆𝑛 = [2𝑎 + (𝑛 − 1)𝑑]
2
𝑘
= [4 + 2𝑘 − 2]
2
𝑘
= [2𝑘 + 2]
2

= 𝑘 2 +k 2

From 1 and 2 we get


P=Q–K
3)Let 𝑯𝟏 ,⁡𝑯𝟐 ,⁡𝑯𝟑 ,…. Be harmonic numbers. Then for n€𝒁+ ,∑𝒏𝒋=𝟏 𝑯𝒋 can be
expressed as
a)n𝑯𝒏+𝟏 − (𝒏 + 𝟏)
b)(n+1)⁡𝑯𝒏 − 𝒏
c)n𝑯𝒏 − 𝒏
d)(n+1)⁡𝑯𝒏+𝟏 − (𝒏 + 𝟏)
1 1 1 1
A) Harmonic number 𝐻𝑛 = 1+ + … . = ∑𝑛𝑖=𝑛
2 3 𝑛 𝑖

∑nj=1 Hj = 𝐻1 +⁡𝐻2 +⁡𝐻3 +..𝐻𝑛


1 1 1 1 1 1 1 1 1
= [1]+[⁡ + ]+ [⁡ + + ]+….+⁡]+ [⁡ + + … . ]
1 2 1 2 3 1 2 3 𝑛
1 1 1
= n[1]+(n-1)⁡ +(n-2)⁡ ……..(n-(n-1))⁡
2 3 𝑛
𝑛−𝑖+1
= ∑𝑛𝑖=𝑛
𝑖
𝑛 1
= ∑𝑛𝑖=𝑛[ − 1 + ]
𝑖 𝑖
1 1
= n∑𝑛𝑖=𝑛 - ∑𝑛𝑖=𝑛 1 + ∑𝑛𝑖=𝑛
𝑖 𝑖

= n 𝐻𝑛 − ⁡𝑛 + 𝐻𝑛
=(n+1)⁡𝐻𝑛 − 𝑛
[Since ∑𝑛𝑖=𝑛 1 = 1+1+1….n times = n
1 1 1 1 1
∑𝑛𝑖=𝑛 = 1+ + + + …. = 𝐻𝑛 ]
𝑖 1 2 3 4

Option b is correct
COUNTING
Sum Rule : Suppose some Event E can occur in ‘m’ ways and a second event F
can occur in ‘n’ ways, and suppose both events cannot occur simultaneously,
then E of F can occur in m+n ways.
Product Rule : Suppose there is an Event E which can occur in ‘m’ ways and,
independent of this event, there is a second event F which can occur in ‘n’
ways, then combinations of E and F can occur in m*n ways.
Q) Suppose a college has 3 different history courses, 4 different literature
courses and 2 different sociology courses then
a)How many ways a student can choose one of the courses
b)How many ways a student can choose one of each kind of course?
A) (a) Choosing one course = 3+4+2
= 9 ways
(b) Choosing one of each course = 3*4*2
= 24 ways
Q) How many different bit strings of length seven are there?
A) _ _ _ _ _ _ _
2.2.2.2.2.2.2. = 27
Each bit position can be filled in 2 ways (1 or 0) and seven such positions are
there so 27 = 128
Mathematical Functions :
(a)Factorial Functions : The product of the positive integer from 1 to n
inclusive is denoted by n!.
n! = 1*2*3*……..*n
Eg : 3! = 3*2*1 = 6
5! = 5*4*3*2*1 = 120
0! = 1
(b)Binomial Coefficients :
𝑛!
𝑛𝐶 𝑟 =(𝑛−𝑟)!𝑟!

Note :
𝑛𝐶 𝑟 = 𝑛𝐶 𝑛−𝑟
Eg :
8∗7
1) 8𝐶 2 = = 28
2∗1
12∗11∗10∗9∗8
2)⁡12𝐶 5 = = 792
5∗4∗3∗2∗1
10∗9∗8
3) 10𝐶 7⁡ = 10𝐶 3 = = 120
3∗2∗1

The numbers 𝑛𝐶 𝑟 are called binomial coefficient since they appear as the
coefficient in the expansion of (𝑎 + 𝑏)𝑛
(𝑎 + 𝑏)𝑛 = ∑𝑛𝑘=0 𝑛𝐶 𝑘 𝑎𝑛−𝑘 𝑏 𝑘
(c)Pascals triangle :
(𝑎 + 𝑏)0 = 1
(𝑎 + 𝑏)1 = 𝑎 + 𝑏
(𝑎 + 𝑏)2 = 𝑎2 + 𝑏 2 + 2𝑎𝑏
(𝑎 + 𝑏)3 = 𝑎3 + 3𝑎2 b + 3a𝑏 2 + 𝑏 3
(𝑎 + 𝑏)4 = 𝑎4 + 4𝑎3 b + 6𝑎2 𝑏 2 + 4a𝑏 3 + 𝑏 4
𝑛 + 1𝐶 𝑟 = 𝑛𝐶 𝑟−1 + 𝑛𝐶 𝑟

Note :
 ∑𝑛𝑘=0 𝑛𝐶 𝑘 = 2𝑛 as (a=b=1)
 ∑𝑛𝑘=0(−1)𝑘 𝑛𝐶 𝑘 = 0
Concept of Permutation and Combination :
Permutation : A permutation of a set of distinct objects is an ordered
arrangement of these objects.
Eg : Given distinct objects a,b,c
Number of permutations taken two at a time is :
ab,ba
ac,ca
bc,cb
i.e. = 6
Combination : Combinations is counting unordered selections of objects.
Eg : Given distinct objects a,b,c
Number of combinations taken two at a time is :
ab,bc,ca
i.e. = 3
Combination  Selection
Permutation  Selection + Arrangement
Deep dive on Permutation : The number of arrangements or permutations of
‘n’ different things taken ‘r’ at a time is 𝑛𝑃 𝑟 or P(n,r).
𝑛!
𝑛𝑃 𝑟 =
(𝑛 − 𝑟)!

Note :
 𝑛𝑃 0 = 1
 𝑛𝑃 𝑛 = 𝑛!
Q)How many ways are there to select a first prize winner and second prize
winner from 100 people?
A)⁡10𝑃 2 = 100*99
= 9900
Q) How many permutations of the letters ABCDEF contains the string
ABC?
A) A B C _ _ _
4 321
4! = 4*3*2*1 = 24 permutations
Permutation with replacement :
 Here element is replaced in the set S before the next element is choosen.
 Then number of ways ‘m’ to choosen r objects from n is
m = n*n*n….. r times
m = 𝑛𝑟
Q) Three cards are choosen one after the other from a 52 card deck. Find
the number of ways this can be done
(a) with replacement
(b) without replacement
A) (a) with replacement,
m = 52*52*52 = 523 = 140608
(b)Without replacement,
m = 𝑛𝑃 𝑟
= 52𝑃 3
= 52*51*50 = 132600
Permutation with object repetition (alike objects) : The number of
permutations of n objects of which 𝑛1 are alike, 𝑛2 are alike.. 𝑛𝑟 are alike is
𝑛!
m=
𝑛1 !⁡𝑛2 !…𝑛𝑟 !
Q) Find the number ‘m’ of seven-letter words that can be formed using the
letters of the word ‘BENZENE’?
A) In BENZENE
E – represented 3 times
N – represented 2 times
7!
m= = 420
3!2!

Circular Permutations :
 The number of ways to arrange ‘n’ distinct objects along a fixed circle is
P = (n-1)!
 The number is (n-1)! Instead of the usual factorial n! since all cyclic
permutations of objects are equivalent became of the circle can be
rotated.
Circular permutations around a thread : When we cannot differentiate
between clockwise and anticlockwise arrangement
(𝑛−1)!
P=
2

This logic is used in flower arrangement in garland, beads in a necklace or


person’s sitting in a giant wheel.
Q) Let A be a square of 8 distinct integers sorted in ascending order. How
many distinct pairs of sequences B and C are there such that
(i) each in sorted in ascending order
(ii) B has 5 and C has 3 elements, and
(iii) the result of merging B and C gives A?
(a)2
(b)30
(c)56
(d)256 Gate 2003
A)
8

5 3
A group of 8 elements partitioned into 2 groups of 5 and 3 elements
8!
P= = 56
5!3!

Combination : The number of combinations of ‘n’ distinct things, taken ‘r’ at a


time is given by
𝑛!
𝑛𝐶 𝑟 =
(𝑛 − 𝑟)! 𝑟!
𝑛
 𝑛𝐶 𝑟 is also denoted as c(n,r) or ( )
𝑟
 𝑛𝐶 𝑟 = 𝑛𝐶 𝑛−𝑟
Q) Find the number of combinations of 4 objects A,B,C,D taken 3 at a time.
A) m = 𝑛𝐶 𝑟 = 4𝐶 3 = 4
And the combinations are ABC, ABD, ACD, BCD
Note :
𝑛𝑃 𝑟
𝑛𝐶 𝑟 =
𝑟!

Combination with repetition : Select ‘r’ from ‘M’ kind with choice of ‘0’ or
more
𝑟 + 𝑀 − 1𝐶 𝑀−1
with atleast one from each kind.
𝑟 − 1𝐶 𝑀−1
Q) How many ways can we choose 6 fruits from four kinds of fruit?
A) Select(r) = 6
Kind(M) = 4
6 + 4 − 1𝐶 4−1 = 9𝐶 3 = 84
Q) How many solutions does the equation 𝒙𝟏 +𝒙𝟐 +𝒙𝟑 =11 have when 𝒙𝟏 ,⁡𝒙𝟐
and 𝒙𝟑 are
(a) Non negative integers
(b) Positive integers
A)⁡𝑥1 +𝑥2 +𝑥3 =11 where M=3 and r=11
a) Non negative  zero included
𝑟 + 𝑀 − 1𝐶 𝑀−1 = 13𝐶 2 = 78
b) Positive integers  No zero
𝑟 − 1𝐶 𝑀−1 = 10𝐶 2 = 45
Q) Two girls have picked 10 roses, 15 sunflowers and 14 daffodils. What is
the number of ways they can divide the flowers among themselves?
A)Distributing identical things with two girls (Gate 1999)
Roses : x1 +x2 =10
A = 10 + 2 − 1C 2−1 = 11C1 = 11
Sunflowers : 𝑥1 +𝑥2 = 15
B = 15 + 2 − 1𝐶 2−1 = 16𝐶 1 = 16
Daffodils: 𝑥1 +𝑥2 =14
C = 14 + 2 − 1𝐶 2−1 = 15𝐶 1 = 15
Total number of ways = A*B*C = 11*16*15 = 2640
Q) In how many ways can ‘b’ blue balls and ‘r’ red balls be distributed in
‘n’ distinct boxes?
(𝒏+𝒃−𝟏)!(𝒏+𝒓−𝟏)!
(a) (𝒏−𝟏)!𝒃!(𝒏−𝟏)!𝒓!

(𝒏+(𝒃+𝒓)−𝟏)!
(b)(𝒏−𝟏)!(𝒏−𝟏)!(𝒃+𝒓)!
𝒏!
(c)⁡
𝒃!𝒓!
(𝒏+(𝒃+𝒓)−𝟏)!
(d)⁡ Gate 2008
𝒏!(𝒃+𝒓−𝟏)

A) x1 +x2 +….xn = r balls


Red balls :
(𝑛−1+𝑟)!
A = 𝑛 − 1 + 𝑟𝐶 𝑛−1 = (𝑛−1)!𝑟!

Blue balls :
(𝑛−1+𝑏)!
B = 𝑛 − 1 + 𝑏𝐶 𝑛−1 = (𝑛−1)!𝑏!
(𝑛+𝑏−1)!(𝑛+𝑟−1)!
Together = A*B = (𝑛−1)!𝑏!(𝑛−1)!𝑟!

Selection with atleast one :


 From ‘n’ different objects : 𝑛𝐶 1 +𝑛𝐶 2 +…..+𝑛𝐶 𝑛 =2𝑛 -1
 From ‘n’ alike objects : n ways
𝑎𝑎𝑎.𝑎 𝑏𝑏𝑏.𝑏 𝑐𝑐.𝑐
 Alike groups : ⁡ ⁡ no. of factors
𝑝 𝑞 𝑟
m = (p+1)(q+1)(r+1)-1
𝑎𝑎𝑎.𝑎 𝑏𝑏𝑏.𝑏 𝑒𝑓𝑔..𝑘
 Alike groups + some different : ⁡ ⁡
𝑝 𝑞 𝑟

m = [(p+1)(q+1)2𝑟 ]-1
Q) The number of divisors of 2100 is Gate 2015
A) 2100 = 22 31 52 71
M = (2+1)(1+1)(2+1)(1+1)
= 3*2*3*2 = 36 factors
DISTRIBUTIONS
a)Different objects (n) and Different boxes (r) :
i) All taken  𝑟 𝑛
ii) No empty box (onto)
(𝑟−1)𝑛 (𝑟−2)𝑛 (1)𝑛
𝑟 𝑛 -𝑟𝐶 1 +𝑟𝐶 2 ……(−1)𝑟−1 𝑟𝐶 𝑟−1
iii) Each box with specified elements (𝑛1 𝑛2 ……𝑛𝑟 )
𝑛𝐶 𝑛 *(𝑛 − 𝑛1 )𝐶 𝑛 *……..
1 2

𝑛!

𝑛1 !𝑛2!…𝑛𝑟!

Q) Find the number of ways to distribute 5 cards to 4 players from a deck


of 52 cards?
52!
A) 52𝐶 5 *47𝐶 5 *42𝐶 5 *37𝐶 5 =
5!5!5!5!32!

b)Identical objects (n) and Different boxes (r) :


i) All taken with empty box
𝑛 + 𝑟 − 1𝐶 𝑟−1
ii)All taken No empty box
𝑛 − 1𝐶 𝑟−1
Q) Number of ways to place 10 balls into 8 different bags.
A) n=10, r=8
m = 10 + 8 − 1𝐶 8−1 = 17𝐶 7
c)Different objects(n) and Identical Boxes(r):
i)All taken
m = ∑𝑟𝑖=1 𝑆(𝑛, 𝑖)
1 (𝑘−𝑖) 𝑛
S(n,k) = ∑𝑘−1 𝑖
𝑖=0 (−1) 𝑘𝐶𝑖
𝑘!

Stirling’s number of second kind


ii)Each box with specified elements(𝑛1 𝑛2 ……𝑛𝑟 )
⁡⁡⁡𝑛𝐶 𝑛 ∗(𝑛−𝑛1 )𝐶 𝑛
1 2
where r! is removing permutation of identical groups
𝑟!

𝑛!
(𝑛1 ! 𝑛2 ! 𝑛3 ! … . 𝑛𝑟 !)𝑟!
Q) How many ways to put four different employee’s into three identical
offices?
A) m=S(4,1)+S(4,2)+S(4,3)
1
S(4,1) = [14 ] = 1
1!
1 16−2
S(4,2) = [24 -2𝐶 1 14 ] = =7
2! 2
1 1
S(4,3) = [34 -3𝐶 1 24 + 3𝐶 2 14 ] = [81-48+3] = 6
3! 6

M = 1+7+6 = 14
d)Identical objects(n) and Identical boxes(r) :
𝑥1 +𝑥2 +….𝑥𝑟 = n
Enumeration such that
𝑥1 ≥𝑥2 ≥𝑥3 … ≥ 𝑥𝑟
Q)How many ways to pack six identical books into four identical boxes?
A) 𝑥1 +𝑥2 +𝑥3 +𝑥4 = 6
6000
5100
4200
4110
3300
3210
3111
2220
2211
Total = 9 ways
The Pigeon hole Principle : If n pigeon holes are occupied by n+1 or more
pigeons, then at least one pigeon hole is occupied by more than one pigeon.
Eg : Suppose a department contains 13 professors, then two of the professors
were born in the same month.
Generalised Pigeon hole Principle : If n pigeon holes are occupied by kn+1 or
more pigeons, where k is a positive integer, then atleast one pigeonhole is
occupied by k+1 or more pigeons.
Q) Find the minimum number of students in a class to be sure that three of
them are born in the same month?
A) Pigeonholes(n) = 12 months
k+1 = 3
k=2
No. of students = kn+1
= 2(12)+1
= 25 students
Q) The minimum number of cards to be dealt from an arbitrarily shuffled
deck of 52 cards to guarantee that three cards are from some same suit?
a) 3
b) 8
c) 9
d) 12 Gate 2000
A) Number of suits(n) = 4
k+1=3
k=2
Number of cards = kn+1
= 2(4)+1
=9
i)Game Play Questions :
Q) Suppose a team X plays 18 games in two week (14 days) period, and
plays atleast one game a day. Show that there is a period of days in which
exactly 9 games were played.
A) Let 𝑆𝑖 = no of games played from day 1 to day i
Eg : 𝑆3 = n(𝑑1 )+ n(𝑑2 ) + n(𝑑3 )
Where 𝑑2 = day 2 and 𝑑3 = day 3
S = {𝑆1 , 𝑆2 , 𝑆3 … … 𝑆14 }
Note : 𝑆14 = 18 ; all 𝑆𝑖 are distinct
Let T = {𝑡1 , 𝑡2 , 𝑡3 … … 𝑡14 }
Where 𝑡𝑖 =𝑆𝑖 +9
Note : 𝑡14 =𝑆14 +9 = 18+9 = 27 ; ; all 𝑡𝑖 are distinct
U = S+T
= 𝑆1 , 𝑆2 , 𝑆3 … … 𝑆14 , 𝑡1 , 𝑡2 , 𝑡3 … … 𝑡14 }
|U| = |S|+|T|
= 14+14
= 28 elements
| < U ≤ 27
 In 28 elements of U, all lie between 1 to 27 which means atleast two
elements are equal.
 Since 𝑆𝑖 and 𝑡𝑖 are independently distinct.
𝑡𝑎 ≠𝑡𝑏 and 𝑆𝑎 ≠𝑆𝑏
 So there is an element in S which is equal to T.
𝑆𝑎 = ⁡ 𝑡𝑏
= 𝑆𝑏 + 9
𝑆𝑎 = 𝑆𝑏 + 9
𝑆𝑎 − 𝑆𝑏 = 9
So, 9 games are played in days b+1, b+2….a-1,a.
ii)Strictly Increasing or Decreasing sequence :
Theorem : Every sequence of distinct 𝑛2 +1 real numbers contains a sub
sequence of length n+1 which is strictly increasing or strictly decreasing.
Eg :
a) 2,18,6,7,5,9,4,12,3
Here we have sequence of 10
10 = 32 +1
So, n+1=4, we can from subsequence of 4 elements which are strictly
increasing or decreasing.
2,6,9,12

1,5,9,12

8,6,5,4

7,5,4,3
b) 3,2,1,6,5,4,9,8,7
Here sequence has 9 elements
9 = 32
This sequence has no sub sequence of n+1 = 4 which is strictly increasing
or decreasing.
Note :
 𝑛2 , sequence may have n+1 sub sequence increasing or decreasing but
one of its permutation will not have.
 𝑛2 + 1, sequence has guaranteed n+1 sub sequence which is increasing or
decreasing.
iii) Ramsey Number : A number r is said to satisfy the (p,q)-Ramsey
property if a set of r people must have a subset of ‘p’ mutual friends or a
subset of q mutual strangers.
The Ramsey number R(p,q) is the smallest such integer ‘r’.
Note :
R(3,3) = 6
R(2,n) = n
R(4,4) = 18
Q) Consider six people, where any two of them are either friends or
strangers. Show that there are three of them which are either mutual
friends or mutual strangers.
A) Person(A)

Friends(X)={B,C}
Strangers(Y)={D,E,F}
By Pigeon hole principle either X or Y has atleast three people.
In Y={D,E,F}
Case I : Two are strangers
Two strangers + A becomes 3 strangers
Case II : All are friends
These 3 are mutual friends
Only these two cases are possible and in either case we have mutual friends
or mutual strangers.
Inclusion and Exclusion
n(AUB) = n(A)+n(B)-n(AՈB)

Inclusion Exclusion
n(AUBUC) = n(A)+n(B)+n(C)-(n(AՈB)+n(AՈC)+n(BՈC))+n(AՈBՈC)

Inclusion Exclusion
Generalization :
n(𝐴1 U𝐴2 U𝐴3 ….𝐴𝑚 ) = 𝑆1 -𝑆2 +𝑆3 -𝑆4 …+(−1)𝑚−1 𝑆𝑚
𝑆𝑘 is the cardinality of the all possible k-tuple intersection of sets.
𝑆𝑘 = ∑ 𝑛( 𝐴1 U𝐴2 U𝐴3 ….𝐴𝑘 )
Eg : 𝑆1 =∑𝑖 𝑛(𝐴𝑖 )
𝑆2 =∑𝑖<𝑗 𝑛(𝐴𝑖 Ո𝐴𝑗 )
𝑆3 =∑𝑖<𝑗<𝑘 𝑛(𝐴𝑖 Ո𝐴𝑗 Ո𝐴𝑘 )
Q) Find the number of mathematics students at a college taking at least one
of the languages French, German and Russian, given the following data :
64 study French
45 study German
42 study Russian
20 study French and German
25 study French and Russian
15 study German and Russian
8 study all three languages
A) F-French
G-German
R-Russian
Students studying atleast one of the three languages is
n(FUGUR) = n(F)+n(G)+n(R)-[n(𝐹ՈG)+n(FՈ𝑅)+n(𝐺Ո𝑅)]+n(FՈ𝐺Ո𝑅)
= 65+45+42-20-25-15+8 = 100
Theorem :
Let 𝐴1 ,⁡𝐴2 ,⁡𝐴3 ….𝐴𝑟 be subsets of a universal set U. Then the number ‘m’ of
elements which do not appear in any subset 𝐴1 ,⁡𝐴2 ,⁡𝐴3 ….𝐴𝑟 of U is
m = n(𝐴1𝐶 Ո𝐴𝐶2 Ո…..𝐴𝐶𝑟 )
= |U|-𝑆1 +𝑆2 -𝑆3 ….+(−1)𝑟 𝑆𝑟
Q) Let ‘U’ be the set of positive integers not exceeding 1000. Then |U| =
1000. Find |S| where S is the set of such integers which are not divisible by
3,5 or 7.
A) A-Elements divisible by 3
B-Elements divisible by 5
C-Elements divisible by 7
S = 𝐴𝑐 Ո𝐵𝑐 Ո𝐶 𝑐
|A| = 1000/3 = 333
|B| = 1000/5 = 200
|C| = 1000/7 = 142
|AՈB| = 1000/15 = 66
|AՈC| = 1000/21 = 47
|BՈC| = 1000/35 = 28
|AՈBՈC| = 1000/105 = 9
|S| = |U|-|A|-|B|-|C|+|AՈB|+|AՈC|+|BՈC|-|AՈBՈC|
= 1000-333-200-142+66+47+28-9
= 457
Q) In a room containing 28 people, there are 18 people who speak English,
15 people who speak Hindi and 22 people who speak Kannada. 9 speak
both English and Hindi. 11 speak both Hindi and Kannada whereas 13
persons speak both Kannada and English. How many speak all three
languages?
a) 9
b) 8
c) 7
d) 6 Gate 1998
A) n(EUHUK) = 28
n(E) = 18
n(H) = 15
n(K) = 22
n(EՈH) = 9
n(HՈK) = 11
n(KՈE) = 13
n(KՈEՈH) = ?
n(KՈEՈH) = n(KUEUH)-n(E)-n(H)-n(K)+n(EՈH)+ n(HՈK)+ n(KՈE)
= 28-18-15-22+9+11+13
= 61-55 = 6
Applications :
i) Number of onto Functions : Suppose |A|=m and |B|=n where m≥n. Then the
number of onto function from A to B is
(𝑛−1)𝑚 (𝑛−2)𝑚 (𝑛−3)𝑚 𝑚
N = 𝑛𝑚 -𝑛𝐶 1 +𝑛𝐶 2 -𝑛𝐶 3 …….(−1)𝑛−1 𝑛𝐶 1𝑛−1
Q) Find the number ‘N’ of ways a company can assign 7 projects to 4
people so that each person gets at least one project?
A) m = 7, n = 4
7 7 7
N = 47 -4𝐶 13 +4𝐶 22 -4𝐶 13
= 47 -4(37 )+6(27 )-4(17 )
= 16384-8748+768-4
= 8400
ii) Derangement : A derangement is a permutation of objects where each object
is not in its original position.
1 1 1 1
𝐷𝑛 = n![1- + - +…(−1)𝑛 ]
⁡1! 2! 3! ⁡𝑛!

Hat Check Problem :


Q) Suppose 5 people check in their hats at a restaurant and they are given
back their hats at random. Find the number of cases such that no person
receiver’s his/her own hat?
1 1 1 1 1
A) 𝐷5 = 5![1- + - + - ]
⁡1! 2! 3! ⁡4! ⁡5!

= 120[1-1+1/2-1/6+1/24-1/120]
11
120 * = 44
30

Q) In how many ways can we distribute 5 distinct balls 𝑩𝟏 ,⁡𝑩𝟐 ,…⁡𝑩𝟓 in 5


distinct cells 𝑪𝟏 ,⁡𝑪𝟐 ,…⁡𝑪𝟓 such that ball 𝑩𝒊 is not in cell 𝑪𝒊 ¥𝒊 =1,2….5 and
each cell contains exactly one ball?
a)44
b)96
c)120
d)3125 Gate 2004
A) 𝑫𝟓 = 44
[Same as pervious problem]

Вам также может понравиться