RANDOM MUSINGS

• •

SANSKRIT, PANINI, COMPUTERS, AND LOGIC

Rajiv Malhotra (The Battle for Sanskrit) describes the malicious attempts of Western and Indian academia to make Sanskrit language ‘Brahmanical’ and exploitative to Dalits, women, and even Muslims in its language structures. Sanskrit is now extraordinarily in the realm of ‘specialised’ studies (like Greek) considering its extensive use in the recitation of the Vedas and many rituals of Indian society. Such ideas, repeated by influential coteries, cause great damage to India’s culture, tradition, and ethos.  On the other hand, some like Vyaas Houston state Sanskrit as a ‘perfect language infinitely more sophisticated than any of our modern tongues.’


Panini, an ancient Sanskrit philologist and grammarian, likely lived in northwest India in around 500 BCE. Scholar Rens Bod at University of Amsterdam believes that the history of linguistics begins not with Plato or Aristotle, but with Panini’s grammar treatise- the Astadhyaya. This rule-based grammar of Sanskrit stands unrivalled until the modern period in its ability to describe a natural language by rules alone.  This treatise on grammar containing linguistics, phonetics, syntax, and semantics, in 4000 verses, is the foundational text of the Vyakarana (grammar) branch of the Vedanga, an auxiliary for Vedic studies. Patanjali’s commentary is the most famous of the written commentaries on Astadhyaya. The Astadhyaya was not the first description of Sanskrit grammar, but it is the earliest that has survived in full.


Panini’s work, setting the linguistic standards for Classical Sanskrit, distinguishes between common usage and the language of the sacred texts. It is generative as well as descriptive.  With its complex use of metarules, transformations, and recursions, the grammar in Ashtadhyayi is like the ‘Turing machine’, an idealized mathematical model that reduces the logical structure of any computing device to its essentials.


The text takes material from lexical lists (Dhatupatha, Ganapatha) as input and describes systemic algorithms for the generation of well-formed words. The concepts of the phoneme; the morpheme; and the root are integral to Panini’s grammar. The terse, perfect, unambiguous, and complete logical rules describing Sanskrit morphology have been extremely influential in ancient and modern linguistics. This morphological analysis was more advanced than any equivalent Western theory before the 20th century. 


European scholars discovered Panini in the 19th century and the latter’s work inspired a generation of modern linguists like Bopp, Saussure, Frits Staal, and others. Most have acknowledged the influence of Paninian grammar in their works on linguistics. Panini truly deserves the term of ‘the Father of Linguistics.’ Staal notes that the idea of formal rules in language – proposed by Ferdinand de Saussure in 1894 and developed by Noam Chomsky in 1957 – has clear and unambiguous origins in the formal rules of Paninian grammar. Staal says, ‘Panini is the Indian Euclid.’ The works of Panini also presage the modern field of semiotics- the study of signs and symbols for communications.


Panini’s system represents the world’s first formal universal grammatical and computing system much before the 19th century development of mathematical logic. Panini’s ‘auxiliary symbols’ technique to mark syntactic categories and control grammatical derivations, rediscovered by the logician Emil Post, became a foundation method in the design of computer programming languages.
Mary Boole, wife of George Boole (inventor of modern logic), in her essay ‘Indian Thought and Western Science in the Nineteenth Century, writes that Indian logic system was central to the development of machine theory. She claimed that George Everest (of the Mount Everest fame) was the intermediary of the Indian ideas influencing not only her husband but the other two leading scientists in the attempt to mechanize thought- Augustus de Morgan and Charles Babbage.  She further speculates that these ideas influenced the development of vector analysis and modern mathematics.

Much prior to this, Mohsin Fani’s Dabistani-i Madhahib (17th Century) claimed that Kallisthenes, who was in Alexander’s party, took logic texts from India. The beginning of the Greek tradition of logic was in this material.


John Backus and Peter Naur introduced the formal structure of computer programming languages during 1958-60.  Any book on programming languages has the notation BNF (Backus-Naur Form). T.R.N. Rao and Subhash Kak argue for changing this to Panini-Backus Form in the syntax of formal language systems by noting a correspondence by P.Z. Ingerman (1967): ‘…in order to describe the (rather complicated) rules of grammar, he (Panini) invented a notation which is equivalent in its power to that of Backus, and has many similar properties… Since it is traditional in professional circles to give credit where credit is due, and since there is clear evidence that Panini was the earlier independent inventor of the notation, may I suggest the name “Panini-Backus Form” as being a more desirable one?’


Saroja Bhate and Subhash Kak review the Paninian approach to Natural Language Processing (NLP) and compare it with the representation systems of Artificial Intelligence. They show that Paninian-style generative rules and metarules could assist in further advances in NLP. Many contemporary developments in formal logic, linguistics, and computer science are a rediscovery of the work of the ancient logicians and grammarians of India.


Computationally, grammars of natural language are as powerful as any computing machine. Subhash Kak shows in his works that several features of Panini’s grammar have direct parallels in computer science. Computer oriented studies on Astadhyayi would also help to introduce AI (artificial intelligence), logic, and cognitive science as complementary areas of study in the Sanskrit departments of universities. A graduate of Sanskrit could hope to make useful contributions to the computer software industry, natural language processing and artificial intelligence.


How did a perfect language with a perfect grammar become oppressive and exploitative? How did it become a dead language? Colonialism was responsible to a certain extent; it came in the way of their narratives of a primitive civilization needing the help of a benign white rule. Some English scholars did develop a deep respect for the language and the texts but their voices stayed buried under the dominant scholarship.


Unfortunately, independence should have been a breaking point. A clear Marxist agenda became the driving force of our educational narratives furthering the damage by looking at every social, political, and economic issue only in the framework of the exploiter and the exploited. Hence, further down the road of ‘cultural Marxism’, Sanskrit became Brahminical, patriarchal, oppressive, and so on.


Sanskrit is the oldest and the most refined language in the world. It is the mother of many Indian languages. It has a vibrant connection with all the vernacular languages, all equally great, having a considerable give and take. A great language like Tamil may have had an independent origin in the hoary past. But one cannot deny its rich interaction with Sanskrit.  


As a great device of evolution which makes humans what they are- at the top of the charts in the biological world, languages grow and multiply by interactions, adaptations, borrowings, and modifications. Language is language and there is no need to politicise it and create faultlines in our great Indian society. Western academics like Sheldon Pollock are using Sanskrit to divide us. Sanskrit belongs to all of us; it is a part of the great Indian cultural heritage whether we speak it or not, whether we use it or not.