Chhandas — Sanskrit prosody and binary mathematics
The fourth Vedanga. Chhandasmeans “that which covers, conceals, protects” — the metres cover the Vedic meaning in beautiful form and protect the mantra from corruption (a missing syllable breaks the metre and is immediately detected). Pingala’s Chhandahshastra(~3rd c BCE) is the foundational text. It catalogues guru (long) and laghu (short) syllable patterns, the eight ganas (tri-syllabic feet), and — most remarkably — introduces binary arithmetic and the meru-prastara triangle (identical to Pascal’s Triangle, which Pascal “discovered” in 1654 — Pingala had it 1,900 years earlier).
Pingala and the Chhandahshastra
Pingala (~3rd c BCE) — possibly the younger brother of Panini in some traditions — composed the Chhandahshastra(also called Chhandasutra) in 8 chapters totalling 310 sutras. The text catalogues every Vedic and classical metre, defines the marking of guru/laghu, names the 8 ganas, and presents six sub-disciplines for analysing any verse.
Halayudha’s 10th-c CE commentary Mritasanjivani(“the reviver of the dead”) is the standard companion to Pingala. It is from Halayudha that we have the full elaboration of Pingala’s six pratyayas (procedures): prastara (enumeration of patterns), nashta (find pattern from index), uddishta (find index from pattern), eka-dvi-laghu-kriya (count of binary digits), sankhya (total count), and adhvayoga (sum-of-arrangements).
Pingala writes the binary digits as laghu (˘, weight 1) and guru (—, weight 2). His sutra 8.23 — “dvikau glau” — states explicitly the binary doubling rule. Sutras 8.24-8.32 develop the algorithms for enumeration that are now recognised as the first formal treatment of binary arithmetic in history.
The major Vedic metres
The Vedic Samhitas use 7 principal metres (named by syllable count). Pingala enumerates 26 in total but the seven below account for ~99% of Vedic verses.
№1
Gayatri · गायत्री
24 syllables
3 padas × 8 syllables each
Most famous of all Vedic metres. The Gayatri mantra (RV 3.62.10 — "tat savitur varenyam…") is its archetypal use. Symbolises Vak (speech-goddess). Said to "save" (gayantam trayate) the one who chants it.
Less common than Gayatri. Used in several Rig Vedic hymns to Agni (RV 1.8) and Indra. Considered a transitional metre between Gayatri and Anushtubh.
№3
Anushtubh · अनुष्टुभ्
32 syllables
4 padas × 8 syllables each
The metre of the Bhagavad Gita and Mahabharata. Also the primary shloka metre of classical Sanskrit. Most flexible — only the 5th, 6th, 7th syllables of each pada have strict rules.
Vedic metre, common in Atharva Veda. The name means "great, expanded". Less common in classical poetry.
№5
Pankti · पङ्क्ति
40 syllables
5 padas × 8 syllables each
Vedic metre. The name refers to the "row of five" — five 8-syllable padas in a verse. Less frequent.
№6
Tristubh · त्रिष्टुभ्
44 syllables
4 padas × 11 syllables each
Most common metre in the Rig Veda — about 40% of all Rig Vedic verses are in Tristubh. Heroic, formal tone. Common in hymns to Indra.
agním īḷe puróhitaṃ | yajñásya devám r̥tvíjam (RV 1.1.1 — first verse of the Rig Veda, in Tristubh).
№7
Jagati · जगती
48 syllables
4 padas × 12 syllables each
Frequent in the Rig Veda after Tristubh. Long, sustained tone — well-suited to cosmic or descriptive hymns. The Purusha Sukta (RV 10.90) uses Jagati for some of its verses.
The 8 ganas (tri-syllabic feet)
To describe any classical metre concisely, Pingala uses 8 named tri-syllabic units called ganas. Each gana is one of the 2³ = 8 possible combinations of guru (G) and laghu (L). The mnemonic “yamātārājabhānasalagāḥ” encodes all 8 patterns: each successive triplet within this string is a gana.
Gana
Pattern (L=˘ short, G=— long)
Mnemonic syllables
Source in yamatarajabhanasalaga
ya
L G G
la-tā-rā (—˘˘ no, ˘——)
Yamatārājabhānasalagāḥ — Yaśasāmkara
ma
G G G
mā-tā-rā (———)
Three gurus together
ta
G G L
tā-rā-ja (——˘)
Two gurus + laghu
ra
G L G
rā-ja-bhā (—˘—)
Guru-laghu-guru
ja
L G L
ja-bhā-na (˘—˘)
Laghu-guru-laghu
bha
G L L
bhā-na-sa (—˘˘)
Guru + two laghus
na
L L L
na-sa-la (˘˘˘)
Three laghus
sa
L L G
sa-la-gā (˘˘—)
Two laghus + guru
Major classical metres
Classical Sanskrit (Kalidasa, Bhartrihari, Shankara) uses fixed-syllable-count metres specified by a sequence of ganas plus optional final guru / laghu. Each metre has a distinctive emotional register.
Mandakranta · मन्दाक्रान्ता
17 syllables/pada
Gana pattern: ma bha na ta ta ga ga | ma=GGG bha=GLL na=LLL ta=GGL
Famous use — Kalidasa's Meghaduta — entirely in Mandakranta. The slow, lingering rhythm matches the cloud-messenger's journey from Ramagiri to Alaka.
Gana pattern: ma sa ja sa ta ta ga | "tiger-play" — a tiger's leaping rhythm
Famous use — Bhartrihari's Niti Shataka, Vairagya Shataka, Shringara Shataka. Adi Shankara's Vivekachudamani uses it heavily. The most weighty, dignified classical metre.
Gana pattern: ya ma na sa bha la ga | "she-of-the-summit"
Famous use — Soundarya Lahari (entirely in Shikharini). Many devotional stotras of Shankara. The metre’s alternating long-short pulse mirrors emotional crescendo.
śivaḥ śaktyā yukto yadi bhavati śaktaḥ prabhavituṃ | na cedevaṃ devo na khalu kuśalaḥ spanditum-api (Soundarya Lahari 1).
Indravajra + Upajati · इन्द्रवज्र + उपजाति
11 syllables/pada
Gana pattern: ta ta ja ga ga (Indravajra) | mixed (Upajati)
Famous use — Bhagavad Gita Chapter 11 (Vishvarupa Darshana) uses Upajati extensively. Indravajra is the "thunderbolt of Indra" — a forceful metre. Upajati is a mixture of Indravajra + Upendravajra padas.
Pingala gives precise rules (sutras 1.1-1.10). A syllable is laghu (˘) if it contains a short vowel (a, i, u, ṛ, ḷ) that is not followed by a conjunct, anusvara, or visarga. Otherwise it is guru (—).
A syllable is guru if:
It contains a long vowel (ā, ī, ū, ṝ, e, o, ai, au).
It is followed by a conjunct consonant (two or more consonants together, including the start of the next syllable).
It is followed by anusvara (ṃ) or visarga (ḥ).
It is the final syllable of a pada (then it counts as guru regardless of actual length).
Example scansion — Gayatri mantra opening:
tát savitúr váreṇyaṃ
tá — guru (final t is conjunct with s) | sa — laghu | vi — laghu (short i not followed by conjunct) | túr — guru (followed by v + conjunct or has visarga in some traditions) | vá — laghu | re — guru (long e) | ṇyaṃ — guru (anusvara)
Pingala’s binary mathematics and the meru-prastara
The binary system (sutras 8.23-32)
For an n-syllable metre, there are 2n possible guru/laghu arrangements. Pingala’s sutra dvikau glau (8.23) gives the rule: doubling. Two values (laghu = 0, guru = 1) combine binary-fashion. For a 24-syllable Gayatri, there are 224= 16,777,216 possible arrangements. Pingala’s algorithms enumerate them.
Meru-prastara — Pingala’s triangle
In sutra 8.34, Pingala arranges the count of arrangements by number of gurus in a triangular table. Row n, column k gives C(n,k) — the number of ways to place k gurus among n syllables. This is mathematically identical to Pascal’s Triangle. Halayudha’s commentary explicitly draws the meru (“mountain”) shape.
When counting matra-vrittas(metres by syllable-weight rather than syllable-count: laghu = 1 matra, guru = 2 matras), Pingala’s enumeration gives the sequence 1, 2, 3, 5, 8, 13, 21, 34, … — the Fibonacci numbers. Acharya Hemachandra (12th c) formalised this rule (“the count of n-matra metres = count of (n-1)-matra + (n-2)-matra metres”) — 50 years before Fibonacci’s 1202 CELiber Abaci.
Modern recognition
Knuth’s The Art of Computer Programming(Vol 4A, 2011) credits Pingala explicitly for the first known treatment of binary numbers and Pascal’s triangle. Subhash Kak (Louisiana State University) and Manjul Bhargava (Princeton, Fields Medal 2014) have written extensively on the priority claims.
Read further — See Sanskrit basics for the alphabet and the vowel-length distinctions that Chhandas presupposes, Vedangas hub for the six-anga overview, and Vedic suktas for the verses whose metres Pingala catalogued. Standard editions: Weber’s 1863 critical edition of the Chhandahshastra, the Chowkhamba Sanskrit edition with Halayudha’s commentary, and B. van Nooten’s 1993 monograph Binary Numbers in Indian Antiquity.