Chapter 4 Number Theory in Asia The Euclidean
Chapter 4 Number Theory in Asia • • The Euclidean Algorithm The Chinese Remainder Theorem Linear Diophantine Equations Pell’s Equation in Brahmagupta Pell’s Equation in Bhâskara II Rational Triangles Biographical Notes: Brahmagupta and Bhâskara
5. 1 The Euclidean Algorithm • Major results known in ancient China and India (independently) – Pythagorean theorem and triples – Concept of π – Euclidean algorithm (China, Han dynasty, 200 BCE – 200 CE) • Practical applications of Euclidean algorithm • Chinese remainder theorem • India: solutions of linear Diophantine equations and Pell’s equation
5. 2 The Chinese Remainder Theorem • Example: find a number that leaves remainder 2 on division by 3, rem. 3 on div. by 5, and rem. 2 on div. by 7 • In terms of congruencies: x ≡ 2 mod 3, x ≡ 3 mod 5, x ≡ 2 mod 7 • Solution: x = 23 • “General method” - Mathematical Manual by Sun Zi (late 3 rd century CE): – If we count by threes and there is a remainder 2, put down 140 – If we count by fives and there is a remainder 3, put down 63 – If we count by seven and there is a remainder 2, put down 30 – Add them to obtain 233 and subtract 210 to get the answer
Explanation • 140 = 4 x (5 x 7) leaves remainder 2 on division by 3 and remainder 0 on division by 5 and 7 • 63 = 3 x (3 x 7) leaves remainder 3 on division by 5 and remainder 0 on division by 3 and 7 • 140 = 2 x (3 x 5) leaves remainder 2 on division by 3 and remainder 0 on division by 5 and 7 • Therefore their sum 223 leaves remainders 2, 5, and 2 on division by 3, 5, and 7, respectively • Subtract integral multiple of 3 x 5 x 7 = 105 to obtain the smallest solution: 223 – 2 x 105 = 223 – 210 = 23 • Question: Why do we choose 140, 63 and 30 (or, more precisely 4, 3 and 2)?
• Sun Zi: – If we count by threes and there is a remainder 1, put down 70 – If we count by fives and there is a remainder 1, put down 21 – If we count by seven and there is a remainder 1, put down 15 • We have: – 70 = 2 x (5 x 7) – smallest multiple of 5 and 7 leaving remainder 1 on division by 3 – Multiply it by 2 to get remainder 2 on division by 3: 140 = 2 x 70 = 2 x 2 (5 x 7) = 4 (5 x 7)
Inverses modulo p • Definition b is called inverse of a modulo p if ab ≡ 1 mod p • Examples: • 2 is inverse of 3 modulo 5 • 3 is inverse of 3 modulo 8 • 2 is inverse of 35 modulo 3 • Does inverse of a modulo p exist ? • Example: does inverse of 4 modulo 6 exist? • If we had 4 b ≡ 1 mod 6 then 4 b – 1 were divisible by 6 and therefore 1 were divisible by 2 = gcd (4, 6), which is impossible!
General method of finding inverses • Qin Jiushao, 1247 - used Euclidean algorithm to find inverses • Suppose ax = 1 mod p where x is unknown • Then ax – 1 = py ↔ ax - py = 1 • This equation has solutions if and only if gcd (a, p) = 1 and in this case solutions can be found from Euclidean algorithm! • In particular, if p is prime then inverse always exist
Chinese remainder theorem • p 1, p 2, … pk - relatively prime integers, i. e. gcd (pi, pj) =1 for all i ≠ j • remainders: r 1, r 2, …, rk such that 0 ≤ri < pi • Then there exists integer n satisfying the system of k congruencies: n ≡ r 1 mod p 1 n ≡ r 2 mod p 2. . . . . n ≡ rk mod pk
5. 3 Linear Diophantine Equations • ax + by = c • Euclidean algorithm: – China: between 3 rd century CE and 1247 (Qin Jiushao) – India: ryabhata (499 CE) • Bhaskara I (India, 522) reduced problem to finding a’x + b’y = 1 where a’ = a / gcd (a, b) and b’ = b / gcd (a, b) • Criterion for an integer solution: Equation ax + by = c has an integer solution if and only if gcd (a, b) divides c
5. 4 Pell’s Equation in Brahmagupta • China: development of algebra and approximate methods, integer solutions for linear equations, but not integer solutions for nonlinear equations • India: less progress in algebra but success in finding solutions of Pell’s equation: Brahmagupta “Brâhma-sphuta-siddhânta” 628 CE
Brahmagupta’s method • Pell’s equation: x 2 – Ny 2 = 1 • Method is based on Brahmagupta's discovery of identity: • Note: if we let N = -1 we obtain identity discovered by Diophantus:
Composition of triples • Consider equations (1) x 2 – Ny 2 = k 1 and (2) x 2 – Ny 2 = k 2 • x 1, y 1 – sol. of (1), x 2, y 2 – sol. of (2) • Then the identity implies that x =x 1 x 2+Ny 1 y 2 and y =x 1 y 2+x 2 y 1 is a solution of x 2 – Ny 2 = k 1 k 2 • We therefore define composition of triples (x 1, y 1, k 1 ) and (x 2, y 2, k 2 ) equal to the triple (x 1 x 2+Ny 1 y 2, x 1 y 2+x 2 y 1, k 1 k 2 ) • Thus if k 1= k 2 =1 one can obtain arbitrary large solutions of x 2 – Ny 2 = 1 (e. g. start from some obvious solution and compose it with itself)
Moreover… • It turns out that we can obtain solutions of x 2 – Ny 2 = 1 composing solutions of x 2 – Ny 2 = k 1 and x 2 – Ny 2 = k 2 even when k 1, k 2 > 1 • Indeed: composing (x 1, y 1, k 1 ) with itself gives integer solution of x 2 – Ny 2 = (k 1 ) 2 and hence rational solution of x 2 – Ny 2 = 1 • Example (Brahmagupta: “a person solving this problem within a year is a mathematician”) x 2 – 92 y 2 = 1 – Consider “auxiliary” equation x 2 – 92 y 2 = 8 – It has obvious solution (10, 1, 8) – Composing it with itself we get (192, 20, 64) which is a solution of x 2 – 92 y 2 = 82 – Dividing both sides by 82 we obtain (24, 5/2, 1) which is a rational solution of x 2 – 92 y 2 = 1 – Composing it with itself we get (1151, 120, 1) which means that x = 1151, y = 120 is a solution of x 2 – 92 y 2 = 1
5. 5 Pell’s Equation in Bhâskara II • Brahmagupta: – invented composition of triples – proved that if x 2 – Ny 2 = k has an integer solution for k = 1, 2 , 4 then x 2 – Ny 2 = 1 has integer solution • Bhâskara: – first general method for solving the Pell equation (“Bîjaganita” 1150 CE) – method is based on Brahmagupta’s approach
Method of Bhâskara • • • Goal: find a non-trivial integer solution of x 2 – Ny 2 = 1 Let a and b are relatively prime such that a 2 – Nb 2 = k Consider trivial “equation” m 2 – N x 12 = m 2 – N Compose triples (a, b, k) and (m, 1, m 2 -N) We get (am + Nb, a + bm, k (m 2 – N) ) Dividing by k we get: ((am + Nb) / k, (a + bm) / k, m 2 – N) Choose m so that (a+bm) / k = b 1 is an integer AND so that m 2 – N is as small as possible It turns out that (am + Nb) / k = a 1 and (m 2 -N) / k = k 1 are integers Now we have (a 1)2 – N (b 1)2 = k 1 Repeat the same procedure to obtain k 2 and so on The goal is to get ki = 1, 2 or 4 and use Brahmagupta’s method
Example • Consider x 2 – 61 y 2 = 1 • Equation 82 – 61 x 12 = 3 gives (a, b, k) = (8, 1, 3) • Composing (8, 1, 3) with (m, 1, m 2 – 61) we get (8 m + 61, 8+m, 3(m 2 – 61)) • Dividing by 3 we get ( (8 m + 61) / 3, (8+m) / 3, m 2 – 6) • Letting m = 7 we get (39, 5, - 4) • (Brahmagupta) Dividing by 2 (since 4 = 22) we get (39/2, 5/2, -1) • Composing it with itself we get (1523 / 2, 195 /2, 1) • Composing it with (39/2, 5/2, -1) we get (29718, 3805, -1) • Composing it with itself we get (1766319049, 226153980, 1) which is a solution of x 2 – 61 y 2 = 1 ! • In fact, it is the minimal nontrivial solution!
5. 6 Rational Triangles • Definition A triangle is called rational if it has rational sides and rational area • Equivalently: rational sides and altitudes • Brahmagupta’s Theorem: Parameterization of rational triangles If a, b, c are sides of a rational triangle then for some rational numbers u, v and w we have: a = u 2 / v + v, b = u 2 / w + w c = u 2 / v – v + u 2 / w – w
Stronger Form • Any rational triangle is of the form a = (u 2 + v 2) / v, b = (u 2 + w 2) / w c = (u 2 – v 2 ) / v + (u 2 – w 2 ) / w for some rational numbers u, v, w with the altitude h = 2 u splitting side c into segments c 1 = (u 2 – v 2 ) / v and c 2 = (u 2 – v 2 ) / v
5. 7 Biographical Notes: Brahmagupta and Bhâskara II • Brahmagupta (598 – (approx. ) 665 CE) – “Brâhma-sphuta-siddhânta” – teacher from Bhillamâla (now Bhinmal, India) – prominent in astronomy and mathematics – Pell’s equation – general solution of quadratic equation – area of a cyclic quadrilateral (which generalizes Heron’s formula for the area of triangle) – parameterization of rational triangles
• Bhâskara II (1114 – 1185) – greatest astronomer and mathematician in 12 th-century India – head of the observatory at Ujjain – “Līlāvatī” (work named after his daughter)
- Slides: 20