Ganita Kaumudi

Ganita Kaumudi (गणितकौमदी) is a treatise on mathematics written by Indian mathematician Narayana Pandita in 1356. It was an arithmetical treatise alongside the other algebraic treatise called "Bijganita Vatamsa" by Narayana Pandit.

Contents
Gaṇita Kaumudī contains about 475 verses of sūtra (rules) and 395 verses of udāharaṇa (examples). It is divided into 14 chapters (vyavahāra):

1. Prakīrṇaka-vyavahāra
Weights and measures, length, area, volume, etc. It describes addition, subtraction, multiplication, division, square, square root, cube and cube root. The problems of linear and quadratic equations described here are more complex than in earlier works. 63 rules and 82 examples

2. Miśraka-vyavahāra
Mathematics pertaining to daily life: “mixture of materials, interest on a principal, payment in instalments, mixing gold objects with different purities and other problems pertaining to linear indeterminate equations for many unknowns” 42 rules and 49 examples

3. Śreḍhī-vyavahāra
Arithmetic and geometric progressions, sequences and series. The generalization here was crucial for finding the infinite series for sine and cosine. 28 rules and 19 examples.

4. Kṣetra-vyavahāra
Geometry. 149 rules and 94 examples. Includes special material on cyclic quadratilerals, such as the “third diagonal”.

5. Khāta-vyavahāra
Excavations. 7 rules and 9 examples.

6. Citi-vyavahāra
Stacks. 2 rules and 2 examples.

7. Rāśi-vyavahāra
Mounds of grain. 2 rules and 3 examples.

8. Chāyā-vyavahāra
Shadow problems. 7 rules and 6 examples.

9. Kuṭṭaka
Linear integer equations. 69 rules and 36 examples.

10. Vargaprakṛti
Quadratic. 17 rules and 10 examples. Includes a variant of the Chakravala method. Ganita Kaumudi contains many results from continued fractions. In the text Narayana Pandita used the knowledge of simple recurring continued fraction in the solutions of indeterminate equations of the type $$nx^2+k^2=y^2$$.

11. Bhāgādāna
Contains factorization method, 11 rules and 7 examples.

12. Rūpādyaṃśāvatāra
Contains rules for writing a fraction as a sum of unit fractions. 22 rules and 14 examples.

Unit fractions were known in Indian mathematics in the Vedic period: the Śulba Sūtras give an approximation of $\sqrt{2}$ equivalent to $$1 + \tfrac13 + \tfrac1{3\cdot4} - \tfrac1{3\cdot4\cdot34}$$. Systematic rules for expressing a fraction as the sum of unit fractions had previously been given in the Gaṇita-sāra-saṅgraha of Mahāvīra (c. 850). Nārāyaṇa's Gaṇita-kaumudi gave a few more rules: the section bhāgajāti in the twelfth chapter named aṃśāvatāra-vyavahāra contains eight rules. The first few are:


 * Rule 1. To express 1 as a sum of n unit fractions:
 * $$1 = \frac1{1\cdot 2} + \frac1{2 \cdot 3} + \frac1{3 \cdot 4} + \dots + \frac1{(n-1)\cdot n} + \frac1n$$


 * Rule 2. To express 1 as a sum of n unit fractions:
 * $$ 1 = \frac12 + \frac13 + \frac1{3^2} + \dots + \frac1{3^{n-2}} + \frac1{2 \cdot 3^{n-2}}$$


 * Rule 3. To express a fraction $$p/q$$ as a sum of unit fractions:
 * Pick an arbitrary number i such that $$(q+i)/p$$ is an integer r, write
 * $$ \frac{p}{q} = \frac1r + \frac{i}{qr}$$
 * and find successive denominators in the same way by operating on the new fraction. If i is always chosen to be the smallest such integer, this is equivalent to the greedy algorithm for Egyptian fractions, but the Gaṇita-Kaumudī's rule does not give a unique procedure, and instead states evam iṣṭavaśād bahudhā ("Thus there are many ways, according to one's choices.")


 * Rule 4. Given $$n$$ arbitrary numbers $$k_1, k_2, \dots, k_n$$,
 * $$1 = \frac{(k_2 - k_1)k_1}{k_2 \cdot k_1} + \frac{(k_3 - k_2)k_1}{k_3 \cdot k_2} + \dots + \frac{(k_n - k_{n-1})k_1}{k_n \cdot k_{n-1}} + \frac{1 \cdot k_1}{k_n}$$


 * Rule 5. To express 1 as the sum of fractions with given numerators $$a_1, a_2, \dots, a_n$$:
 * Calculate $$i_1, i_2, \dots, i_n$$ as $$i_1 = a_1 + 1$$, $$i_2 = a_2 + i_1$$, $$i_3 = a_3 + i_2$$, and so on, and write
 * $$ 1 = \frac{a_1}{1\cdot i_1} + \frac{a_2}{i_1 \cdot i_2} + \frac{a_3}{i_2 \cdot i_3} + \dots + \frac{a_n}{i_{n-1} \cdot i_n} + \frac{1}{i_n} $$

13. Aṅka-pāśa
Combinatorics. 97 rules and 45 examples. Generating permutations (including of a multiset), combinations, integer partitions, binomial coefficients, generalized Fibonacci numbers.

Narayana Pandita noted the equivalence of the figurate numbers and the formulae for the number of combinations of different things taken so many at a time.

The book contains a rule to determine the number of permutations of n objects and a classical algorithm for finding the next permutation in lexicographic ordering though computational methods have advanced well beyond that ancient algorithm. Donald Knuth describes many algorithms dedicated to efficient permutation generation and discuss their history in his book The Art of Computer Programming.

14. Bhadragaṇita
Magic squares. 60 rules and 17 examples.

Editions

 * "Translation of Ganita Kaumudi with Rationale in modern mathematics and historical notes" by S L Singh, Principal, Science College, Gurukul Kangri Vishwavidyalaya, Haridwar
 * Ganita Kaumudi, Volume 1–2, Nārāyana Pandita (Issue 57 of Princess of Wales Sarasvati Bhavana Granthamala: Abhinava nibandhamālā Padmakara Dwivedi Jyautishacharya 1936)