Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
COMBINATORICS
This made me realize that tough problems may have simpler solutions. We just
need to look around for.
In most of the counting problems we use binomial coefficients and other combinatory tools. But recursion can act
as a wonderful tool to solve tough problems. In the 13th century, the Italian mathematician Leonardo Fibonacci
studied the following (not too realistic) exercise:
Its easy to figure out the answer for smaller n. Farmer has 1 rabbit in the 1st month and 1 rabbit in 2nd month as
rabbit has to be 2 months old before starting to reproduce. In 3rd month farmer has 2 rabbits and in 4th month he
has 3 rabbits as first rabbit has delivered another. After fourth month second rabbit also starts reproducing so
two new rabbits get added. Thus in 5th month, he has 5 rabbits.
We can easily calculate the number of rabbits in nth month now, if we realize that number of new rabbits added in
nth month is same the number of rabbits who are at least 2 months old or who were present there two months
ago. In other words If Fn denotes the number of rabbits in nth month, then w have for n 2,
Fn+1 = Fn + Fn-1
We already know that F1 = 1, F2 = 1, F3 = 2, F4 = 3 and F5 = 5. If we set F0 = 0, then above equation will be
valid for n = 1 also. Now any term of the following sequence can be determined easily:
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo
MATH OLYMPIAD LESSONS
COMBINATORICS
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
The numbers in this sequence are called Fibonacci Numbers. And any pattern of integers which follow the above
equation can be termed as Fibonacci Sequence.
A staircase has 10 steps. You walk up taking one or two at a time. How many ways can you go up?
For one step only we see that there is one way. If there are two steps we can go up in two ways i.e. 1 + 1 or 2.
If there are three steps we can go up in three ways i.e. 1 + 1 + 1, 1 + 2 or 2 + 1. Now can you guess the
number of ways for four steps? No it is not four rather five i.e. 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 2 + 1, 2 + 1 + 1 or
2 + 2.
Now lets think logically and apply reverse count. If there are an+1 number of ways to go up to n + 1 steps, then
these number of ways can be separated in two categories;
one in which first step was single i.e. remaining n steps can be covered in an ways,
second in which first step was double i.e. remaining n 1 steps can be taken in an-1 ways. So we can
safely write now that,
an+1 = an + an-1
If you look closely this is the same equation as we obtained above for Fibonacci Sequence. We know that a1 = 1,
a2 = 2. So the pattern can easily be obtained as
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144
No points for guessing that a10 = 89.
TG Tower has 10 floors each need to be painted with either pink or yellow color. But no two adjacent
floors are to be colored pink. In how many ways the tower can be painted?
Again applying the logical reverse count let an+1 be the number of ways to paint the n + 1 floors. These include
the ways
when first floor was painted pink i.e. next floor has to be yellow and remaining n 1 floors can be painted
in an-1 ways,
and when first floor was painted yellow i.e. remaining n floors can be painted in an ways. So we have got
the recursion as
an+1 = an + an-1
with a1 = 2, a2 = 3. So the pattern can easily be obtained as
2, 3, 5, 8, 13, 21, 34, 55, 89, 144
And the required number of ways of painting is 144.
All 10-digit natural numbers are formed by using digit 1 or 2. How many of these numbers have two
consecutive 1s?
Lets count first that how many ten digit natural numbers dont have two consecutive ones. If I replace the
numeral 1 with pink and 2 with yellow of above question, I have already calculated the number of 10 digit
numbers with no two consecutive 1s which is 144. As total 10 digit numbers formed by using digit 1 or 2 is 210 =
1024, so the required numbers are 1024 144 = 880.
x
A fair coin is tossed 10 times. Let be the probability that no two consecutive tosses show tails
y
where x and y are natural numbers such that HCF(x, y) = 1. Find x + y.
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo
MATH OLYMPIAD LESSONS
COMBINATORICS
You must be able to do this one easily now. I am leaving this for my intellectual audiences fun.
There are 10 line segments of different integer lengths increasing from 1 meter to n meter. What is
the smallest value of n such that no three line segments from the ten can be chosen to make a
triangle?
This is a special use of Fibonacci. We know that sum of any two sides of a triangle must be greater than the third
side other wise the three sides cannot form a triangle. So the 10 smallest lengths can easily be obtained as:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89
We have got our answer with n = 89.
A postman delivers letters to the nineteen houses on the west side of Chaurangi lane. The postman
notices that no two consecutive houses ever get letters on the same day. How many different
combinations of letter delivery are possible?
Lets reframe the question as making 19 - digit number formed using digits 1 and 2 only with no two consecutive
1s. Here 19 - digit number represents 19 houses while 1 denotes letter posted and 2 denote letter not posted to
a particular house. We are going to get the same recursion again i.e.
an+1 = an + an-1
with a1 = 2, a2 = 3. So the pattern can easily be obtained as
2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946
And the answer is a19 = 10946.
And it include the ways when first tile is 2 2 (as shown) i.e. remaining rectangle can be tiled in an-2 ways.
Also it include the ways when first 2 1 tile was in horizontal orientation (see figure) i.e. remaining rectangle can
be tiled in an-2 ways.
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo
MATH OLYMPIAD LESSONS
COMBINATORICS
By now you must have understood how to create a recursion and use this tool to solve somewhat how to handle
problems.
How to find the nth term of the original Fibonacci Sequence i.e. 0, 1, 1, 2, 3, 5?
If we disregard first few terms then any Fibonacci behaves as a geometric progression (GP) with a
5 +1
common ratio close to 1.6 or Golden ratio i.e. . This can be easily checked by taking the terms of
2
n
Fibonacci in GP as Tn = ar
So using the recursion, we have Tn+1 = Tn + Tn-1
1+ 5 1 5
That means, arn+1 = arn + arn-1 => r2 = r + 1 => r = or
2 2
n n
1 + 5 1 5
We have Tn = a
2
or Tn = a
2
both of which will satisfy the above recursion but they do not
give the original Fibonacci. Lets see that difference of these two sequences also satisfy the recursion.
i.e. Tn+1 Tn+1 = (Tn + Tn-1) (Tn + Tn-1) = (Tn Tn) + (Tn-1 Tn-1)
So lets try to equate Tn Tn with Fn so as to find the formula for nth term of Fibonacci.
T0 T0 = 0 = F0 (satisfying)
1
T1 T1 = a 5 = 1 = F1 if a =
5
T2 T2 = 1 = F2 (satisfying)
Eureka! We have got it now.
1 1 + 5 1 5
n n
Fn =
5 2 2
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo
MATH OLYMPIAD LESSONS
COMBINATORICS
2. What is the sum of the series: 22 + 42 + 62 + 102 + 162 +... + 7542 + 12202?
4. How many 10 digit natural numbers formed by digits 1 and 2 only are there which do not have
221 at any place?
6. There are two urns, one is full of water and the other is empty. On the first stage, half of the
content of urn I is passed into urn II. On the second stage 1/3 of the content of urn II is
passed into urn I. On stage three, 1/4 of the content of urn I is passed into urn II. On stage
four 1/5 of the content of urn II is passed into urn I, and so on. What fraction of water remains
in urn I after the 2010th stage?
7. Twelve people are seated around a circular table. In how many ways can six pairs of people
engage in handshakes so that no arms cross? (Nobody is allowed to shake hands with more
than one person at once.)
In how many ways can six couple dance in pairs so that no person dances with his or her spouse?
In how many ways can six letters be delivered to different addresses so that no letter reaches its
desired place?
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo
MATH OLYMPIAD LESSONS
COMBINATORICS
In how many ways Mr. Black, Mr. White, Mr. Red, Mr. Blue, Mr. Green and Mr. Orange can each wear a
cap from six black, white, red, blue, green and orange colored ones such that no person is wearing
cap of same color as his name?
In how many ways a 2 6 rectangle can be tiled with six different types of 1 1 tiles with two of each
type available? It is given that each of the two 1 6 rectangle contain all the six types of tile and no
two same tile share an edge.
All of the above questions are asking for same thing that a particular item must not be associated with its
partner. Lets take the general case We have a1, a2, , an which are partners of b1, b2, , bn respectively. Now
we are to pair them in such a way that no two partners are in same group. Lets call it derangement and Dn be
the number of derangements of n pairs.
Now it can be easily observed that D1 = 0, D2 = 1, D3 = 2.
Number of derangements for n pairs i.e. Dn includes the ways
when a1 is associated with bi (where i can be selected from 2 to n in (n 1) ways) and ai is associated
with b1 i.e. remaining n 2 pairs can be deranged in Dn-2 ways.
when a1 is associated with bi (where i can be selected from 2 to n in (n 1) ways) and ai is not
associated with b1 i.e. remaining n 1 pairs can be deranged in Dn-1 ways.
So here we go with our recursion as follows:
Dn = (n 1)[Dn-1 + Dn-2]
Now lets try to derive a formula for Dn, we have Dn = (n 1)[Dn-1 + Dn-2]
=> Dn nDn-1 = (-1)[Dn-1 (n 1)Dn-2] = (-1)2[Dn-2 (n 2)Dn-3] = = (-1)n-2[D2 2D1] = (-1)n-2 = (-1)n
So dividing by n!, we have
Dn Dn 1 (1)n
=
n ! (n 1)! n!
Dn 1 Dn 2 (1)n 1
Similarly, =
(n 1)! (n 2)! (n 1)!
Dn 2 Dn 3 (1)n 2
=
(n 2)! (n 3)! (n 2)!
:::::::::::::::::::::::::::
D2 D1 (1)2
=
2! 1! 2!
D D (1) n
(1)n 1 (1)n 2 (1)2
Adding all the above equations we have, n 1 = + + + ... +
n ! 1! n! (n 1)! (n 2)! 2!
I hope all of you can solve above questions easily. Also I am sure you will be having a new perspective to view
abnormal counting problems.
Good luck!
Regarding solutions to the problems posed in the article and any comments, corrections or suggestion, contact me:
Kamal Lohia (kamallohia@totalgadha.com)
www.totalgadha.com www.totalgadha.com/rmo