Kaṭapayādi Saṅkhyā

What is the Kaṭapayādi system?

The kaṭapayādi (कटपयादि) system of encoding numbers as words by substituting each digit by a character was developed in ancient India. Each of the , , , characters are assigned the number 1. The successive characters are assigned the numbers 2, and so on, thus giving rise to the name कटपयादि. Multiple characters can be mapped to the same number, however there is only one number for each character. Thus, the system allows a number to be represented in multiple ways. A nice word or a phrase is generally chosen such that it is easier to remember.

Where is the Kaṭapayādi system used?

The system has been traditionally used to encode values of important numbers. A famous example of this is

भद्राम्बुद्धिसिद्धजन्मगणितश्रद्धा स्म यद् भूपगी:

~ सद्रत्नमाला (शङ्करवर्मणः)

In the kaṭapayādi system, this evaluates to 314159265358979324, denoting the value of π (Pi) upto 17 decimals.
A modern use of this system can be for remembering numbers in daily use, such as phone numbers, card details, birth dates, etc.

How to calculate the numerical value of some text in the Kaṭapayādi system?

Verse from sadratnamālā (सद्रत्नमाला), given on the front page, describes the method to be followed.

  • Consonants are assigned values as given in the table below.
  • Vowels, such as अ, आ, इ, .. etc., are assigned the value 0.
  • In a joint letter, only the last consonant, the one that appears with a vowel, is to be considered.
  • Consonants without a vowel (हलन्त) are to be ignored.
  • A general rule is - "अङ्कानाम् ‌वामतो गतिः", that is, numbers go from right to left.
1 2 3 4 5 6 7 8 9 0
- - - - -
-

You can read more about the Kaṭapayādi system on Wikipedia.
The Decode tab will let you calculate the Kaṭapayādi number for any Devanagari text.

How to find a Kaṭapayādi encoding for a number?

There is no definite answer to this question. There can be multiple encodings for a same number and multiple ways of obtaining it. For each number, possible set of letters is fixed. A naive way can be to choose a random consonant from this set for each number, combine it with a random vowel and put them in a proper order. This, while generating a correct encoding, will often provide meaningless sequences, remembering which is not going to be any easier.

How do we find a Kaṭapayādi encoding for a number?

We follow a data drive approach. We have built an inverted index of numbers to possible-words from various Sanskrit texts. Given a number, we evaluate its partitions. The inverted-index is queried to find possible words or phrases for each partition. A random word or phrase from the possible options is chosen and these words or phrases are combined in an appropriate manner. Although the sentence as a whole might not make sense, at least it will be a collection of valid words since the words come from existing Sanskrit texts. We are working on making the sentences meaningful.

A maximum of 10 results are shown. You can re-submit to explore other possible options. You can select corpora from which the words should be chosen to produce the encoding. Not selecting any corpus would make the system search in all available corpora. You can use + for deselecting or selecting multiple options.

The Encode tab will show you some of the possible Kaṭapayādi encodings for a given number.

What is the Upload tab for?

You can also use a different corpus than what we have in our collection. The Upload tab will let you upload a Devanagari corpus of your choice. After uploading a corpus, it will be processed to enhance our inverted-index. Once processed, it will be availble for selection in the Encode tab.