### Download Presentation

Number-Theoretic Algorithms

**An Image/Link below is provided (as is) to download presentation**
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

#### Presentation Transcript

**1. **Number-Theoretic Algorithms

**2. **Prime Number: 2, 3, 5, 7, 11, 13….
Composite number: 4, 6, 8,…..

**3. **Thm1: (Division Theorem)
For any integer a and any positive integer n, there are unique integers q and r such that 0?r<n and a=qn+r.
q=?a/n? is the quotient of the division.
r= a mod n is the remainder of the division.
a =?a/n?n+(a mod n)
Zn={0,1,2,…,n-1}

**4. **Greatest Common Divisor(GCD) Gcd(24,30)=6, gcd(5,7)=1
Thm2: If a and b are any integers, not both zero, then gcd(a,b) is the smallest positive element of the set {ax+by:x,y?Z} of linear combinations of a and b.

**5. **Pf: Let s be the smallest positive ax+by for some x,y?Z.
a mod s = a- ?a/s?s
=a-?a/s?(ax+by)
=a(1- ?a/s?x)+b(-?a/s?y).

**6. **a mod s = a(1- ?a/s?x)+b(-?a/s?y).
Thus (a mod s) is a linear combination of a and b.
?a mod s<s ? a mod s =0 because s is the smallest positive such linear combination.
? s|a.

**7. **Similarly, s|b ? s is a common divisor of a and b.
?gcd(a,b)?s.
? s=ax+by
? gcd(a,b) | s ?gcd(a,b)?s.
Thus, gcd(a,b)=s.