Download presentation

Presentation is loading. Please wait.

Published byAlexandra Harper Modified over 3 years ago

1
Chapter 8 Introduction to Number Theory

2
2 Contents Prime Numbers Fermats and Eulers Theorems

3
3 Prime Numbers Primes numbers An integer p > 1 is a prime number if and only if it is divisible by only 1 and p.

4
4 Prime Numbers Integer factorization Any integer a > 1 can be factored in a unique way as where p 1 < p 2 < … < p t are prime numbers and each a i is a positive integer. 91 = 7 × 13; 11101 = 7 × 11 2 ×13

5
5 Prime Numbers Another integer factorization If P is the set of all prime numbers, then any positive integer can be written uniquely in the following form: The right side is the product over all possible prime numbers p. Most of the exponents a p will be 0. 3600 = 2 4 ×3 2 ×5 2 ×7 0 ×11 0 ×….

6
6 Prime Numbers Another integer factorization The value of any given positive integer can be specified by listing all the nonzero exponents. The integer 12 =2 2 ×3 1 is represented by {a 2 =2, a 3 =1}. The integer 18 =2 1 ×3 2 is represented by {a 2 =1, a 3 =2}. The integer 91= 7 2 ×13 1 is represented by {a 7 = 2, a 13 = 1}.

7
7 Prime Numbers Multiplication Multiplication of two numbers is adding the corresponding exponents. k = 12 × 18 = 216 12 = 2 2 × 3 1 18 = 2 1 × 3 2 ------------------ 216 = 2 3 × 3 3

8
8 Prime Numbers Divisibility a|ba p b p for all p a = 12;b= 36;12|36 12 = 2 2 ×3; 36 = 2 2 ×3 2 a 2 = 2 = b 2 a 3 = 1 2 = b 3

9
9 Prime Numbers GCD k = gcd (a, b) k p = min(a p, b p ) for all p 300 = 2 2 ×3 1 ×5 2 18 = 2 1 ×3 2 ×5 0 gcd (18, 300) = 2 1 ×3 1 ×5 0 = 6

10
10 Fermats and Eulers Theorems Fermats theorem If p is prime and a is a positive integer not divisible by p, then a p-1 1 (mod p)

11
11 Fermats and Eulers Theorems Proof of Fermats theorem. Outline Show {1, 2, …, p-1}={a mod p, 2a mod p, …, (p-1)a mod p} Show. Since is relatively prime to p, we multiply to both sides to get.

12
12 Fermats and Eulers Theorems Proof of Fermats theorem Show {1, 2, …, p-1}={a mod p, 2a mod p, …, (p-1)a mod p} Show ka mod p for any 1 k p-1 is in {1, 2, …, p-1} by showing that ka mod p k a mod p for k k. Show ka mod p k a mod p for 1 k k p-1. Proof by contradiction Assume that ka k a mod p for some 1 k k p-1. Since a is relatively prime to p, we multiply a -1 to get k k mod p, which contradiction the fact that k k.

13
13 Fermats and Eulers Theorems Proof of Fermats theorem Show. {1, 2, …, p-1} = {a mod p, 2a mod p, …, (p-1)a mod p}

14
14 Fermats and Eulers Theorems An alternative form of Fermats Theorem a p a mod p where p is prime and a is any positive integer. Proof If a and p are relatively prime, we get a p a mod p by multiplying a to each side of a p-1 1 mod p. If a and p are not relatively prime, a = cp for some positive integer c. So a p (cp) p 0 mod p and a 0 mod p, which means a p a mod p.

15
15 Fermats and Eulers Theorems An alternative form of Fermats Theorem a p a mod p where p is prime and a is any positive integer. p = 5, a = 33 5 = 243 3 mod 5 p = 5, a = 1010 5 = 100000 10 mod 5 0 mod 5

16
16 Fermats and Eulers Theorems Eulers Totient Function The number of positive integers less than n and relatively prime to n. = 36 37 is prime, so all the positive number from 1 to 36 are relatively prime to 37. = 24 35 = 5×7 1, 2, 3, 4, 6, 8, 9,11, 12, 13, 16, 17, 18, 19, 22, 23, 24, 26, 27, 29, 31, 32, 33, 34

17
17 Fermats and Eulers Theorems How to compute In general, For a prime n, (Z n = {1,2,…, n-1}) For n = pq, p and q are prime numbers and p q

18
18 Fermats and Eulers Theorems Proof of is the number of positive integers less than pq that are relatively prime to pq. can be computed by subtract from pq – 1 the number of positive integers in {1, …, pq – 1} that are not relatively prime to pq. The positive integers that are not relatively prime to pq are a multiple of either p or q. { p, 2p,…,(q – 1)p}, {q, 2q, …,(p – 1)q} There is no same elements in the two sets. So, there are p + q – 2 elements that are not relatively prime to pq. Hence, = pq – 1– (p + q – 2) = pq – p – q +1 = (p – 1)(q – 1)

19
19 Fermats and Eulers Theorems Φ(21) = Φ(3)×Φ(7) = (3-1)×(7-1) = 2 ×6 = 12 Z 21 ={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20} Φ(3)={3,6,9,12,15,18} Φ(7)={7,14} where the 12 integers are {1,2,4,5,8,10,11,13,16,17,19,20}

20
20 Fermats and Eulers Theorems Eulers theorem For every a and n that are relatively prime: a = 3;n = 10;Φ(10) = 4;3 4 = 81 1 mod 10 a = 2;n = 11;Φ(11) = 10;2 10 = 1024 1 mod 11

21
21 Fermats and Eulers Theorems Proof of Eulers theorem If n is prime, it holds due to Fermats theorem. Otherwise (If n is not prime), define two sets R and S. show the sets R and S are the same. then, show

22
22 Fermats and Eulers Theorems Proof of Eulers theorem Set R The elements are positive integers less than n and relatively prime to n. The number of elements is R={x 1, x 2,…, x Φ(n) } where x 1 < x 2 <…< x Φ(n) Set S Multiplying each element of R by a R modulo n S ={(ax 1 mod n), (ax 2 mod n),…(ax Φ(n) mod n)}.

23
23 Fermats and Eulers Theorems Proof of Eulers theorem The sets R and S are the same. We show S has all integers less than n and relatively prime to n. S ={(ax 1 mod n), (ax 2 mod n),…(ax Φ(n) mod n)} 1. All the elements of S are integers less than n that are relatively prime to n because a is relatively prime to n and x i is relatively prime to n, ax i must also be relatively prime to n. 2. There are no duplicates in S. If ax i mod n = ax j mod n, then x i = x j. by cancellation law.

24
24 Fermats and Eulers Theorems Proof of Eulers theorem Since R and S are the same sets,

25
25 Fermats and Eulers Theorems Alternative form of the theorem If a and n are relatively prime, it is true due to Eulers theorem. Otherwise, ….

26
26 Fermats and Eulers Theorem The validity of RSA algorithm Given 2 prime numbers p and q, and integers n = pq and m, with 0

27
27 Fermats and Eulers Theorem Case 1: m is a multiple of p m=cp for some positive integer c. gcd(m, q)=1, otherwise, m is a multiple of p and q and yet m

28
28 Fermats and Eulers Theorem Case 2: m is a multiple of q prove similarly. Thus, the following equation is proved.

29
29 Fermats and Eulers Theorem An alternative form of this corollary is directly relevant to RSA.

Similar presentations

OK

Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.

Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Template download ppt on pollution Ppt on case study of tqm Ppt on lifelines of national economy for class 10 Differential display ppt online Ppt on human eye and colourful world Ppt on the articles of confederation Ppt on weather and climate for kids Ppt on eia report natural gas Ppt on land and sea breeze Human body systems for kids ppt on batteries