I was having a conversation with my friends about hashing technique that we use in programming. During such a conversation, I mentioned that infact I was introduced to the hashing technique when I was in 6th grade and in a Carnatic music class with a different name and nothing in connection to computer programming and much before I was introduced to Computers. So what has this concept of hashing got to do with Carnatic music, which is considered an ancient form of music prevalent in South India. Let me explain you this connection. First let us look at a broad definition of Hashing in programming, we know hashing as a concept of assigning a Value to a Key that is unique to fetch the values without any data corruption.
This very same hashing concept exists in Sanskrit or Vedic mathematics as Ka-Ta-Pa-Yaadi Sutra. Sutra means a formula. This sutra assigns a numeral in decimal system to a phonetic syllable or a sanskrit letter in the following fashion.
This very same hashing concept exists in Sanskrit or Vedic mathematics as Ka-Ta-Pa-Yaadi Sutra. Sutra means a formula. This sutra assigns a numeral in decimal system to a phonetic syllable or a sanskrit letter in the following fashion.
K-Ta-Pa-Yaadi Sutra
Assign decimal number 0-9 to the consonants starting from Ka,Ta,Pa,Ya Series (Hence the name for this sutra) like:
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
0
|
ka/क
|
kha/ख
|
ga/ग
|
gha/घ
|
nga/ङ
|
ca/च
|
cha/छ
|
ja/ज
|
jha/झ
|
nya/ञ
|
ṭa/ट
|
ṭha/ठ
|
ḍa/ड
|
ḍha/ढ
|
ṇa/ण
|
ta/त
|
tha/थ
|
da/द
|
dha/ध
|
na/न
|
pa/प
|
pha/फ
|
ba/ब
|
bha/भ
|
ma/म
|
-
|
-
|
-
|
-
|
-
|
ya/य
|
ra/र
|
la/ल
|
va/व
|
śha/श
|
sha/ष
|
sa/स
|
ha/ह
|
La/ळ
|
Given a word one can generate a number to it to be assigned uniquely to create a Hash table. For example the word 'dheera' in sanskrit generates a number 29 based on this algorithm.
Step 1: Flip the first two syllables of the word.
In this example: it becomes ra-dhee;
Step 2: Read the numbers for the syllables from chart above to this new flipped word.
In this example: ra is 2, dhee is 9
Step 3: Return the hashing index number 29
It is interesting how this hashing concept was adopted in Carnatic Music to quickly recollect the Scale of a particular Raga from its name via this hashing index. Before we dive into the details I'd like to brief you the about the concept of notes and scale. If you are familiar, there are 7 predominant notes Sa-Ri-Ga-Ma-Pa-Dha-Ni. There are micro frequencies for Ri-Ga-Ma-Dha-Ni, lower note and a higher note for each of these. A combination of these notes are called a scale, which defines the basis for a Raga.
Let us represent the entire range of Notes as S-R1-R2/G1-G2-G3-M1-M2-P-D1-D2/N1-N2-N3 with 12 distinct notes. In some rAgas, lower note of Ga i.e, G1 is referred as higher note of Ri i.e, R2. Similarly the lower note of Ni (N1) is referred as higher note of Dha (D2). To generate a full scale (Sampoorna RAga Scale) there should be at least one of the micro tonal pairs to be present from the list of R-G-M-D-N in addition to S and P. We can generate a series (Mela) of 72 scales by permuting the higher and lower notes of R-G-M-D-N in a cyclic (Chakra) fashion. This is called a Mela-Chakra (mela = series, chakra = cycle).
I would like you to see below reference table of MelaChakra with the index number 1 to 72. These scales were prevalent and popular with names of rAgas. For example, Kalyani, Shankarabharana, Thodi, Bhairavi, Kharaharapriya. Later during 17th century Sri Venkatamakhin, a descendent of Sri Mutthu Swamy Dikshithar discovered all the popular rAgas that actually fit into this Mela Chakra scheme via ka-ta-pa-ya-adi Sutra. Based on Venkatamakhin's work, attempts were made to formalize Hindusthani Scales. However only up to a limit it could be formatted in this way and not the entire set of rAgas.
Let us represent the entire range of Notes as S-R1-R2/G1-G2-G3-M1-M2-P-D1-D2/N1-N2-N3 with 12 distinct notes. In some rAgas, lower note of Ga i.e, G1 is referred as higher note of Ri i.e, R2. Similarly the lower note of Ni (N1) is referred as higher note of Dha (D2). To generate a full scale (Sampoorna RAga Scale) there should be at least one of the micro tonal pairs to be present from the list of R-G-M-D-N in addition to S and P. We can generate a series (Mela) of 72 scales by permuting the higher and lower notes of R-G-M-D-N in a cyclic (Chakra) fashion. This is called a Mela-Chakra (mela = series, chakra = cycle).
I would like you to see below reference table of MelaChakra with the index number 1 to 72. These scales were prevalent and popular with names of rAgas. For example, Kalyani, Shankarabharana, Thodi, Bhairavi, Kharaharapriya. Later during 17th century Sri Venkatamakhin, a descendent of Sri Mutthu Swamy Dikshithar discovered all the popular rAgas that actually fit into this Mela Chakra scheme via ka-ta-pa-ya-adi Sutra. Based on Venkatamakhin's work, attempts were made to formalize Hindusthani Scales. However only up to a limit it could be formatted in this way and not the entire set of rAgas.
Lets come back and see how this ka-ta-pa-yaadi sutra (Hashing algorithm as mentioned above) was applied to identify the RAga Scales from the name of a Sampoorna RAga.
For example, There is a raga called KanaKangi. To find the scale, applying the above discussed algorithm, we take first two syllables, ka-na from the word KanaKangi. Flipping them, gives us na-ka, reading the assigned number from ka-ta-pa-yaadi table: na --> 0, ka --> 1. Therefore Kanakangi is hashed to 01. This is the first scale in the scale table below. S R1 G1 M1 P D1 N1
Just for clarity, lets look at another example Meca-Kalyani. First two syllables me-ca, Flip the order, ca-me, read the assigned number ca --> 6, me (look for ma) --> 5. There by the Hash Index for Meca-Kalyani is 65. Bingo ! it is the 65th scale. S R2 G3 M2 P D2 N3.
I hope you saw the connection between Carnatic music and this hashing technique which is a very ancient technique found in Vedic Mathematics. The more closely one looks at such sophisticated systems that existed back in the days without computers, It just motivates me to look deeper into our vedic systems to solve some of the modern day problems. Anyways, thank you for reading this quite a technical article !!
Reference: Mela Chakra WikiPage
'Mēḷakartā Rāgas' | |||||
---|---|---|---|---|---|
'Shuddha Madhyama' | 'Prati Madhyama' | ||||
No. | Raga | Scale | No. | Raga | Scale |
1.Indu Chakra | 7. Rishi Chakra | ||||
1 | Kanakangi | S R1 G1 M1 P D1 N1 S' | 37 | Salagam | S R1 G1 M2 P D1 N1 S' |
2 | Ratnangi | S R1 G1 M1 P D1 N2 S' | 38 | Jalarnavam | S R1 G1 M2 P D1 N2 S' |
3 | Ganamurti | S R1 G1 M1 P D1 N3 S' | 39 | Jhalavarali | S R1 G1 M2 P D1 N3 S' |
4 | Vanaspati | S R1 G1 M1 P D2 N2 S' | 40 | Navaneetam | S R1 G1 M2 P D2 N2 S' |
5 | Manavati | S R1 G1 M1 P D2 N3 S' | 41 | Pavani | S R1 G1 M2 P D2 N3 S' |
6 | Tanarupi | S R1 G1 M1 P D3 N3 S' | 42 | Raghupriya | S R1 G1 M2 P D3 N3 S' |
2. Netra Chakra | 8. Vasu Chakra | ||||
7 | Senavati | S R1 G2 M1 P D1 N1 S' | 43 | Gavambhodi | S R1 G2 M2 P D1 N1 S' |
8 | Hanumatodi | S R1 G2 M1 P D1 N2 S' | 44 | Bhavapriya | S R1 G2 M2 P D1 N2 S' |
9 | Dhenuka | S R1 G2 M1 P D1 N3 S' | 45 | Shubhapantuvarali | S R1 G2 M2 P D1 N3 S' |
10 | Natakapriya | S R1 G2 M1 P D2 N2 S' | 46 | Shadvidamargini | S R1 G2 M2 P D2 N2 S' |
11 | Kokilapriya | S R1 G2 M1 P D2 N3 S' | 47 | Suvarnangi | S R1 G2 M2 P D2 N3 S' |
12 | Rupavati | S R1 G2 M1 P D3 N3 S' | 48 | Divyamani | S R1 G2 M2 P D3 N3 S' |
3. Agni Chakra | 9. Brahma Chakra | ||||
13 | Gayakapriya | S R1 G3 M1 P D1 N1 S' | 49 | Dhavalambari | S R1 G3 M2 P D1 N1 S' |
14 | Vakulabharanam | S R1 G3 M1 P D1 N2 S' | 50 | Namanarayani | S R1 G3 M2 P D1 N2 S' |
15 | Mayamalavagowla | S R1 G3 M1 P D1 N3 S' | 51 | Kamavardani | S R1 G3 M2 P D1 N3 S' |
16 | Chakravakam | S R1 G3 M1 P D2 N2 S' | 52 | Ramapriya | S R1 G3 M2 P D2 N2 S' |
17 | Suryakantam | S R1 G3 M1 P D2 N3 S' | 53 | Gamanashrama | S R1 G3 M2 P D2 N3 S' |
18 | Hatakambari | S R1 G3 M1 P D3 N3 S' | 54 | Vishwambari | S R1 G3 M2 P D3 N3 S' |
4. Veda Chakra | 10. Disi Chakra | ||||
19 | Jhankaradhwani | S R2 G2 M1 P D1 N1 S' | 55 | Shamalangi | S R2 G2 M2 P D1 N1 S' |
20 | Natabhairavi | S R2 G2 M1 P D1 N2 S' | 56 | Shanmukhapriya | S R2 G2 M2 P D1 N2 S' |
21 | Keeravani | S R2 G2 M1 P D1 N3 S' | 57 | Simhendramadhyamam | S R2 G2 M2 P D1 N3 S' |
22 | Kharaharapriya | S R2 G2 M1 P D2 N2 S' | 58 | Hemavati | S R2 G2 M2 P D2 N2 S' |
23 | Gourimanohari | S R2 G2 M1 P D2 N3 S' | 59 | Dharmavati | S R2 G2 M2 P D2 N3 S' |
24 | Varunapriya | S R2 G2 M1 P D3 N3 S' | 60 | Neetimati | S R2 G2 M2 P D3 N3 S' |
5. Bana Chakra | 11. Rudra Chakra | ||||
25 | Mararanjani | S R2 G3 M1 P D1 N1 S' | 61 | Kantamani | S R2 G3 M2 P D1 N1 S' |
26 | Charukesi | S R2 G3 M1 P D1 N2 S' | 62 | Rishabhapriya | S R2 G3 M2 P D1 N2 S' |
27 | Sarasangi | S R2 G3 M1 P D1 N3 S' | 63 | Latangi | S R2 G3 M2 P D1 N3 S' |
28 | Harikambhoji | S R2 G3 M1 P D2 N2 S' | 64 | Vachaspati | S R2 G3 M2 P D2 N2 S' |
29 | Dheerasankarabharanam | S R2 G3 M1 P D2 N3 S' | 65 | Mechakalyani | S R2 G3 M2 P D2 N3 S' |
30 | Naganandini | S R2 G3 M1 P D3 N3 S' | 66 | Chitrambari | S R2 G3 M2 P D3 N3 S' |
6. Rutu Chakra | 12. Aditya Chakra | ||||
31 | Yagapriya | S R3 G3 M1 P D1 N1 S' | 67 | Sucharitra | S R3 G3 M2 P D1 N1 S' |
32 | Ragavardhini | S R3 G3 M1 P D1 N2 S' | 68 | Jyoti swarupini | S R3 G3 M2 P D1 N2 S' |
33 | Gangeyabhushani | S R3 G3 M1 P D1 N3 S' | 69 | Dhatuvardani | S R3 G3 M2 P D1 N3 S' |
34 | Vagadheeswari | S R3 G3 M1 P D2 N2 S' | 70 | Nasikabhushani | S R3 G3 M2 P D2 N2 S' |
35 | Shulini | S R3 G3 M1 P D2 N3 S' | 71 | Kosalam | S R3 G3 M2 P D2 N3 S' |
36 | Chalanata | S R3 G3 M1 P D3 N3 S' | 72 | Rasikapriya | S R3 G3 M2 P D3 N3 S' |
Comments
Post a Comment