KaTaPaYaDi - World’s Oldest Hashing Algorithm

This is the world’s most ancient Hashing Algorithm known and as usual has its origin in India.
This is used in lot of ancient sanskrit texts as a hashing technique. Even the Melakartha system of naming ragas in the ancient Indians carnatic music system uses this algorithm!

Here I present the KaTaPaYaDi system.
Each consonant of an Indian language is assigned a number in this Katapayadi system as follows:

क(Ka)=1 ख(Ka)=2 ग(Ga)=3 घ(Ga)=4 ज़(Gnya)=5 च(Cha)=6 छ(Cha)=7 ज(Ja)=8 झ(Ja)=9 अ(Nya)=0
ट(Ta)=1 ठ(Ta)=2 ड(Da)=3 ढ(Da)=4 ण(Na)=5 त(Tha)=6 थ(Tha)=7 द(Dha)=8 ध(Dha)=9 न(Na)=0
प(Pa) =1 फ(Pha)=2 ब(Ba)=3 भ(Bha)=4 म(Ma)=5
य(Ya)=1 र(Ra)=2 ल(La)=3 व(Va)=4 श(Sha)=5 ़़ष(Sha)=6 स(Sa)=7 ह(Ha)=8 ळ(La)=9

Now you can see why this system is called Katapayadi. Ka=Ta=Pa=Ya=1

Suppose we want to hash the word ‘Gurudeva’
The hashing number based on Katapayadi system would be then as follows for ‘Gurudev’

Gu=Ga(is the consonant)=3
Ru=Ra(is the consonant)=2
De=Da(is the consonant)=8
Va=Va(is the consonant)=4

So Gurudeva = 4823

Note the Indian hashes are reversed numbers (from right to left, which is why we reversed it in Step 2 to get the original word) unlike the western hashes which are from left to right! Which is why we have written 4823 and Not 3284. This is natural because this is how we invented the place value system too. from right to left as units, tens, hundreds etc..

Western world failed to understand the basics of Indian mathematics when they learnt it from us, which is why vedic mathematics is faster than western math! Western world started developing generic formulae for calculations while Indian math has specific formulae depending on the type of calculations. So learning Indian math (vedic math) is difficult than western math, but solving problems using Indian math is more easier than using western math (in fact you dont need a pen and paper to solve most problems which is why vedic mathematics is also called mental mathematics!)

4 Responses to “KaTaPaYaDi - World’s Oldest Hashing Algorithm”

  1. Srinivasa Says:

    Nice article.

    katapayadi is not Vedic. But it would be interesting to know how old this system really is.

    btw, this system is also known by the name ‘paralpperu’ in Kerala. Please see http://www.namboothiri.com/articles/katapayaadi.htm

  2. hitxp Says:

    Yes sir, it is not vedic. The first documented reference for this system is available in the works of Aryabhatta where he used this system to represent numbers.

  3. Art of Celebrating Life! - by Gurudev World’s oldest Combinatoric Formula « Says:

    [...] or sentences or proverbs or riddles etc, but when you decrypt them into numbers you end up with a hashing algorithm, or the value of PI to infinite decimal places, or with a logarithm etc, or with a formula [...]

  4. Parveen Says:

    Does this 4823 represent anything or what?
    Thanks

Leave a Reply