## Monday, October 18, 2010

### Chakravala - Decision Analytics in Ancient India

More than two thousand years ago, many priests in India had to double up as mathematicians. They practiced the Sanathana Dharma, 'the eternal way of ethical living' (or Hinduism as it is popularly known today). Hinduism is richly influenced by nature, as well as the earthly and celestial elements, and fire rituals were quite important in those times. Careful attention was paid to the geometry of the altar, since different shapes were required depending on the objective of the ritual. This naturally gave rise to analytics, and a 'textbook' in those days (800-200 BCE) was the 'Sulba Sutras' to help figure out the correct angles and lengths to optimally design them (that lead to the discovery of Pythagorean triples and trigonometry, among other things). Inevitably, the beautiful natural patterns inherent in numbers awoke the inner geek in some of these priests.

Among the many famous mathematicians who carried forward this rich Vedic tradition was an astronomer named Brahmagupta (~ 600 CE). He extensively explored solutions to linear Diophantine equations that are central to integer programming today. Of course, his bigger distinction is for 'much ado about nothing'. He is known to be the first human being to clearly define, publish, and use zero as a number! He also explored Diophantine equations of the second degree, and came up with ideas that led to a recursive, iterative solution method for such equations; again something that is very useful in modern numerical optimization. He generalized an idea discovered by Diophantus and used this to achieve some success in finding solutions to Pell's equation. This was generalized to the Chakravala (Sanskrit for 'cyclic') algorithm by Jayadeva (950CE) and Bhaskara II (1100CE). A key subroutine at an iteration involves a neat rational scaling operation, followed by the solving of a simple discrete optimization problem that finds an integer m, such that it minimizes |m2N|/k, where N and k are input parameters. Furthermore, they recognize that such problems have degenerate solutions, and in some cases, find minimal integer feasible solutions using this approach. This attention to detail toward handling numerical issues stands out. Recognizing and tackling degeneracy is at the very heart of modern decision-analytics practice!

The Chakravala turns out to be an easy-to-use iterative method to find good approximations for square roots of integers. Indeed, this approach has been recognized for its ingenuity and 'careful simplicity' that allows us to work with well-conditioned real numbers; ideas that we in the OR community know are critical to matrix refactoring within a successful dual simplex implementation, for example.

#### 1 comment:

1. fantastic collection. thanks. Yes, Brahmagupta is credited with defining and formalizing the rules of usage of zero and documenting it, rather than 'discovering' it. All in all, a great fraternity of scholars and applied mathematicians who were far ahead of their times.