श्रीसनातन

Chandas — metre, and the first binary notation

छन्दस्

Also written: chandas · vedic metre · pingala · binary numbers india · fibonacci india

Chandas is the feet of the Veda — the metres in which the mantras stand. Metre is not ornament here: the metre is part of the mantra's identity, and each metre is treated as a living power with its own deity and effect.

The Ṛgveda already speaks of metre as a measuring instrument rather than a decoration — the verb it uses is mimīte, 'measures out'.

गायत्रेण प्रति मिमीते अर्कमर्केण साम त्रैष्टुभेन वाकम्।

gāyatreṇa prati mimīte arkam arkeṇa sāma traiṣṭubhena vākam

With the gāyatrī he measures out the chant; with the chant, the sāman; with the triṣṭubh, the utterance.

— Ṛgveda 1.164.24

Each metre measures out a different kind of speech. That is the premise of the whole limb: a mantra in gāyatrī and the same words redistributed into triṣṭubh are not the same mantra, because the container is part of what is contained. It is also why the tradition names a deity and an effect for each metre, and why a Vedic recitation can be checked for corruption simply by counting — a syllable dropped anywhere in the line makes the metre fail, and the failure is audible.

Count the Gāyatrī

The easiest way to see what a metre is doing is to count one. The gāyatrī is defined as three pādas of eight syllables. Here is the verse the metre is named for.

तत्सवितुर्वरेण्यं भर्गो देवस्य धीमहि। धियो यो नः प्रचोदयात्॥

tat savitur vareṇyaṁ bhargo devasya dhīmahi dhiyo yo naḥ pracodayāt

May we meditate on that excellent radiance of the god Savitṛ, who may impel our understandings.

— Ṛgveda 3.62.10

Count: tat-sa-vi-tur-va-re-ṇyaṁ (8) | bhar-go-de-vas-ya-dhī-ma-hi (8) | dhi-yo-yo-naḥ-pra-co-da-yāt (8) = 24. The first pāda is short by one syllable in the Saṁhitā text and is traditionally restored by reading vareṇiyam with the semivowel resolved — a small point that shows the metre is being used as the authority over the received spelling, not the other way round. This is Chandas working as a proofreading instrument, which is one of the reasons the Veda survived intact.

The principal Vedic metres
MetreSyllablesStructureNote
Gāyatrī243 × 8The metre of the Gāyatrī mantra; associated with Agni
Uṣṇik283 pādas—
Anuṣṭubh324 × 8The śloka metre — the Gītā, Rāmāyaṇa and Mahābhārata are in it
Bṛhatī364 pādas—
Paṅkti405 × 8—
Triṣṭubh444 × 11The most frequent metre of the Ṛgveda
Jagatī484 × 12—

Piṅgala's mathematics

Piṅgala's Chandaḥśāstra (c. 3rd–2nd century BCE) asked a purely combinatorial question: how many patterns of light and heavy syllables fit a metre of n syllables? Answering it, he set out a binary representation of numbers using laghu and guru as the two states, a method for computing 2ⁿ by repeated squaring, the array now called Pascal's triangle (meru-prastāra), and the recurrence now known as the Fibonacci sequence — the mātrā-meru, describing metres of fixed duration.

The algorithm itself survives in four sūtras of the eighth chapter, and they are worth reading, because they are a recursive procedure written in the sūtra style: halve the number when you can, otherwise subtract one, mark down which of the two you did, and then work back along the marks.

द्विरर्धे। रूपे शून्यम्। द्विः शून्ये। तावदर्धे तद्गुणितम्॥

dvir ardhe | rūpe śūnyam | dviḥ śūnye | tāvad ardhe tad-guṇitam

When halved, [write] two. When one is taken away, [write] zero. Where there is a zero, double. Where there is a two, square that same quantity.

— Piṅgala, Chandaḥśāstra, adhyāya 8 (the sūtras for computing 2ⁿ)

What the procedure computes is 2ⁿ by repeated squaring — the halving of the exponent at each step, which reduces a multiplication of n terms to about log₂(n) operations. It is the same method a modern implementation of fast exponentiation uses, and it was devised to answer a question about poetry: how many arrangements of light and heavy syllables can a metre of n syllables have.

Where the śloka came from

The anuṣṭubh — four pādas of eight syllables, the metre of the Gītā, the Rāmāyaṇa and the Mahābhārata — has an origin story, and the story is that it was produced by grief. Vālmīki, watching a hunter shoot one of a pair of mating krauñca birds, curses him, and the curse comes out metrically.

मा निषाद प्रतिष्ठां त्वमगमः शाश्वतीः समाः। यत्क्रौञ्चमिथुनादेकमवधीः काममोहितम्॥

mā niṣāda pratiṣṭhāṁ tvam agamaḥ śāśvatīḥ samāḥ yat krauñca-mithunād ekam avadhīḥ kāma-mohitam

Hunter, may you never find rest through all the endless years — because you killed one of a pair of krauñca birds, lost in love.

— Vālmīki Rāmāyaṇa 1.2.15

Vālmīki then notices what he has just done and names it: because it arose from śoka, grief, it shall be called śloka. The pun is the point. The tradition's account of the origin of its principal narrative metre is not that a god revealed it or a grammarian designed it, but that a specific emotion, under pressure, fell into a specific number of syllables. Every verse of the two epics is in that metre; so is most of the Purāṇic corpus; so is the Gītā.


Continue reading

Last revised 2026-08-16. Corrections are welcome — see how this site is written.