Panini — world’s first informatician

The ancient grammarian used language to decode information

December 19, 2019 04:06 pm | Updated December 20, 2019 09:10 am IST

Dr. Amba Kulkarni, Head of the Department of Sanskrit Studies, University of Hyderabad, is a gold medallist in mathematics, M.Tech in Computer Science and Engineering, Ph.D. in Applied Linguistics and an M.A. in Sanskrit. Her lecture for K.V. Sarma Research Foundation was on ‘Informatics in Panini’s Ashtadhyayi.’ Excerpts:

Ashtadhyayi is admired for its simplicity and its rigorous and consistent use of meta language. Sutras are like mathematical formulae. So, a lot of information can be given using a few words. And since Panini uses sutras, the Ashtadhyayi is crisp. Panini also lays down rules to resolve conflicts between sutras. Ashtadhyayi is augmented with ancillary texts such as Sivasutras (special order of phonemes); dhatupatha (list of verbal roots); ganapatha (various sets of nouns) and linganusaasana (system for deciding the gender).

Regarding the Siva Sutras, Panini needed 41 subsets of the Sanskrit alphabet, to describe various operations. Some of these subsets are all vowels; some are all consonants; some are vowels, semi-vowels and nasals and so on. Kulkarni gave an analogy to illustrate the need for the kind of organisation Panini resorted to. Suppose you are organising an event, and you have 41 committees of volunteers, and 41 volunteers too. Some committees may include all 41 volunteers. Others may have fewer. The same person may be a member of more than one committee. Thus, these committees, if treated as sets, are partially ordered. To remember who goes where is not easy.

Dr. Amba Kulkarni

Dr. Amba Kulkarni


Faced with such a challenge in the linguistic arena, Panini came up with a linear arrangement of these partially ordered sets, in the form of 14 Siva sutras, with markers serving as boundaries of the sets. Cardona, Staal and Kiparsky analysed Panini’s arrangement on historical, linguistic and logical grounds, respectively. Weibke Petersen gave a mathematical proof to show that Panini’s solution is optimal. Panini uses only 55 bytes, through this scheme, without which he would have needed upwards of 1600 bytes, if the sets and their members were represented in the form of a matrix. Further, Panini provided a method of naming various slices by an acronym with two letters, the first letter being the first phoneme in the slice and the last being the marker.

To achieve brevity, Panini used many techniques, one of which is anuvrtti. This is like factorisation in mathematics, where a term common to two product terms is factored out, thereby simplifying the expression. We notice this in languages also. If there are two sentences — John went home. John then ate fruits. We can combine the two and say, ‘John went home and ate fruits.’ This is a feature of natural language, and Panini used this to keep his grammar concise.

Consider the following sutras:

upadese ac anunaasika it (1.3.2)

halantyam (1.3.3)

The first sutra says: “in the strings taught by Panini (upadese), the nasalised (anunaasika) vowel (ac) is termed ‘it.’” The next sutra says, “the consonant hal in the end (antyam).” Now borrow the words ‘upadese’ and ‘it’ from the previous sutra. Then sutra 1.3.3 can be read thus: “in the strings taught by Panini, the consonant ‘hal’ at the end of a string is termed ‘it.’” The process of borrowing from previous sutras is called anuvrtti. In some cases, borrowings continue for hundreds of sutras.

The following sutras define the “it” marker:

upadese ac anunaasika it (1.3.2.)

hal antyam (1.3.3.)

na vibhaktau tusmaah (1.3.4)

Adih nitudavaah (1.3.5)

Sah pratyayasya (1.3.6)

cutU (1.3.7)

lashaku ataddhite (1.3.8.)

In these sutras, ‘upadese’ and ‘it’ are explicitly mentioned only in the first sutra, and are borrowed for all the others up to 1.3.8. ‘Adi’ is borrowed from 1.3.5 and is used till 1.3.8. Pratyayasya is borrowed from 1.3.6 and is used till 1.3.8. So, with these borrowings, this is how the sutras read:

upadese ac anunaasika it

upadese halantyam it

upadese halantyam na vibhaktau tusmaah it

upadese Adih nitudavaah it

upadese pratyayasya Adih Sah it

upadese pratyayasya Adih cutu it

upadese ataddhite pratyayasya Adih laSaku it

The total number of words in Ashtadhyayi is 7,000. The Total number of words after repeating the words with anuvrtti is 40,000. Panini needed only approximately one-sixth of the words that would have been required without anuvrtti. He achieved compression by a factor of 3 in terms of byte size, making memorisation easy.

Using just three Paninian sutras, Kulkarni explained how one could understand information dynamics in a language, and thus confirmed that Panini had information coding in mind. It is not surprising therefore, that Gerard Huet, who led the teams which developed programming language CAML and Coq Proof Assistant System, said that Panini was the “first informatician in the world 24 centuries before computers came into existence.”

Top News Today

Sign in to unlock member-only benefits!
  • Access 10 free stories every month
  • Save stories to read later
  • Access to comment on every story
  • Sign-up/manage your newsletter subscriptions with a single click
  • Get notified by email for early access to discounts & offers on our products
Sign in


Comments have to be in English, and in full sentences. They cannot be abusive or personal. Please abide by our community guidelines for posting your comments.

We have migrated to a new commenting platform. If you are already a registered user of The Hindu and logged in, you may continue to engage with our articles. If you do not have an account please register and login to post comments. Users can access their older comments by logging into their accounts on Vuukle.