Chapter 8 Introduction to Number Theory. 2 Contents Prime Numbers Fermats and Eulers Theorems.

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Multiplying binomials You will have 20 seconds to answer each of the following multiplication problems. If you get hung up, go to the next problem when.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
ZMQS ZMQS
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
PP Test Review Sections 6-1 to 6-6
ABC Technology Project
EU market situation for eggs and poultry Management Committee 20 October 2011.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
2 |SharePoint Saturday New York City
VOORBLAD.
Factors, Prime Numbers & Composite Numbers
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Squares and Square Root WALK. Solve each problem REVIEW:
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
Addition 1’s to 20.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
25 seconds left…...
Subtraction: Adding UP
Test B, 100 Subtraction Facts
Week 1.
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
1 Chapter 13 Nuclear Magnetic Resonance Spectroscopy.
Energy Generation in Mitochondria and Chlorplasts
Chapter 3 Public Key Cryptography and RSA Lecture slides by Lawrie Brown Modifications by Nguyen Cao Dat.
Cryptography and Network Security Chapter 8 Fourth Edition by William Stallings.
Opening quote. A number of concepts from number theory are essential in the design of public-key cryptographic algorithms, which this chapter will introduce.
Presentation transcript:

Chapter 8 Introduction to Number Theory

2 Contents Prime Numbers Fermats and Eulers Theorems

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 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; = 7 × 11 2 ×13

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 = 2 4 ×3 2 ×5 2 ×7 0 ×11 0 ×….

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 Prime Numbers Multiplication Multiplication of two numbers is adding the corresponding exponents. k = 12 × 18 = = 2 2 × = 2 1 × = 2 3 × 3 3

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 Prime Numbers GCD k = gcd (a, b) k p = min(a p, b p ) for all p 300 = 2 2 ×3 1 × = 2 1 ×3 2 ×5 0 gcd (18, 300) = 2 1 ×3 1 ×5 0 = 6

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 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 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 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 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 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 = mod 5 p = 5, a = = mod 5 0 mod 5

16 Fermats and Eulers Theorems Eulers Totient Function The number of positive integers less than n and relatively prime to n. = is prime, so all the positive number from 1 to 36 are relatively prime to 37. = = 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 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 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 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 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 = mod 11

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 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 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 Fermats and Eulers Theorems Proof of Eulers theorem Since R and S are the same sets,

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 Fermats and Eulers Theorem The validity of RSA algorithm Given 2 prime numbers p and q, and integers n = pq and m, with 0<m<n, the following relationship holds. If m and n are re relatively prime, it holds by Eulers theorem. If m and n are not relatively prime, m is a multiple of either p or q.

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<pq because gcd(m, q)=1, Eulers theorem holds by the rules of modular arithmetic, Multiplying each side by m=cp

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

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