You are on page 1of 27

NPTEL C OURSE ON

M ATHEMATICS IN I NDIA :
F ROM V EDIC PERIOD TO M ODERN TIMES
Lecture 18
Development of Combinatorics 1

M. D. Srinivas
Centre for Policy Studies, Chennai

Outline
I

Combinatorics in Ayurveda

Gandhayukti of Var
ahamihira

M
atr
a-vr.ttas or moric metres
I

Prast
ara: Enumeration of metres of n-m
atr
as in the form of
an array
Sankhy

a: The total number of metrical forms of given


number of m
atr
as the Virah
anka
sequence (so called
Fibonacci sequence)
Nas..ta and Uddis..ta processes: Finding the metrical form
given the row-number and vice versa in a prast
ara.
M
atr
a-meru: To determine the number of metrical forms
with a given number of gurus.
Representation of any number as a sum of Virahanka

numbers.


Combinatorics in Ayurveda
The ancient Indian medical treatises of Caraka and Susruta
(prior to 500 BCE) deal with certain combinatoric questions in
relation to the six rasas and the three dos.as. For instance,
Caraka (S
utrasth
ana Ch. 26) discusses the 63 combinations
that are possible from the 6 rasas:
Bea:d:(
;va: a.ta ta:mua:pa:de:[ya.a:maH
Ea:Sa.Ma ;aa:Sa:a.:a.va:Da:a.va:k+.pa.ea d;v.ya:de:Za:k+a:l+pra:Ba:va.a:;


.~va.a:d
u .=;}+;a:
a.d: a.Ba:ya.eRa:gMa Zea:SEa.=;}+;a:d:yaH

:pxa:Ta:k
,

ya.a:a.nta
// :pa.*.a:d:ZE
a:ta.a:
a.na d;v.ya.a: a.Na ;a.d
.=;sa.a:
a.na ;a.h


:pxa:Ta:ga:}+;a:
a.d:yua:+.~ya ya.ea:gaH

Zea:SEaH

:pxa:Ta:gBa:vea:t,a


l+va:Na:~ya k+.f.ea:~ta:Ta.a
ma:Dua.=;~ya ta:Ta.a:}++~ya

+;a
;aa.=;sa.a:
a.na ya:Ta.a .sa:*

M d;v.ya.a:Nyua:+a:
a.na ;a.vMa:Za: a.taH

va:[ya:ntea ..ca ..ca:tua:Sk


e +.Na d;v.ya.a: a.Na d:Za:pa.*.a
..ca


Combinatorics in Ayurveda

.~va.a:d
a .sa:a.h:ta.Ea ya.ea:gMa l+va:Na.a:d;aE H
:}+;E
ya.ea:gMa Zea:SEaH

:pxa:Ta:gga:ta:m,a

:pxa:Ta:gya.a:ta:(
a:tua:Sk+=;sa:sMa:K.ya:ya.a

.sa:a.h:ta.Ea .~va.a:d
u :l+va:Na.Ea ta:d
:tk+.f
.a:a.d: a.BaH
yua:+Ea Zea:SEaH

:pxa:Ta:gya.ea:gMa ya.a:taH

:pxa:Ta:k
,

.~va.a:d
U :Sa:Na.Ea ta:Ta.a


x
k+.f
,
.a:d;aE .=;}++l+va:Na.Ea .sMa:yua:+Ea .sa:a.h:ta.Ea :pa:Ta:k
ya.a:taH


Zea:SEaH :pxa:Ta:gya.ea:gMa Zea:SEa.=;}++k+.f
U ta:Ta.a

yua.$ya:tea tua k+.Sa.a:yea:Na .sa: a.ta:+Ea l+va:Na.ea:Sa:Na.Ea

:Sa:f
,
tua :pa.*.a.=;sa.a:nya.a:h
E +.k+.~ya.a:pa:va.jRa:na.a:t,a

u :=e;k
:Sa:f
,
..cEa:vea:k+=;sa.a:
a.na .~yua:=e;k
M :Sa:q"+sa:mea:va ..ca
I+ a.ta ;aa:Sa:a.:dR;v.ya.a:Na.Ma ;
a.na:a.dR:.a .=;sa:sMa:K.ya:ya.a


Combinatorics in Ayurveda
The number of bheda or combinations that can be obtained by
combining different number of rasas is 63 as seen below:
The number of combinations of 2 rasas selected from the 6 is 15
The number of combinations of 3 rasas selected from the 6 is 20
The number of combinations of 4 rasas selected from the 6 is 15
The number of combinations of 5 rasas selected from the 6 is 6
The number of combinations of 1 rasa selected from the 6 is 6
The number of combinations of 6 rasas selected from the 6 is 1
Hence the total number of bhedas is 63
This is a particular case of the relation
n

C1 +n C2 + . . . +n Cn = 2n 1

The Susruta-sam
a (Uttarasth
ana Ch. 63) actually lists each of
. hit
these possibilities in a sequential enumeration akin to a prast
ara.

Gandhayukti of Var
ahamihira
Chapter 76 of the great compilation Br.hatsam
a of Varahamihira
. hit
(c.550) is devoted to a discussion of perfumery. In verse 20, Varaha
mentions that there are 1,820 combinations which can be formed by
choosing 4 perfumes from a set of 16 basic perfumes (16 C4 = 1820).
:Sa.ea:q+Za:k
e d;v.ya:ga:Nea ..ca:tua:a.vRa:k+.pea:na ; a.Ba:d;a:ma.a:na.a:na.a:m,

a
A:.a:d:Za .ja.a:ya:ntea Za:ta.a:
a.na .sa:a.h:ta.a:
a.na ;a.vMa:Za:tya.a

In verse 22, Var


aha gives the method of construction of a meru (or a
tabular figure) which may be used to calculate the number of combinations. This verse also very briefly indicates a way of arranging
these combinations in an array or a prast
ara.

+;a.a:m,
:pUa:veRa:Na :pUa:veRa:Na ga:tea:na yua:
M .~Ta.a:nMa ;a.va:na.a:ntyMa :pra:va:d:a.nta
// .sa:*
a

I+.cC;a:a.va:k+.pEaH k
+.ma:Za.eaY: a.Ba:na.a:ya na.a:tea ;
a.na:vxa: aaH

:pua:na.=;nya:na.a: a.taH

Bhat.t.otpala (c.950) in his commentary has explained both the


construction of the meru and the method of los..ta-prast
ara of the
combinations.

Gandhayukti of Var
ahamihira
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1

120
105
91
78
66
55
45
36
28
21
15
10
6
3
1

560
455
364
286
220
165
120
84
56
35
20
10
4
1

1820
1365
1001
715
495
330
210
126
70
35
15
5
1

Gandhayukti of Var
ahamihira
I

In the first column the natural numbers are written.

In the second column, their sums, in the third the sums of


sums, and so on. One row is reduced at each step.

The top entry in each column gives the number of


combinations.

The above meru is based on the relation


n

Cr =n1 Cr 1 +n2 Cr 1 + . . . +r 1 Cr 1

which is equivalent to Pingalas

relation
n

Cr =n1 Cr 1 +n1 Cr

M
atr
a-vr
. tta

By assigning the values 1 for laghu and 2 for guru, we can


obtain the total value or m
atr
as, associated with each
metrical form.

This leads to the notion of m


atr
a-vr.tttas or moric metres,
where the metrical patterns are classified by their total
value or m
atr
a.

Pingala

has only briefly touched upon m


atr
a-vr.ttas in
Chapter IV of Chandah.-s
astra while discussing the various
a and Vait
forms of Ary
alya vr.ttas.

M
atr
a-vr
. tta

M
atr
a-vr.ttas are more commonly met with in Pr
akr.ta and
regional languages.

The Pr
akr.ta work Vr.ttaj
ati-samuccaya of Virahanka
(c.600)
discusses the pratyayas of prast
ara and sankhy

a for
m
atr
a-vr.ttas.

A more detailed discussion of m


atr
a-vr.ttas is available in
Chandonus
asana of Hemacandra (c.1200),
Pr
akr.ta-Paingala,

V
an.bh
u.san.a of D
amodara (c.1500) and
the commentary of N
ar
ayan.abhat.t.a (c.1550) on
Vr.ttaratn
akara of Ked
ara (c.1000).

M
atr
a-Prast
ara
O;:Sa O;:va :pra:~ta.a.=:ea ma.a.a.a:vxa.a.a:na.Ma .sa.a: a.Da:taH

;a.k+.ntua

ma.a.a.a ya.a na :pUa:yRa:tea :pra:Ta:mMa .~.pa:Za ta.a :de:a.h

(vxa.a.ja.a: a.ta:sa:mua:a:yaH

6 20

The prast
ara in the case of a m
atr
a-vr.tta of n-m
atr
as is to be
generated following the same procedure as in the case of a
varn.a-vr.tta except for the following:
I

The first row consists of all Gs if n is even and an L


followed by all Gs if n is odd.

[Given any row in the prast


ara, to generate the next, scan
from the left to identify the first G. Place an L below that.
The elements to the right are brought down as they are.]

The remaining m
atr
as to the left are filled in by all Gs, and
by placing an L at the beginning, if need be, to keep the
total number of m
atr
as the same.

M
atr
a-Prast
ara
1-M
atr
a Prast
ara
1

2-M
atr
a Prast
ara
1
2

G
L

3-M
atr
a Prast
ara
1
2
3

L
G
L

G
L
L

M
atr
a-Prast
ara
4-M
atr
a Prast
ara
1
2
3
4
5

G
L
G
L
L

L
L
G
L

G
G
L
L
L

5-M
atr
a Prast
ara
1
2
3
4
5
6
7
8

L
L
G
L

L
G
L
G
L
G
L
L

G
L
L
G
G
L
L
L

G
G
G
L
L
L
L
L

M
atr
a-Prast
ara
6-M
atr
a Prast
ara
1
2
3
4
5
6
7
8
9
10
11
12
13

L
L
G
L

L
L
G
L
L
G
L
G
L
G
L
L

G
L
G
L
L
G
L
L
G
G
L
L
L

G
G
L
L
L
G
G
G
L
L
L
L
L

G
G
G
G
G
L
L
L
L
L
L
L
L

Sankhy

d.Ea d.Ea :pUa:vRa:a.va:k+.pa.Ea ya.a mea:l+


a.ya:tva.a .ja.a:ya:tea .sa:*
+;a.
a

.sa.a o;a.=;ma.a.a.a:Na.Ma .sa:*


+;a.
a:ya.a O;:Sa ;
a.na:deR :ZaH

(vxa.a.ja.a: a.ta:sa:mua:a:yaH

6.49)

The number of metrical forms Sn in the n-m


atr
a prast
ara is the
sum of the number of metrical forms Sn1 , Sn2 , in the
prast
aras of (n 1) and (n 2) m
atr
as respectively:
Sn = Sn1 + Sn2
The above rule follows from the fact that the n-m
atr
a prast
ara is
generated as follows:
The first Sn2 rows are obtained by adding a G to the right of
each row of the prast
ara of (n 2)-m
atr
as.
The next Sn1 rows are obtained by adding an L to the right of
each row of the prast
ara of (n 1)-m
atr
as.

Sankhy

The prast
ara of one m
atr
a has only one metrical form and that
of 2-m
atr
as has just two metrical forms (G and LL).
S1 = 1 and S2 = 2
Therefore we get the following Virah
anka
sequence of
sankhy

ankas

the so called Fibonacci (c.1200) sequence.


n
Sn

1
1

2
2

3
3

4
5

5
8

6
13

7
21

8
34

9
55

10
89

Uddis..ta

d:tva.a :pUa:vRa:yua:ga.a:*:
M gua.+.Za.a:Sa.Ra:*:
M ;a.va:lu +pya Zea:Sa.a:*:
e

A;*:
E +a=;ta.eaY:va: a.Za:E H ; a.Za:E .+.a.;:mua:a.;:m,a

(va.a:Na.a:BUa:Sa:Na:m,a

1.31)

Given a moric metric form, write down from the left the
sankhy

ankas

sequentially in the following way:


I

For each G write two sankhy

ankas,

the first above and the


next below.

For each L, write one sankhy

anka
above.

Add all the sankhy

ankas

above the Gs. This sum


subtracted from the total sankhy

a associated with the


m
atr
a-vr.tta gives the row number.

Uddis..ta

Example: To find the row-number of the metrical form GLLG in


the 6-M
atr
a-prast
ara:
1
G
2

3
L

5
L

8
G
13

The row number is 13 (1 + 8) = 4

Nas..ta

na:e kx+.tva.a k+.l;aH .sa:va.RaH :pUa:vRa:yua:gma.a:*:+ya.


ea: aja:ta.aH

:pxa:.a:*:+h
.a:na:Zea:Sa.a:*:
M yea:na yea:nEa:va :pUa:yRa:tea
:pa.=:Ma k+.l;a:mua:pa.a:d.a:ya ta.a ta.a gua.+.BRa:vea:t,a
ma.a.a.a:ya.a na::mea:ta.ua :P+ a.Na.=:a.jea:na Ba.a:a.Sa:ta:m,a (va.a:Na.a:BUa:Sa:Na:m,a 1.32-33)

To find the moric metric form associated with a given


row-number in the n-m
atr
a-prast
ara
I

I
I

Write down n Ls with the sequence of sankhy

ankas

above
them.
Subtract the given row number from the sankhy

anka
Sn .
From the result, subtract Sn1 if possible. Otherwise,
subtract Sn2 and so on till the end.
The moric metric form is obtained by converting each L
below a sankhy

anka
which has been subtracted, together
with the L to the right of it, into a G.

Nas..ta
Example: To find the seventh metrical form in the
6-m
atr
a-prast
ara
1 2 3 5 8 13
L L L L L L
I

13-7 = 6.

8 cannot be subtracted form 6

6-5 = 1

3, 2 cannot be subtracted from 1

1-1=0

Thus 5 and 1 are the sankhy

ankas

which have been subtracted.


Hence the metric form is GLGL

Virah
anka

Representation of Numbers

The above examples of nas..ta and uddis..ta are based upon the
following representations of the numbers 9,6 as sums of
Virahanka
numbers.
9=1+8
6=1+5
In fact it can be shown the nas..ta and uddis..ta processes are
based on the following very interesting property:
Every integer is either a Virah
anka
number or can be
expressed uniquely as a sum of non-consecutive Virahanka

(or the so called Fibonacci) numbers.

M
atr
a-Meru
The number of metric forms with different number of laghus (gurus)
can be found from the following table known as the M
atr
a-meru:
x +.tva.a:ntyea:Svea:k+.ma:pRa:yea:t,a
d
:yMa d
:yMa .sa:mMa k+ea:M k
O;:k+.a.d
+.mea:Na :pra:Ta:mea:Sva:a.pa
:k+.aa:k+..ca:tuaHk

Za.a:Sa.Ra:*:;a:a:pa.=:a:
*:;a:Bya.M
a Zea:Sa:k+ea::a:n,a :pra:pUa.=;yea:t,a

ma.a.a.a:mea.+=;yMa d
u :gRaH

.sa:veRa:Sa.a:ma: a.ta:d
u :gRa:maH

(va.a:Na.a:BUa:Sa:Na:m,a

1 37 38

The successive rows of the m


atr
a-meru have 1, 2, 2, 3, 3, etc cells.
Place 1 in the top row and in the end of each row.
Place 1 in the beginning of all the even rows and 2, 3, 4 etc in the
beginning of odd rows.
The other cells are filled by the sum of the number in the row above
which is above and the number in the row further above which is to
the right.

M
atr
a-Meru

1
7

1
6
21
56

1
5
15
35
70
126

1
4
10
20
35
56
84
120

1
3
6
10
15
21
28
36
45
55

1
2
3
4
5
6
7
8
9
10
11
12

1
1
1
1
1
1
1
1
1
1
1
1
1

S1 = 1
S2 = 2
S3 = 3
S4 = 5
S5 = 8
S6 = 13
S7 = 21
S8 = 34
S9 = 55
S10 = 89
S11 = 144
S12 = 233
S13 = 377

From the above meru we can see that, in the 6-m


atr
a-prast
ara, there
is 1 metrical form with 0L, 6 with 2L, 5 with 4L and 1 with 6L. We can
also infer that in the same prast
ara there is one form with 3Gs, 6 with
2Gs, 5 with 1G and 1 with 0G.

M
atr
a-Meru
In the n-m
atr
a-vr.tta-prast
ara, if a metrical form has i gurus, then
it will have (n 2i) laghus.
Hence the metrical forms which have i gurus will all have a total
of (n i) syllables, of which i will be gurus.
Therefore, it follows that Gni the number of metrical forms with i
Gs, in the n-m
atr
a-vr.tta prast
ara, is given by:
Gni =

(ni)

Ci =

(n i)!
n
for 0 i
(i)!(n 2i)!
2

and
Gni = 0 otherwise.
Note that Gni satisty the recurrence relation:
i1
i
Gni = Gn1
+ Gn2

References
1. Vr.ttaj
atisamuccaya or Kaisit..thachanda (in Pr
akr.ta) of
Virah
anka,

Ed., with commentary by Gop


ala, by H. D.
Velankar, Rajasthan Prachya Vidya Pratisthana, Jodhpur
1962.
2. V
an.bh
u.san.a of D
amodara, Kavyamala Series,
No 53, Bombay 1895.
3. Ludwig Alsdorf, Die Pratyayas, Ein Beitrag zur Indischen
Mathematik, Zeitschrift fur
Indologie und Iranistik, 9, 1933,
97-157; Translated into English as, The Pratyayas: Indian
Contribution to Combinatorics, by S. R. Sarma, Indian
Journal of History of Science, 26, 1991, 17-61.
4. T. Kusuba, Combinatorics and Magic-squares in India: A
Study of N
ar
ayan.a Pan.d.itas Gan.itakaumud, Chapters
13-14, PhD Dissertation, Brown University 1993.

References

5. R. Sridharan, Pratyayas for M


atr
avr.ttas and Fibonacci
Numbers, Mathematics Teacher, 42, 2006, 120-137.
6. Raja Sridharan, R. Sridharan and M. D. Srinivas, Narayan.a
Pan.d.itas enumeration of combinations and associated
representation of numbers as sums of binomial
coefficients, Indian Journal of History of Science, 47, 2012,
pp.607-631.

Thanks!

Thank You

You might also like