Listing every possible Sanskrit metre meant enumerating every string of two symbols
In Sanskrit prosody a syllable is one of two things. It is light or it is heavy. Nothing else about it counts.
So a line of four syllables has sixteen possible shapes and a line of eight has two hundred and fifty-six, and a man whose job is to catalogue metres has to find a way of listing them all, in a fixed order, without missing any or writing any twice.
A metre is a string of two symbols. Put every such string in order and you have built binary counting, whether or not that was the plan.
The three procedures
The Chandahshastra gives rules for doing exactly that, and they are algorithms rather than observations.
The first lays out the whole table of patterns, generated systematically so that nothing is left out. The second answers the question: given a row number, what is the pattern in that row? The rule is to halve the number repeatedly, writing one mark when it divides evenly and another when it does not.
The third runs the other way: given a pattern, which row is it in? Read the marks, double and add.
Those two rules are conversion between a number and its binary expansion. They are written out as procedures a student can follow without understanding why they work, which is what an algorithm is.

8 Defining Chapters in the Vikram Sarabhai Biography
A mark for nothing
The halving procedure needs a way to record that a step produced no remainder, and the tradition supplies a mark for it. The word used in this literature for that mark is sunya, empty.
This is not yet zero as a number you can calculate with, which is a later achievement and belongs to Brahmagupta. It is zero as a thing you write down to hold a place in a procedure, which is where the story of the numeral begins.
The mountain arrangement
Pingala also wanted to know how many metres of a given length have exactly one heavy syllable, how many have two, and so on down the line.
The rule he gives builds a triangular array in which each entry is the sum of the two above it. His statement of it is compressed to the point of obscurity, as everything in the text is, and it is in the tenth-century commentary of Halayudha that the construction is spelled out and given the name meru-prastara, the arrangement like Mount Meru.
It is the array Europe calls Pascal’s triangle, and it turns up here because a prosodist wanted to count metres by weight.
The binomial coefficients enter the record as a tool for cataloguing poetry, which is not where anyone would look for them.
6 Unfoldings in the Subrahmanyan Chandrasekhar Biography
The other sequence
Then a different question. A light syllable takes one beat and a heavy one takes two, so if you classify metres by total duration rather than by number of syllables, you are asking how many ways there are to write a number as an ordered sum of ones and twos.
Work it out: one, two, three, five, eight, thirteen. Each number is the sum of the two before it. It is the sequence Europe knows from Fibonacci, who published in 1202.
Credit here needs care. Pingala’s text points at the problem; the recurrence is stated plainly by Virahanka around 700, and again by Hemachandra in about 1150, fifty years before Fibonacci. The honest version is that this is a chain of Indian prosodists rather than one man, and that the sequence was found by people counting poems.
The man and the book
Almost nothing is known about him. He is placed in the third or second century BC. Tradition calls him a younger brother of Panini, which appears late and is not evidence.
The Chandahshastra is eight short chapters of sutras, compressed for memorisation to the point where the mathematics is invisible without a commentary. Much of what is now attributed to Pingala was drawn out of him by commentators writing a thousand years later, and separating the two is a live scholarly problem.
What this is and is not
Leibniz set out binary arithmetic in 1703 and there is no suggestion he had ever heard of Pingala. Nobody handed anything down.
The interesting claim is a different one. Binary notation, the algorithms for converting into and out of it, the binomial coefficients and the Fibonacci recurrence were all reachable two thousand years earlier by a person with no interest whatsoever in mathematics, because the problem he did care about had the right shape.
He was not doing early computer science. He was cataloguing metres, and the metres turned out to be made of the same material.
7 Untold Stories of Battle of Asal Uttar 1965 Victory
If you think you have remembered everything about this topic take this QUIZ
Results
#1. What is the name of Pingala’s foundational text, which is considered the earliest known work on Sanskrit prosody?
#2. In Pingala’s binary system, which two linguistic elements were used to represent the different mathematical states?
#3. What is the ‘Meru Prastara,’ described by Pingala, known as in modern Western mathematics?
#4. Pingala used a specific concept to represent a functional part of his base-2 mathematical structure. What was it?
#5. Pingala’s work on mapping all possible rhythmic combinations in poetry provided the essential groundwork for which mathematical field?
#6. According to ancient tradition, Pingala is often believed to be the brother of which famous grammarian?
#7. What mathematical sequence, often credited to a 13th-century Italian, has its ‘seeds’ in Pingala’s work on syllables?
#8. How did Pingala record his complex mathematical and linguistic findings to ensure they were easily remembered?
Dr. A.P.J. Abdul Kalam: (1931-2015)
Is Pingala really the inventor of binary code?
Yes, his Chandaḥśāstra contains the first known description of a binary system, used to categorize the meters of Vedic poetry.
How did Pingala use “zero” in his math?
Pingala used the term Shunya specifically in his rules for converting binary combinations into decimal values, marking a critical step in the history of the number zero.
What is the link between Pingala and computer science?
Modern computers operate on binary logic (0 and 1). Pingala’s system of Laghu and Guru syllables is the earliest recorded instance of this two-state logical framework.
What is the Meru Prastara?
It is a triangular arrangement of numbers where each number is the sum of the two above it. Today it is known as Pascal’s Triangle, but Pingala described it centuries earlier.
Why is Pingala’s work considered “prosody”?
Prosody is the study of poetic rhythm. Pingala realized that rhythm is purely mathematical, and by studying it, he discovered deep laws of mathematics.
Read More: https://curiousindian.in/varahamihira-6th-century-ce/
Sources & References
Kim Plofker, Mathematics in India (Princeton University Press, 2009) — Pingala’s combinatorial rules and the place of prosody in Indian mathematics.
Chandahshastra of Pingala, with the Mritasanjivani commentary of Halayudha — the enumeration procedures and the meru-prastara.
R. Sridharan, “Sanskrit prosody, Pingala sutras and binary arithmetic” — the reading of the rules as conversion algorithms.
Parmanand Singh, “The so-called Fibonacci numbers in ancient and medieval India”, Historia Mathematica 12 (1985) — the attribution of the recurrence to Virahanka and Hemachandra.














