Chapter 4 Number Theory in Asia The Euclidean Algorithm The Chinese Remainder Theorem Linear Diophantine Equations Pell’s Equation in Brahmagupta Pell’s.

Slides:



Advertisements
Similar presentations
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Advertisements

Cryptography and Network Security
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
22C:19 Discrete Structures Integers and Modular Arithmetic
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Number Theory and Cryptography
More about Polynomials
Basic properties of the integers
Cryptography and Network Security Chapter 4
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Chapter II. THE INTEGERS
Congruence of Integers
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
MATH 2306 History of Mathematics Instructor: Dr. Alexandre Karassev.
BY MISS FARAH ADIBAH ADNAN IMK
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Hero’s and Brahmagupta’s Formulas Lesson Hero of Alexandria He was an ancient Greek mathematician and engineer who was born in 10 AD. He invented.
Chapter 3 Greek Number Theory The Role of Number Theory Polygonal, Prime and Perfect Numbers The Euclidean Algorithm Pell’s Equation The Chord and Tangent.
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
Whole Numbers Are the whole numbers with the property of addition a group?
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Mathematics of Cryptography Modular Arithmetic, Congruence,
CPSC 3730 Cryptography and Network Security
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Cryptography and Network Security Introduction to Finite Fields.
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
The Rational Zero Theorem The Rational Zero Theorem gives a list of possible rational zeros of a polynomial function. Equivalently, the theorem gives all.
7.4 Integration of Rational Functions by Partial Fractions TECHNIQUES OF INTEGRATION In this section, we will learn: How to integrate rational functions.
Chapter 8 With Question/Answer Animations 1. Chapter Summary Applications of Recurrence Relations Solving Linear Recurrence Relations Homogeneous Recurrence.
Chapter 3 Elementary Number Theory and Methods of Proof.
Chapter 11 The Number Theory Revival
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Chinese Remainder Theorem Dec 29 Picture from ………………………
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Network and Computer Security (CS 475) Modular Arithmetic
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Tuesday’s lecture: Today’s lecture: One-way permutations (OWPs)
Discrete Mathematics 4. NUMBER THEORY Lecture 7 Dr.-Ing. Erwin Sitompul
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
Divisibility and Modular Arithmetic
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Number-Theoretic Algorithms
The Relation Induced by a Partition
Mathematics of Cryptography
B504/I538: Introduction to Cryptography
Congruence class arithmetic
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Chapter 4 Number Theory in Asia
Number Theory (Chapter 7)
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Copyright © Zeph Grunschlag,
Miniconference on the Mathematics of Computation
Divisibility and Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Solving Linear Equations
Presentation transcript:

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 = 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 4b ≡ 1 mod 6 then 4b – 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, 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, … p k - relatively prime integers, i.e. gcd (p i, p j ) =1 for all i ≠ j remainders: r 1, r 2, …, r k such that 0 ≤r i < p i Then there exists integer n satisfying the system of k congruencies: n ≡ r 1 mod p 1 n ≡ r 2 mod p n ≡ r k mod p k

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 – 92y 2 = 1 –Consider “auxiliary” equation x 2 – 92y 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 – 92y 2 = 8 2 –Dividing both sides by 8 2 we obtain (24, 5/2, 1) which is a rational solution of x 2 – 92y 2 = 1 –Composing it with itself we get (1151, 120, 1) which means that x = 1151, y = 120 is a solution of x 2 – 92y 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 1 2 = 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 k i = 1, 2 or 4 and use Brahmagupta’s method

Example Consider x 2 – 61y 2 = 1 Equation 8 2 – 61 x 1 2 = 3 gives (a, b, k) = (8, 1, 3) Composing (8, 1, 3) with (m,1, m 2 – 61) we get (8m + 61, 8+m, 3(m 2 – 61)) Dividing by 3 we get ( (8m + 61) / 3, (8+m) / 3, m 2 – 6) Letting m = 7 we get (39, 5, - 4) (Brahmagupta) Dividing by 2 (since 4 = 2 2 ) 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 ( , , 1) which is a solution of x 2 – 61y 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 = 2u splitting side c into segments c 1 = (u 2 – v 2 ) / v and c 2 = (u 2 – v 2 ) / v

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 5.7 Biographical Notes: Brahmagupta and Bhâskara II

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)