munotes®

Naṣṭa: From a Row Number Back to the Pattern

Get access to whole semester resourcesSemester Pass

Chapter Twenty-Three

Syllabus topic Module 1, "Naṣṭa and Uddiṣṭa (index retrieval mechanisms)"

Pages 73 to 76 of 378

In one line

Naṣṭa takes a row number and gives you the pattern in that row, without writing any of the rows before it.

In the wording you can write in an examination: naṣṭa, literally the lost, is the pratyaya that recovers a metrical pattern from its serial number in the prastāra. Piṅgala's rule halves the number: where the halving is exact a laghu is written, and where the number is odd one is added before halving and a guru is written. The syllables are written from the left, one per halving, until the metre's syllable count is reached.

The problem, and why it is called "the lost"

A student remembers that a verse is the forty-first form of the six-syllable metre but has forgotten the pattern. The pattern is lost and the number survives. Naṣṭa restores it.

The alternative is to build the table and count down to row forty-one. That is 41 rows of work, and for a jagatī it can be 4096. Naṣṭa is six steps, one per syllable.

The provisions

8.24, lardhe. On halving, an L. Halāyudha's gloss, working his own example: if one wishes to know what the sixth of the gāyatrī same-metre forms is, then halve that number six; when it is halved, a single laghu is obtained, to be placed on the ground, that is, in the first position.

8.25, saike g. With one added, a G. His gloss: in the case of an odd number, add one, then halve; there a single ga is obtained, to be placed after the syllable previously obtained. And then: this rule of saike ga is to be applied again and again, until the syllables are complete, six in number.

Both numbers agree across this book's witnesses.

The rule as steps

  1. Write down the row number.
  2. If it is even, halve it and write L.
  3. If it is odd, add one, halve the result, and write G.
  4. Write each syllable to the right of the last, so the first syllable obtained is the leftmost.
  5. Repeat until you have as many syllables as the metre has. Stop then, whatever number you are holding.

Step five matters. The number will usually reach one and stay there, and those steps still produce syllables. You stop by counting syllables, not by reaching zero.

Worked by hand: row 6 of the gāyatrī

This is Halāyudha's own example.

StepNumberEven or oddOperationSyllable
16evenhalve to 3L
23oddadd one, halve to 2G
32evenhalve to 1L
41oddadd one, halve to 1G
51oddadd one, halve to 1G
61oddadd one, halve to 1G
munotes.in73

Naṣṭa: From a Row Number Back to the Pattern

Reading the syllable column downward gives L G L G G G, and that is row six.

Check it against the other rule: [Uddiṣṭa: From a Pattern to Its Row Number] takes L G L G G G and returns six. The two rules agree, and they must, because they are inverses.

Worked by hand: row 41 of the gāyatrī

StepNumberEven or oddOperationSyllable
141oddadd one, halve to 21G
221oddadd one, halve to 11G
311oddadd one, halve to 6G
46evenhalve to 3L
53oddadd one, halve to 2G
62evenhalve to 1L

G G G L G L, which is the pattern [Binary Number Systems, and Exactly Where Piṅgala's Order Agrees] reached by arithmetic and which uddiṣṭa returns forty-one for.

Why the rule is right

In the binary reading, the row number minus one is the pattern's value with laghu as one and the leftmost syllable in the units place. So the first syllable is laghu exactly when the units bit of the row number minus one is one, that is, exactly when the row number minus one is odd, that is, exactly when the row number is even.

That is step two. And halving the even row number r gives r over two, whose parity decides the next syllable in the same way.

For the odd case, r minus one is even, so the bit is zero and the syllable is guru; and the next number needed is r minus one over two plus one, which is r plus one over two. That is step three, with the plus one before the halving doing exactly that arithmetic.

So: "add one before halving at an odd number" is the correction that keeps the count on a one-based scale. That single detail is what makes the rule work on row numbers rather than on values, and it is the detail a student who reinvents the rule always gets wrong.

The rule, run, with both directions checked

def nasta(n, r):
    """8.24 lardhe and 8.25 saike g.

    Halve the row number; if it was even write a laghu, and if it was odd add
    one before halving and write a guru. Do this n times, writing from the left.
    """
    out = []
    x = r
    for _ in range(n):
        if x % 2 == 0:
            out.append("L")
            x //= 2
        else:
            out.append("G")
            x = (x + 1) // 2
    return "".join(out)

def uddista(pattern):
    y = 1
    for ch in reversed(pattern):
        y *= 2
        if ch == "G":
            y -= 1
    return y

print("the six syllable metre, Halayudha's own example is row 6")
for r in (1, 6, 41, 64):
    p = nasta(6, r)
    print("  row %-3d nasta gives %-8s uddista gives it back as %d" % (r, p, uddista(p)))
munotes.in74

Naṣṭa: From a Row Number Back to the Pattern

the six syllable metre, Halayudha's own example is row 6
  row 1   nasta gives GGGGGG   uddista gives it back as 1
  row 6   nasta gives LGLGGG   uddista gives it back as 6
  row 41  nasta gives GGGLGL   uddista gives it back as 41
  row 64  nasta gives LLLLLL   uddista gives it back as 64

The cost

One halving and at most one addition per syllable, so the work is proportional to n and independent of how large the row number is. Finding row 4000 of a twelve-syllable metre costs the same twelve steps as finding row 1.

What it does NOT mean

It does not check the row exists. Ask for row 100 of a three-syllable metre and the rule returns a pattern. There are only eight rows. Nothing in the text validates the input and a program must.

It does not stop when the number reaches one. It stops when the syllable count is reached. A reader who stops early produces a short pattern, and this is the commonest mistake in working the rule by hand.

It does not depend on the table existing. That is the point of it. The pattern is computed, not looked up, and the table never has to be written at all.

Quick revision

  • Naṣṭa: from a row number to the pattern in that row.
  • 8.24 lardhe: halve, and write L. 8.25 saike g: if odd, add one, halve, and write G.
  • Write syllables left to right, one per step, and stop when the syllable count is reached, not when the number reaches one.
  • Halāyudha's own example: row 6 of the gāyatrī is L G L G G G.
  • Row 41 of the gāyatrī is G G G L G L.
  • Cost proportional to the number of syllables, independent of the row number.
  • The "add one before halving" is the correction for rows being counted from one.

Test yourself

1. Find row 11 of the four-syllable metre by the rule.

11 is odd: add one, halve to 6, write G. 6 is even: halve to 3, write L. 3 is odd: add one, halve to 2, write G. 2 is even: halve to 1, write L. The pattern is G L G L.

2. Why is one added before halving when the number is odd?

Because rows are counted from one and values from zero. For an odd row number r, the value r minus one is even, so the syllable is guru, and the next number required is r minus one over two plus one, which equals r plus one over two.

munotes.in75

Naṣṭa: From a Row Number Back to the Pattern

3. When does the rule stop, and what happens if a student stops too early?

It stops when as many syllables have been written as the metre has. Stopping when the number reaches one produces a pattern that is too short, which is the commonest error in working it by hand.

4. How much work does naṣṭa do for row 4000 of a twelve-syllable metre, and how much does generating the table do?

Naṣṭa does twelve halvings. Generating the table and counting to row 4000 does about 4000 rows of twelve symbols, roughly 48,000 symbol operations.

munotes.in76

The rest of this subject

These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.

Issue
Done!