A 2,500-Year-Old Puzzle from Ancient India Has Finally Been Solved

An ancient text has stumped researchers for thousands of years—and now, someone has cracked it.
A 2,500-Year-Old Puzzle from Ancient India Has Finally Been Solved
Screengrabs: YouTube/Cambridge University
ABSTRACT breaks down mind-bending scientific research, future tech, new discoveries, and major breakthroughs.

A grammatical puzzle that remained unsolved for 2,500 years has at last been cracked by a researcher whose elegant solution hinges on the interpretation of a single Sanskrit word, according to a new report. 

The breakthrough has unlocked the revolutionary “language machine”—an early version of what we call an algorithm today—developed by the ancient Indian genius Pāṇini, and has opened up the possibility of adapting his influential work into software.


Rishi Rajpopat, a Sanskrit researcher who made the discovery, told Motherboard he was “elated” when he solved the riddle during his PhD at the University of Cambridge. His PhD thesis was published on Wednesday, along with a statement announcing the news.

“I felt relevant, historically, because suddenly I had found the meaning of something that was written 2,500 years ago, and that everyone else between me and Pāṇini had misinterpreted,” said Rajpopat, who is now an academic editor at the University of St Andrews, in a call. “It felt amazing, and beyond words, honestly. I was so happy, but I was also really grateful.” 

Rajpopat’s thesis lays out his solution to an intractable problem embedded in Pāṇini’s masterpiece, the Aṣṭādhyāyī, which is a dizzying grammatical guide to Sanskrit, one of the most influential languages in history. 

In this text, Pāṇini devised a system that could generate grammatically correct Sanskrit words and phrases from their component parts, such as base words and suffixes. Pāṇini constrained this algorithm with 4,000 grammatical rules about the underlying mechanics of Sanskrit. The systematic nature of the Aṣṭādhyāyī is similar to the approach used in modern programming languages, which is why some experts have called it an unprecedented “language machine.”


“I think he was trying to achieve an intellectual feat,” Rajpopat said of Pāṇini. “It is no easy job, as you can probably imagine, to incorporate a grammar into a mechanical system, or into a machine.”

“His goal was to help us understand, visualize, and imagine the structure of Sanskrit, which was the subject language for his grammar” as well as “perhaps the structure of human language in general,” he continued. “In breaking it down and then stitching it back together, Pāṇini shows us how remarkably simple language is if you truly understand and appreciate its structure.”

While the Aṣṭādhyāyī is a remarkable achievement, scholars have struggled for centuries to resolve conflicts that arise when two of Pāṇini’s rules contradict each other. In other words, if two rules produce different words or phrases, which of those outputs should be deemed the grammatically correct version? The below video includes helpful visualizations of these concepts:

Pāṇini anticipated this issue and included a metarule in his work labeled “1.4.2” that reads: “vipratiṣedhe paraṁ kāryam.” The central word “paraṁ” roughly means “that which comes after,” according to Rajpopat. As a result, this guideline has long been interpreted to suggest that when rules conflict, the rule that comes later in the serial order recorded in Aṣṭādhyāyī should have precedence. 

However, this view often produces grammatically incorrect outcomes, a problem that has vexed researchers across a vast swath of time. At the University of Cambridge, Rajpopat joined the long and storied line of scholars that have been both fascinated with, and frustrated by, the puzzle at the core of Aṣṭādhyāyī. Initially, much like his predecessors, Rajpopat kept hitting dead-ends.


“I was doing derivations upon derivations,” he recalled. “I built up so many notebooks. I was looking for a pattern. That's what I was after.”

As the defeats mounted, Rajpopat decided to take a month-long summer break, with the hope that his work would benefit from fresh eyes. Lo and behold, as he returned to his tower of notebooks, he realized the answer had been hiding in plain sight.

In his thesis, Rajpopat argued that the rule labeled 1.4.2 has been misread for generations due to confusion over the interpretation of the word “paraṁ.” He believes that the word offers a lateral description of a word or phrase that is read left to right; therefore, the “one that comes after” refers to the word on the right. 

In this much simpler framework, rule conflicts should favor whatever rule applies to the word on the right, as opposed to the rule that occurs later in the broader order of the Aṣṭādhyāyī. To Rajpopat’s delight, this solution almost always produces grammatically correct Sanskrit phrases, suggesting that this may have been Pāṇini’s original intention with rule 1.4.2. 

The arrival of a satisfying answer to this longstanding enigma is cause for celebration on its own merits, but the new research can also be used to better understand the evolution and structure of Sanskrit. What’s more, with this update in hand, Pāṇini’s famous language machine could be translated into programming software that could generate millions of grammatically correct Sanskrit phrases. 

For Rajpopat, who is a devout Hindu, the milestone is not only the culmination of his research and a foundation for future work, it is a gift from God.

“I think that God has blessed me because he chose me to share this piece of information,” he concluded.