Top Banner
STUDY OF MAGIC SQUARES IN INDIA M.D.SRINIVAS CENTRE FOR POLICY STUDIES [email protected]
34

Magic Squares

Dec 31, 2015

Download

Documents

Saumya Singh

how the ancient scholar form the magic square and what was their techniques
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Magic Squares

STUDY OF MAGIC SQUARES IN INDIA

M.D.SRINIVAS

CENTRE FOR POLICY STUDIES

[email protected]

Page 2: Magic Squares

MAGIC SQUARES IN INDIA

The first Chapter of Srinivasa Ramanujan’s Note Books is on Magic Squares. T. Vijayaraghavan, in his article on Jaina Magic Squares (1941) notes: "The author of this note learnt by heart at the age of nine the following pan-diagonal square which was taught to him by an elderly person who had not been to school at all."

8 11 2 13

1 14 7 12

15 4 9 6

10 5 16 3 This shows the extraordinary popularity of Magic Squares in India. Indian mathematicians specialized in the construction of a special class of magic squares called sarvatobhadra or pan-diagonal magic squares, where, apart from the sum of the entries of each row, column and the principal diagonals, the sum of all "broken diagonals" add up to the same magic sum.

Page 3: Magic Squares

KAKúAPUòA OF NĀGĀRJUNA (c. 100 BCE)

अकर् इन्दिुनधा नारी तेन ल िवनासनम्।

0 1 0 8

0 9 0 2

6 0 3 0

4 0 7 0

n-3 1 n-6 8 n-3 1 n-5 8 n-7 9 n-4 2 n-6 9 n-4 2 6 n-8 3 n-1 6 n-7 3 n-1 4 n-2 7 n-9 4 n-2 7 n-8

Pan-diagonal with total 2n Total 2n+1

Page 4: Magic Squares

KAKúAPUòA OF NĀGĀRJUNA (c. 100 BCE)

The following pan-diagonal magic square totaling to 100 has also been called Nāgārjunīya

30 16 18 36

10 44 22 24

32 14 20 34

28 26 40 6

Page 5: Magic Squares

SARVATOBHADRA OF VARĀHAMIHIRA (550 CE)

In the Chapter on Gandhayukti of Bçhatsaühitā, Varāhamihira describes

the Sarvatobhadra perfumes

ि ीिन् या भागरैगुरुः प ं तुरुष्कशैलेयौ। िवषया पक्षदहनाः ि यङ्गुमुस्तारसाः केशः॥ स्पृ ात्व गराणा ंमांस्या कृतैकस षड्भागाः। स तुर्वेदचन् मैर्लयनख ीककुन्दरुुकाः॥ षोडशके कच्छपुटे यथा तथा िमि त ेचतु र् े। येऽ ादश भागास्तेऽिस्मन ्गन्धादयो योगाः॥ नखतगरतुरुष्कयुता जातीकपूर्रमृगकृतोब्दोधाः। गुडनखधपू्या गन्धाः कतर् ाः सवर्तोभ ाः॥

अ 2 प 3 तु 5 शै 8

ि 5 मु 8 र 2 के 3

स्पृ 4 त्व 1 त 7 मां 6

म 7 न 6 ी 4 कु 1

Page 6: Magic Squares

SARVATOBHADRA OF VARĀHAMIHIRA

As the commentator Bhaññotpala (c.950) explains:

अिस्मन् षोडशके षोडशकको के कच्छपुटे यथा तथा येन केन कारेण चतु र् े िमि ते एकीकृते। चतुिभ र् ैयर्थाभाग-पिरकिल्पतैिम ीकृतैर येऽ ादश भागा भविन्त तेऽिस्मन् कच्छपुटे गन्धादय ऊध्वार्धः मेण ितयर्ग्वा चतुषुर् कोणेषु वा मध्यमचतुष्कोणे वा कोणको चतु ये वा ाक्पङ् ौ वा मध्यमको ये वान्त्यपङ् ौ। मध्यमको ये या ि तीयतृतीयपङ् ौ वा न्तको के वा येन तेन कारेण। चतुषुर् िमि तेषु अ ादशभागा भविन्त।… तस्मा तस्ततो गृ माणा अ ादशभागा भविन्त अतः सवर्तोभ संज्ञा:। In this kacchapuña with 16 cells, when four substances are mixed in whatever way: When the four substances with their mentioned number of parts are mixed, then the total will be 18 parts; this happens in the above kacchapuña when the perfumes are mixed from top to bottom (along the columns) or horizontally (along the rows), along the four directions, or the central quadrangle, or the four corner cells, or the middle two cells of the first row together with those of the last row; the middle two cells of the second and third row or the first and last cells of the same, or in any other manner. If the substances in such four cells are added there will be 18 parts in all. ... Since, in whatever way they are mixed, they lead to 18 parts, they are called Sarvatobhadra.

Page 7: Magic Squares

SARVATOBHADRA OF VARĀHAMIHIRA

If we add

8 0 8 0 0 8 0 8 0 8 0 8 8 0 8 0

to the Sarvatobhadra of Varāhamihira, we get

10 3 13 8 5 16 2 11 4 9 7 14

15 6 12 1 This belongs to a class of 4x4 pan-diagonal magic squares studied by Nārāyaõa Paõóita in Gaõitakaumudī (c.1356)

Page 8: Magic Squares

JAINA MAGIC SQUARE

7 12 1 14

2 13 8 11

16 3 10 5

9 6 15 4

Pan-diagonal magic square found in the Inscriptions at Dudhai in Jhansi

District (c. 11 the Century) and at the Jaina Temple in Khajuraho (c. 12th

Century).

Page 9: Magic Squares

ANCIENT INDIAN METHOD FOR ODD SQUARES

8 1 6 3 5 7 4 9 2

17 24 1 8 1523 5 7 14 164 6 13 20 22

10 12 19 21 3 11 18 25 2 9

This method of proceeding along small diagonals (alpa-śruti) is described as an ancient method by Nārāyaõa Paõóita in Gaõitakaumudī (c.1356). Nārāyaõa also displays the eight 3x3 magic squares that can be constructed in this manner. De La Loubere, French Ambassador in Siam, wrote in 1693 that he learnt this Indian method from a French doctor M Vincent who had lived in Surat.

Page 10: Magic Squares

BHADRAGAöITA OF NĀRĀYAöA (C.1356)

Chapter XIV of Gaõitakaumudī, titled Bhadragaõita, is devoted to a detailed mathematical study of magic squares. अथ भुवन यगुरुणोपिद ंईशेन मिणभ ाय। कौतुिकन ेभूताय ेढीसंबिन्धस िणतम्॥ स णकचमत्कृतये यन् िवदा ं ीतये कुगणकानाम्। गवर्िक्ष य ैव ये तत्सारं भ गिणताख्यम्॥ समगभर्िवषमगभ िवषमं चिेत ि धा भवे म।् संकीणर्मण्डले ये ते उपभ ािभधे स्याताम्॥ भ ाङ्के चतुरा े िनर के त वे समगभर्म्।

े तु िवषमगभ येका े केवलं िवषमम्॥ सवषां भ ाणां ेढीरीत्या भवे िणतम्।

Thus, a nxn magic square is Samagarbha if n = 4m, Viùamagarbha if n =

4m + 2, and Viùama if n = 2m + 1, where m =1, 2, 3 ...

The classification of Magic Squares in to Samagarbha, Viùamagarbha and

Viùama is also found in the Prākçta work Gaõitasārakaumudī of òhakkura

Pheru (c.1300)

Page 11: Magic Squares

KUòòAKA AND MAGIC SQUARES

Nārāyaõa uses the following linear indeterminate equation to determine

the initial term a and the constant difference d of an arithmetic sequence of

n2 numbers, which can be used to fill an n x n square in order to have the

entries in each row and column add to the sum S

nS = (n2/2) [a + a+( n2- 1) d ]

S = na + (n/2) (n2- 1) d

There exist (an infinite number of) integral solutions for a, d, if S is divisible by gcd(n, (n/2)(n2-1)).

Thus, S should be divisible by n when n is odd, and by n/2 when n is even.

Page 12: Magic Squares

KUòòAKA AND MAGIC SQUARES

Nārāyaõa’Example: S = 40 and n = 4.

40 = 4a +30d

a =-5, d = 2, or a =10, d = 0, or a =25, d = -2, etc.

-5 9 19 17 10 10 10 10 25 11 1 3

21 15 -3 7 10 10 10 10 -1 5 23 13

1 3 25 11 10 10 10 10 19 17 -5 9

23 13 -1 5 10 10 10 10 -3 7 21 15

Nārāyaõa also discusses the case where n arithmetic sequences, of n

elements each, are used to fill up the cells of a nxn magic square.

Page 13: Magic Squares

PANDIAGONAL 4x4 SQUARES OF NĀRĀYAöA

Pan-diagonal Magic Square: Apart from the sum of the entries of each row, column and the principal diagonals, the sum of all the "broken diagonals" add up to the same number.

Nārāyaõa Paõóita displayed 24 pan-diagonal 4x4 magic squares, with entries 1, 2, ..., 16, the top left entry being 1. Nārāyaõa also remarked that (by permuting the rows and columns cyclically) we can construct 384 pan-diagonal 4x4 magic squares with entries 1, 2, ..., 16.

The fact that there are only 384 pan-diagonal 4x4 magic squares, was proved by B.Rosser and R.J.Walker in 1938. A simpler proof was given by T.Vijayaraghavan in 1941.

Page 14: Magic Squares

PROPERTIES OF PANDIAGONAL 4x4 MAGIC SQUARES

Property 1: Let M be a pan-diagonal 4x4 magic square with entries 1, 2, ..., 16, which is mapped on to the torus by identifying opposite edges of the square. Then the entries of any 2x2 sub-square formed by consecutive rows and columns on the torus add up to 34.

1 12 13 8

15 6 3 10

4 9 16 5

14 7 2 11 For example, 1+12+15+6 = 1+12+14+7 = 34

Property 2: Let M be a 4x4 pan-diagonal magic square with entries 1, 2, ..., 16, which is mapped on to the torus. Then, the sum of an entry of M with another which is two squares away from it along a diagonal (in the torus) is always 17.

For example, 1+16 = 6+11 = 15+2 = 4+13 = 14+3 = 9+8 = 17

Page 15: Magic Squares

PROPERTIES OF PANDIAGONAL 4x4 MAGIC SQUARES

The "neighbours" of an element of a 4x4 pan-diagonal magic square (which is mapped on to the torus as before) are the elements which are next to it along any row or column. For example, 3, 5, 2 and 9 are the "neighbours" of 16 in the magic square below.

1 12 13 8

15 6 3 10

4 9 16 5

14 7 2 11 Property 3 (Vijayaraghavan): Let M be a 4x4 pan-diagonal magic square with entries 1, 2, ..., 16, which is mapped on to the torus. Then the neighbours of the entry 16 have to be 2, 3, 5 and 9 in some order.

We can use the above properties to construct 4x4 pan-diagonal magic squares starting with 1 placed in any desired cell.

Proposition: There are precisely 384 pan-diagonal 4x4 magic squares with entries1, 2, ..., 16.

Page 16: Magic Squares

SAMAGARBHA MAGIC SQURES

This seems to be an old method for construction of samagarbha or 4nx4n magic square from a 4x4 magic square which is also described by òhakkura Pheru and Nārāyaõa. We illustrate this by constructing an 8x8 square following the method given by òhakkura Pheru. We start with a pan-diagonal 4x4 square.

1 8 13 12

14 11 2 7

4 5 16 9

15 10 3 6 Then we proceed as follows:

Page 17: Magic Squares

SAMAGARBHA MAGIC SQURES

Finally we arrive at the pan-diagonal 8x8 magic square

1 32 61 36 5 28 57 40 62 35 2 31 58 39 6 27

4 29 64 33 8 25 60 37 63 34 3 30 59 38 7 26

9 24 53 44 13 20 49 48 54 43 10 23 50 47 14 19 12 21 56 41 16 17 52 45 55 42 11 22 51 46 15 18

One of the properties of an 8x8 pan-diagonal magic square seems to be that the sum of four alternating cells along any diagonal adds to half the magic sum.

Page 18: Magic Squares

SAMAGARBHA MAGIC SQURES

Another version of this traditional method has been noted Nārāyaõa, who has given the following example of construction of a 8x8 square from a 4x4 square.

1 8 13 1214 11 2 7 4 5 16 9 15 10 3 6

The above construction does not lead to a pan-diagonal 8x8 magic square, even though we started with a pan-diagonal 4x4 square.

Page 19: Magic Squares

SAMAGARBHA MAGIC SQURES

We slightly modify Nārāyaõa’s procedure so that we obtain a pan-diagonal 8x8 square from a pan-diagonal 4x4 square

1 8 13 1214 11 2 7 4 5 16 9 15 10 3 6

Page 20: Magic Squares

NĀRĀYAöA’S FOLDING METHOD FOR SAMAGARBHA SQUARES

समगभ ेकाय छादकसंज्ञं तयोभर्वेदकेम्। छा ािभधानमन्यत्करसंपुटव संपुटो ज्ञेयः॥ इ ादी चयाङ्का भ िमता मूलपिङ् संज्ञा ा। त दभीिप्सतमुखचयपिङ् ान्या पराख्या स्यात्॥ मूलाख्यपिङ् योगोिनतं फल ंपरसमाससंभ म्। लब्धहता परपिङ् गुर्णजाख्या सा भवेत ्पिङ् ः॥ मूलगुणाख्ये पङ् ी ये ते भ ाधर्तस्त ुपिरवृ े। ऊध्वर्िस्थतैस्तदङ्कैश्छादकसछंा योः पृथग्यािन॥ ितयर् ो ान्या ेऽन्यतरिस्म ूध्वर्गािन को ािन। भ स्याध मगैरुत् मगैः पूरयेदधर्म॥् भ ानािमहसम्पुटिविधरु ो नृहिरतनयेन।

Page 21: Magic Squares

FOLDING METHOD FOR SAMAGARBHA SQUARES

Two samagarbha squares known as the coverer and the covered are to be

made. Their combination is to be understood in the same manner as the

folding of palms. The mūlapaïkti (base sequence) has an arbitrary first

term and constant difference and number of terms equal to the order of

the magic square. Another similar sequence is called the parapaïkti

(other sequence). The quotient of phala (desired magic sum) decreased

by the sum of the mūlapaïkti when divided by the sum of the parapaïkti

[is the guõa]. The elements of the parapaïkti multiplied by that gives the

guõapaïkti. The two sequences mūlapaïkti and guõapaïkti are reversed

after half of the square is filled. The cells of the coverer are filled

horizontally and those of the covered vertically. Half of the square is

filled [by the sequence] in order and the other half in reverse order. The

way of combining magic square is here enunciated by the son of Nçhari.

Page 22: Magic Squares

FOLDING METHOD FOR SAMAGARBHA SQUARES

Nārāyaõa’s Example 1: 4x4 Square adding to 40

Mūlapaïkti: 1, 2, 3, 4

Parapaïkti: 0, 1, 2, 3

Guõa = [40 - (1+ 2+ 3+ 4)] / [0+1+2+3] = 5

Guõapaïkti: 0, 5, 10, 15

The chādya (covered) and chādaka (coverer) are

2 3 2 3 5 0 10 151 4 1 4 10 15 5 03 2 3 2 5 0 10 154 1 4 1 10 15 5 0

Page 23: Magic Squares

FOLDING METHOD FOR SAMAGARBHA SQUARES

Sampuñīkaraõa (folding) gives

2+15 3+10 2+0 3+5 17 13 2 8

1+0 4+5 1+15 4+10 1 9 16 14

3+15 2+10 3+0 2+5 = 18 12 3 7 4+0 1+5 4+15 1+10 4 6 19 11

Nārāyaõa also displays the other square which is obtained by

interchanging the covered and the coverer.

This method leads to a pan-diagonal magic square.

Nārāyaõa’s Example 2: 8x8 Square adding to 260

Mūlapaïkti: 1, 2, 3, 4, 5, 6, 7, 8

Parapaïkti: 0, 1, 2, 3, 4, 5, 6, 7

Guõa = [260 - (1+ 2+ …+8)] / [0+1+2+…+7] = 8

Guõapaïkti: 0, 8, 16, 24, 32, 40, 48, 56

Page 24: Magic Squares

FOLDING METHOD FOR SAMAGARBHA SQUARES

The chādya and chādaka are

Sampuñīkaraõa gives

Page 25: Magic Squares

NĀRĀYAöA’S FOLDING METHOD FOR ODD SQUARES

पङ् ी मूलगुणाख्ये स्तः ाग्वत्साध्ये तदिदमम्। आिदमायामूध्वर्पङ् ौ मध्यमे को के िलखेत॥् तदधः मं पङ्क्त्याङ्कािञ्छ ाङ्कानूध्वर्तः मात्। ि तीया ास्त ुत ि तीया ां संिलखेत्॥ छा च्छादकयोः ाग्वि िधःसंपुटने भवेत्।

Two sequences referred to as the mūlapaïkti and the guõapaïkti are to

be determined as earlier. The first number should be written in the

middle cell of the top row and below this the numbers of the sequence in

order. The rest of the numbers are to be entered in order from above.

The first number of the second sequence is to be written in the same way

[in the middle cell of the top row]; the second etc. numbers are also to

be written in the same way. The rule of combining the covered and the

coverer is also the same as before.

Page 26: Magic Squares

FOLDING METHOD FOR ODD SQUARES

Example: 5x5 Square adding to 65

Mūlapaïkti: 1, 2, 3, 4, 5

Parapaïkti: 0, 1, 2, 3, 4

Guõa = [65 - (1+ 2+ 3+ 4+ 5)] / [0+1+2+3+4] = 5

Guõapaïkti: 0, 5, 10, 15, 20 The chādya and chādaka are

4 5 1 2 3 15 20 0 5 105 1 2 3 4 20 0 5 10 151 2 3 4 5 0 5 10 15 202 3 4 5 1 5 10 15 20 03 4 5 1 2 10 15 20 0 5

Page 27: Magic Squares

FOLDING METHOD FOR ODD SQUARES

Sampuñīkaraõa gives

4+10 5+5 1+0 2+20 3+15 14 10 1 22 18

5+15 1+10 2+5 3+0 4+20 20 11 7 3 24

1+20 2+15 3+10 4+5 5+0 = 21 17 13 9 5 2+0 3+20 4+15 5+10 1+5 2 23 19 15 6 3+5 4+0 5+20 1+15 2+10 8 4 25 16 12

Nārāyaõa’s method happens to be an instance of combining two Mutually Orthogonal Latin Squares. However, it does not yield a pan-diagonal magic square as the diagonal elements of the squares are not all different.

Page 28: Magic Squares

MODIFICATION OF NĀRĀYAöA’S FOLDING METHOD FOR ODD SQUARES

We may modify the above prescription and construct pan-diagonal magic squares of odd order n>1, whenever n is not divisible by 3, as follows:

Example: Pan-diagonal 5x5 Square adding to 65

Mūlapaïkti: 1, 2, 3, 4, 5 Parapaïkti: 0, 1, 2, 3, 4 Guõa = [65 - (1+ 2+ 3+ 4+ 5)] / [0+1+2+3+4] = 5 Guõapaïkti: 0, 5, 10, 15, 20 The chādya and chādaka are now chosen as

2 4 1 3 5 5 15 0 10 203 5 2 4 1 10 20 5 15 0 4 1 3 5 2 15 0 10 20 5 5 2 4 1 3 20 5 15 0 101 3 5 2 4 0 10 20 5 15

Page 29: Magic Squares

MODIFICATION OF NĀRĀYAöA’S FOLDING METHOD FOR ODD

SQUARES

Sampuñīkaraõa gives

2+20 4+10 1+0 3+15 5+5 22 14 1 18 10

3+0 5+15 2+5 4+20 1+10 3 20 7 24 11

4+5 1+20 3+10 5+0 2+15 = 9 21 13 5 17 5+10 2+0 4+15 1+5 3+20 15 2 19 6 23 1+15 3+5 5+20 2+10 4+0 16 8 25 12 4

The above square is clearly pan-diagonal.

Page 30: Magic Squares

EXAMPLES FROM RAMANUJAN’S NOTEBOOK

The first chapter of Ramanujan’s Notebook deals with Magic Squares. It is

said that he might have made these entries while he was still at the School.

The above happens to be an example of Nārāyaõa’s folding method for odd squares.

Page 31: Magic Squares

EXAMPLES FROM RAMANUJAN’S NOTEBOOK

The second example above happens to be an instance of Nārāyaõa’s folding method for doubly even squares.

Page 32: Magic Squares

EXAMPLES FROM RAMANUJAN’S NOTEBOOK

Page 33: Magic Squares

REFERENCES

1. Gaõitakaumudī of Nārāyaõa Paõóita’s, Ed. by Padmākara Dvivedi, 2

Vols, Varanasi 1936, 1942.

2. T. Vijayaraghavan, On Jaina Magic Squares, The Mathematics Student, 9

(3), 1941, 97-102.

3. B. Datta and A. N. Singh (Revised by K. S. Shukla), Magic Squares in

India, Ind. Jour. Hist. Sc. 27, 1992, 51-120.

4. T. Kusuba, Combinatorics and Magic-squares in India: A Study of

Nārāyaõa Paõóita’s Gaõita-kaumudī, Chapters 13-14, PhD Dissertation,

Brown University 1993.

5. Paramanand Singh, The Gaõitakaumudī of Nārāyaõa Paõóita: Chapter

XIV, English Translation with Notes, Gaõita Bhāratī, 24, 2002, 34-98.

6. Gaõitasārakaumudī of òhakkura Pheru, Ed. with Eng. Tr. and Notes by

SaKHYa (S. R. Sarma, T. Kusuba, T. Hayashi, and M. Yano), Manohar, New Delhi, 2009.

Page 34: Magic Squares

REFERENCES

7. B.C.Berndt, Ramanujan’s Notebooks, Part I, Springer, New York 1985.

8. Raja Sridharan and M. D. Srinivas, Study of Magic Squares in India , in R.

Sujatha et al ed., Math Unlimited: Essays in Mathematics, Taylor &

Francis, London 2011, pp. 383-391.

9. Raja Sridharan and M.D.Srinivas, Folding Method of Nārāyaõa Paõóita

for the Construction of Samagarbha and Viùama magic Squares, IJHS, 47,

2012, pp.589-605.