Hacker News new | past | comments | ask | show | jobs | submit login
Ancient grammatical puzzle solved after 2,500 years (phys.org)
235 points by wglb on Dec 16, 2022 | hide | past | favorite | 69 comments



> Six months before Rajpopat made his discovery, his supervisor at Cambridge, Vincenzo Vergiani, Professor of Sanskrit, gave him some prescient advice: "If the solution is complicated, you are probably wrong."

> Rajpopat said, "I had a eureka moment in Cambridge. After 9 months trying to crack this problem, I was almost ready to quit, I was getting nowhere. So I closed the books for a month and just enjoyed the summer, swimming, cycling, cooking, praying and meditating. Then, begrudgingly I went back to work, and within minutes, as I turned the pages, these patterns starting emerging, and it all started to make sense. There was a lot more work to do but I'd found the biggest part of the puzzle."

> "Over the next few weeks I was so excited, I couldn't sleep and would spend hours in the library, including in the middle of the night to check what I'd found and solve related problems. That work took another two and half years."

I (and probably every programmer (or mathematician, physicist, carpenter, or problem solver) on the planet) have felt this effect first-hand. Incredible how well the brain can collate and sift through information if you just give it the space to do so.

A related effect, when I was a time where all I did was look at a screen all day, looking up new information, I couldn't solve problems nearly as fast. Looks like I wasn't allowing the incubation period in my mind to start and continue unabated.


Is there a specific term for this subconscious phenomenon?

I believe I have experienced this multiple times, but I remember one event in particular when I couldn't solve a book exercise for several hours, I slept in frustration. When I woke up I knew the answer immediately as if it was obvious.


“Sleeping on it” probably gives the brain time for “spreading activation“, which is a model that describes how relationships between concepts are explored and formed.

https://link.springer.com/article/10.3758/s13421-012-0256-7

https://www.sciencedirect.com/topics/computer-science/spread...


> I slept in frustration

Human brain runs a defrag process (quite literally) when the body sleeps. Not only this removes the cruft from the day but also rearranges and makes links for the knowledge gathered through the day.


Is glymphatic cleaning related to knowledge retention?


It's more like they go hand in hand. I wouldn't say what it depends on it, but without it it would much harder to retain and structure new information. It is commonly observed in a long hours jobs and tests what after some time the new info just doesn't get processed properly.


Or when I am trying to memorize a speech. I don't have it memorized when I go to bed, and I have it memorized when I wake up.


Perhaps the Eureka effect (https://en.wikipedia.org/wiki/Eureka_effect)?


Rich Hickey has a nice name for it - https://www.youtube.com/watch?v=f84n5oFoZBc


Having written a few papers using a similar effect. While I may thoroughly research when fully awake, I would wait until exhausted to write observations. Falling asleep while writing, I would continue to write in my sleep. You can see in my notes the moment I fell asleep as my handwriting style would change and still be legible. When I'd wake up, I wouldn't remember everything I had thought about but it'd still be in my sleep notes.


In general, for complicated items, I prefer to code at one place and think at another place. They seems to require different parts of your brain, and have different 'comfortable spots'.


When I'm stuck I go on a long walk in the forest where I live. It really helps clear my mind and relieve stress.


One of my HS math teachers would regularly change seating arrangements based on the idea that it helps thinking and problem solving.


The book “Why We Sleep” discusses this. I believe it was Thomas Edison (I could be wrong) would fall asleep with a pan next to his chair, his hand over the pan, and his hand full of marbles. When he’d fall asleep, his muscles would relax and he’d drop the marbles, waking him up. He used it to harvest ideas.


> I (and probably every programmer (or mathematician, physicist, carpenter, or problem solver) on the planet) have felt this effect first-hand. Incredible how well the brain can collate and sift through information if you just give it the space to do so.

This is so. much. true. Curiously, it's very well known and yet ignored most of the time, for some reason.

For simpler problems, a night sleep can be enough. Just tell your brain to work on it before you go to sleep and the solution will be ready for you by breakfast, like magic.

Or sometimes, a walk in the park.

"Give your brain some space" should be taught in every school and yet many times we tell kids the opposite.


He just gave the brain the time to digest what he had already learned. And then, the Eureka moment appeared.


Something glossed over by articles like this that discuss "Sanskrit" as a singular language is that prior to Panini, the spoken Vedic Sanskrit language was far less codified and rules-based, and replete with swashbuckling irregular grammatical and phonetic forms that were in free variation, and often used for rhythmic or poetic effect, just as in living spoken languages today. It was a campfire language, not a scholarly one, and far more complex and disorderly than what would follow it.

Then Panini came along and analyzed the language in a way never before done (perhaps in any language), and in doing so also forced the language into a rigid system of derivational rules from which it never emerged again. In the process, a great number of irregular forms and usages were expunged from the language, and the subjunctive and injunctive moods [1] ceased to exist entirely. Many words that once had a variety of pronunciations got standardized to "thematic" forms. Thus the language came to be known as "samskrta", which literally means "well-done" or "perfected".

He probably did this because he was trying to preserve the language of the scriptures for scholars because the common-speak that people used in their day to day lives even in 500BC was already changing rapidly enough for him to notice. By constraining the language he ended up preserving it in a way that it could be studied methodically for thousands of years, albeit in a grammatically sterilized form compared to what it was.

1. https://web.stanford.edu/~kiparsky/Papers/injunctive.article...


Was this the reason for slow death of Sanskrit as a living language? Too codified and "pure"?

Hindi thrives precisely because its very happy to borrow words from anywhere and everywhere.


> Was this the reason for slow death of Sanskrit as a living language?

To use a software analogy, liturgical languages like Classical Sanskrit (and Latin and Greek, etc) got "forked" from their messy spoken source language and then "refactored".

I don't think that their formalization necessarily caused their death as spoken languages any more than the natural processes by which spoken languages change over time.

Some of those processes are internal to the language, and some are caused by the influence of other languages in the region (i.e. Dravidian for Sanskrit, Etruscan for Latin, and Minoan for Greek).

> Too codified and "pure"?

I'd say that since learning it came to require studying it (since it stopped being learned "naturally" as a primary language), it just wasn't accessible to most people. Broad accessibility was after all a non-goal of the codified language.

And while it was codified grammatically, it was certainly not "pure" from that point on. Even after its grammatical codification, Classical Sanskrit admitted a lot of lexical influence from other languages, which allowed it to become the lingua franca of scholarship, statecraft, and literature (not just religion as we tend to think today) across the Subcontinent.

In that sense, it was very much "alive", but maybe wasn't used for things like buying milk at the market.


Hindi is relatively new - Its changed a lot since teh start.

I doubt that most Hindi speakers today would easily grok the dialect spoken during the Delhi Sultanate

Sanskrit remains understandable after 4000 years


Wasn't Hindi's origin an intentional purge of Persian influences from Urdu?


The modern official languages Hindi and Urdu are both the result of the politically motivated purging of their respectively "undesired" elements from the language Sprachbund known as Hindustani.


What fascinating is that you have the famed muni-traya, Panini, Katyayan, and Patanjali. How could this be unadressed and unsolved by even Katyayan and Patanjali, and unaddressed in the Kasika, yet it took 2500 years later for a Cambridge phd candidate to crack it. If this is really the case, the man deserves much more than a PhD.

Furthermore Panini is predated by Yaskacharya and cites his famous Nirukta, which is still available today. Panini also cites other ancient grammars in his work. So the history goes back even further. It is remarkable that such fundamental discoveries are being made so many years later.


Shameless plug for my talk on the influence of the classical Indian tradition on Western Linguistics & Natural Language Processing:

https://www.youtube.com/watch?v=NPl17qiaARM


Thanks, that’s a really informative talk.

Out of curiosity, how does this new understanding of his texts affect your own research and talk?


Thanks! I'm still working through Rajpopat's thesis, but at a high level, it doesn't particularly "revolutionize" our understanding of the Astadhyayi. It's just further proof of Panini's ingenuity and the consistency & completeness of perhaps the only exhaustive symbolic/computational account of a natural language. Makes me even prouder to consider myself part of this millennia-old linguistic tradition.


>Rajpopat said, "Computer scientists working on natural language processing gave up on rule-based approaches over 50 years ago... So teaching computers how to combine the speaker's intention with Pāṇini's rule-based grammar to produce human speech would be a major milestone in the history of human interaction with machines, as well as in India's intellectual history."

So... a 2500 year algorithm would be running on a modern machine. Very cool indeed. What I am not sure they meant by teaching it to produce human speech. Is it like an automata diagram that defines the rules for Sanskrit language?


Panini's grammar describes Sanskrit syntax and morphology, and it's structured much like a typical parser generator grammar, except written in a heavily abbreviated form of Sanskrit instead of a programming language. In fact it's the first formal grammar in recorded history of any language, and western linguists studying it is arguably is the reason we have the concept of a formal grammar. https://en.wikipedia.org/wiki/A%E1%B9%A3%E1%B9%AD%C4%81dhy%C...


> "If the solution is complicated, you are probably wrong."

True in so many situations, Vincenzo.


The key to performance is elegance, not battalions of special cases.

--Jon Bentley and Doug McIlroy


[flagged]


The statements "If it's complicated, it's probably wrong." and "Sometimes, problems have a complicated solution." are compatible with each other. In fact they're saying the same thing.


If a problem has a complicated solution, it is a complicated problem to begin with.

In this case, we have a much stronger guarantee of simplicity than, for example, with mathematical problems that are easy to explain but might lead into unexplored territory: a missing piece in Panini's treatise is something that he definitely figured out in his time, so it is well within the reach of today's linguists.


As an Indian, Rajpopat’s this comment struck a chord -

> Some of the most ancient wisdom of India has been produced in Sanskrit and we still don't fully understand what our ancestors achieved. We've often been led to believe that we're not important, that we haven't brought enough to the table. I hope this discovery will infuse students in India with confidence, pride, and hope that they too can achieve great things.

I can definitely attest to wondering why a country so old hasn’t added much to human scientific advancement. Maybe the knowledge is locked away behind hard to penetrate language.


Hasn’t added much? India used to be a hotbed for science , especially numerical and mechanical science in the old pre-industrial age.

https://www.indiatimes.com/technology/11-ancient-inventions-...

https://en.wikipedia.org/wiki/List_of_Indian_inventions_and_...

Even in the modern era, the country has done tons of important research especially in medical fields.

This is also disregarding the work of Indians who did a ton of amazing research outside India.

But otherwise, if your question is why they haven’t contributed as much in a relative sense versus western countries, maybe you’ve forgotten, but India has been subjugated for many centuries, under various rules. The Mughals, the British, the Dutch, etc…

It’s one of the youngest countries today if you count from when it gained freedom. It took many decades for it to be financially stable and regain much of the infrastructure needed to compete with the west.

So as an Indian myself, I’d urge you to put your countries history in context instead of putting it to some ancient texts locking it away.


If you were living in India in, say, 1250 CE, you might have looked at present day Greece or Italy or Germany and wondered the same.

History is very long. Human memory very short. Civilizations have their crests and their troughs. What's up today might be down tomorrow


As I understand it, this rule allows one to have an unambiguous parse of a sanskrit sentence into its constituent parts (it feels a bit like "the longest prefix match" rule used in packet forwarding!). My question is, did Pāṇini not specify this rule in his 3959 sūtras or was it somehow missed?

[Edit: covered in Rajpopat's thesis...]


It was not missed, just allegedly misinterpreted.

The rules are not fully elaborated, we just have mnemonics similar to how children are taught trigonometric identities.


Also discussed here: "PhD student solves 2,500-year-old Sanskrit problem"

https://news.ycombinator.com/item?id=33997962 (116 points | 15 hours ago | 42 comments)


An Indian PhD student at Cambridge University, who was studying Sanskrit under his Italian (Naples born) professor of Sanskrit...has cracked a 2500yr linguistic Sanskrit algorithm to generate sentences.

I would call this the GPT-3 moment for Sanskrit. ;)


The algorithm was made 2500 years ago, but was it already a problem/puzzle back then? Were scholars already immediately misinterpreting it? I mean, at least the person who wrote it understood it correctly I assume?

Also I'm not sure if I'm understanding everything correctly about the Sanskrit language: does this algorithm define the Sanskrit language, or was this algorithm made to try to describe the Sanskrit language? Usually languages have way too many exceptions to be distilled into simple rules, how was this possible here? It's not a spoken language?


No the scholars did not start immediately misinterpreting it. For example, rishi katyayana who came after rishi panini in his commentarty correctly understands the rule but somehow later scholars started misinterpreting it and it carried to this day until rishi rajpopat went back to the original source and deciphered it correctly (such a funny coincidence his first name is rishi lol)

I am not sure I understand your question. Ashtadhyayi was written by rishi panini to probably codify the already spoken sanskrit language under the umbrella of his 4000 rules. Probably he was frustrated by seeing different people speaking the language in different ways so I guess he and the 10 other rishis predating him that he credits in his book started this exercise.


We should call this “language machine” the Pāṇini Press.


This was a fantastic read. Hadn't heard of this puzzle and intend to read more about it now. Authors did a nice job of keeping it simple so I could get it as a newbie. Congrats to the researcher!


> Rajpopat rejects this [later rule precedence], arguing instead that Pāṇini meant that between rules applicable to the left and right sides of a word respectively, Pāṇini wanted us to choose the rule applicable to the right side. Employing this interpretation, Rajpopat found Pāṇini's language machine produced grammatically correct words with almost no exceptions

I feel like if this had been in the hands of CS people, it would have been figured out by 1965.


Consider that CS was learning from Chomsky in 1965.


Wish Umberto Eco were still with us to write a witty essay about this (and/or a mystery novel about a wild conspiracy spawned by this a la Foucault's Pendulum)


Thank for posting this! I love this sort of content.


Can someone attempt to ELI5/provide more context for why "always choose the right" eluded scholars for so long?


Seems modern scholars apply this rule (1.4.2) in a much narrower scope. The researcher argues that 1.4.2 is actually a metarule that applies to all of Aṣtādhyāyī. Covered near the end of the 1st chapter in his thesis.


The scholars did not start immediately misinterpreting it. For example, rishi katyayana who came after rishi panini in his commentarty correctly understands the rule but somehow later scholars started misinterpreting it and it carried to this day until rishi rajpopat went back to the original source and deciphered it correctly (such a funny coincidence his first name is rishi lol)


My guess is he said "always choose the latter" so they thought he meant the latter rule to apply rather than the latter morpheme to apply a rule.


Pāṇini was probably the only man I would say was comparable to Einstein in intelligence.


I can't imagine by what path you make that assessment, but...

Any discussion of outliers in intelligence that mentions Einstein but not Newton is simply missing a difference of several standard deviations.


Physics wasn't even Newton's main work, he did it on the side while his true passion was in alchemy. He just so happened discover color and light theory along the way, while also writing philosophical letters to Locke and Leibniz.


Yeah.

It is not obvious to me that, across the total number of human minds produced so far, an outlier like Newton has any reasonable probability of existing.


Well there are a lot of polymaths though, Newton really is not that special. von Neumann, Feynman, Ben Franklin, Steve Jobs etc come to mind.


Jobs does not deserve any mention among those other people. Jobs was a leader (tyrant by many accounts) and didn’t advance or discover anything?


Yeah perhaps not, he wasn't a polymath. I'd say Elon is closer as a polymath than Jobs since at least the former actually learned about rocket and electric vehicle physics and engineering.


Erdős, Feynman?


Jobs? What the hell?


... and when you throw in the fact that Panini formulated his grammar was formulated at a time when there was no written form of Sanskrit ... it truly baffles me. So reliant on tools I am.

Some authors have suggested that he likely used his students minds as "scratch pad" to hold temporary ideas expressed as succinct verses.


[flagged]


Almost all of the theorems in principa mathematica were known results by Newton's time. He synthesized it into a subject and found applications to physics.


Pāṇini was standing on the shoulders of the prior researchers/giants; same thing applies to Einstein or any future gaint.


This is super fascinating. I have a BS in linguistics and I never heard of this puzzle (though, admittedly, my interests were ancient afroasiatic languages rather than indo-aryan).


Of course you want to apply right handed rules with.more priority because that's where casing/suffixes/conjugation happens in indo-european languages.

Makes me wonder whether e.g. Hindu has grammatical cases/righ inflection.


1. Why is this on phys.org

2. Why is the writing so dramatic


This was written by Cambridge and published on their website. It was republished by phys.org which aggregates science, research, and tech news.

It might be better if the link was changed to the original article on Cambridge’s website: https://www.cam.ac.uk/stories/solving-grammars-greatest-puzz...


Otoh, that site was a much bigger pain to use on my phone. (Obviously we try not to complain about that kind of thing too much, but I think it's relevant to the question of changing the link on a post)


Thank you so much for posting a link to the original article!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: