a = mq + r where 0 r m 1.

Similar documents
LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

Lecture 4: Number theory

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Summary Slides for MATH 342 June 25, 2018

Theory of Numbers Problems

2 More on Congruences

The Chinese Remainder Theorem

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

A Guide to Arithmetic

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Chapter 5. Modular arithmetic. 5.1 The modular ring

A Readable Introduction to Real Mathematics

Part V. Chapter 19. Congruence of integers

Part IA Numbers and Sets

The Chinese Remainder Theorem

CPSC 467b: Cryptography and Computer Security

Monoids. Definition: A binary operation on a set M is a function : M M M. Examples:

I216e Discrete Math (for Review)

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

The group (Z/nZ) February 17, In these notes we figure out the structure of the unit group (Z/nZ) where n > 1 is an integer.

Number Theory and Algebra: A Brief Introduction

Math 314 Course Notes: Brief description

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Math 120 HW 9 Solutions

The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

Discrete Mathematics with Applications MATH236

PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012

CPSC 467b: Cryptography and Computer Security

Smol Results on the Möbius Function

MODEL ANSWERS TO THE FIRST HOMEWORK

Homework #2 solutions Due: June 15, 2012

A Few Primality Testing Algorithms

D-MATH Algebra II FS18 Prof. Marc Burger. Solution 26. Cyclotomic extensions.

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

Number Theory and Group Theoryfor Public-Key Cryptography

Part II. Number Theory. Year

I Foundations Of Divisibility And Congruence 1

Basic elements of number theory

Basic elements of number theory

Elementary Number Theory Review. Franz Luef

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

Congruences and Residue Class Rings

Math 324, Fall 2011 Assignment 6 Solutions

A SURVEY OF PRIMALITY TESTS

NOTES ON FINITE FIELDS

5 Group theory. 5.1 Binary operations

Objective Type Questions

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Theory of RSA. Hiroshi Toyoizumi 1. December 8,

MODEL ANSWERS TO HWK #10

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Notes on Primitive Roots Dan Klain

Chapter 1 : The language of mathematics.

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

Primitive Lambda-Roots. Peter J. Cameron and D. A. Preece

Automorphism Groups Definition. An automorphism of a group G is an isomorphism G G. The set of automorphisms of G is denoted Aut G.

Discrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Mathematics for Cryptography

Applied Cryptography and Computer Security CSE 664 Spring 2018

Signature: (In Ink) UNIVERSITY OF MANITOBA TEST 1 SOLUTIONS COURSE: MATH 2170 DATE & TIME: February 11, 2019, 16:30 17:15

Math 109 HW 9 Solutions

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

1 Structure of Finite Fields

Numbers and their divisors

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

GRE Subject test preparation Spring 2016 Topic: Abstract Algebra, Linear Algebra, Number Theory.

Euler s, Fermat s and Wilson s Theorems

Number Theory. Modular Arithmetic

Quizzes for Math 401

MATH 25 CLASS 12 NOTES, OCT Contents 1. Simultaneous linear congruences 1 2. Simultaneous linear congruences 2

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

CPSC 467: Cryptography and Computer Security

ALGEBRA I (LECTURE NOTES 2017/2018) LECTURE 9 - CYCLIC GROUPS AND EULER S FUNCTION

Course 2316 Sample Paper 1

Discrete Mathematics. Dr. J. Saxl. Michælmas These notes are maintained by Paul Metcalfe. Comments and corrections to

K. Ireland, M. Rosen A Classical Introduction to Modern Number Theory, Springer.

Part IA. Numbers and Sets. Year

The primitive root theorem

A BRIEF INTRODUCTION TO LOCAL FIELDS

ABSTRACT NONSINGULAR CURVES

Section 10: Counting the Elements of a Finite Group

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

ECEN 5022 Cryptography

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Number Theory. Henry Liu, 6 July 2007

LECTURE NOTES IN CRYPTOGRAPHY

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

Section 11 Direct products and finitely generated abelian groups

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

HOMEWORK 4 SOLUTIONS TO SELECTED PROBLEMS

How many units can a commutative ring have?

Notes on Systems of Linear Congruences

Introduction to Number Theory 1. c Eli Biham - December 13, Introduction to Number Theory 1

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Carmen s Core Concepts (Math 135)

Part IA Numbers and Sets

COUNTING SEPARABLE POLYNOMIALS IN Z/n[x]

Transcription:

8. Euler ϕ-function We have already seen that Z m, the set of equivalence classes of the integers modulo m, is naturally a ring. Now we will start to derive some interesting consequences in number theory. It is clear that the equivalence classes are represented by the integers from zero to m 1, [0], [1], [2], [3],..., [m 1]. Indeed, if a is any integer we may divide m into a to get a quotient and a remainder, In this case a = mq + r where 0 r m 1. [a] = [r]. From the point of view of number theory it is very interesting to write down other sets of integers with the same properties. Definition 8.1. A set S of integers is called a complete residue system, modulo m, if every integer a Z is equivalent, modulo m, to exactly one element of S. We have already seen that { r Z 0 r m 1 } = { 0, 1, 2,..., m 2, m 1 } is a complete residue system. Sometimes it is convenient to shift so that 0 is in the centre of the system { r Z m/2 < r m/2 } = {..., 2, 1, 0, 1, 2,... }. For example if m = 5 we would take 2, 1, 0, 1 and 2 and if m = 8 we would take 3, 2, 1, 0, 1, 2, 3 and 4. Fortunately it is very easy to determine if a set S is a complete residue system: Lemma 8.2. Let S Z be a subset of the integers and let m be a non-negative integer. If any two of the following two conditions hold then so does the third, in which case S is a complete residue system. (1) S has m elements. (2) No two different elements of S are congruent. (3) Every integer is congruent to at least one element of S. Proof. We have already seen that S 0 = { r Z 0 r m 1 } = { 0, 1, 2,..., m 2, m 1 } is a complete residue system. Clearly S 0 has m elements. Note that there is a natural map f : S S 0, 1

which sends an element a of S to its residue modulo m. Note that (1) holds if and only if S and S 0 have the same number of elements; (2) holds if and only if f is injective and (3) holds if and only if f is surjective. It is then easy to see that any two of (1), (2) and (3) imply the third. We can use (8.2) to prove a nice: Theorem 8.3. Let m be a positive integer and let a 1, a 2,..., a m is a complete residue system, modulo m. Suppose that b and k Z and (k, m) = 1. Then ka 1 + b, ka 2 + b,..., ka m + b, is also a complete residue system, modulo m. Proof. Note that if ka i + b = ka j + b then a i = a j. Thus ka 1 + b, ka 2 + b,..., ka m + b, is a sequence of m distinct integers. We check that (2) of (8.2) also holds. Suppose that ka i + b ka j + b mod m. Then certainly ka i ka j mod m. As (k, m) = 1, it follows by (7.11) that a i a j mod m. We shall start dropping any reference to equivalence classes when we work in the ring Z m. This is purely a matter of notational convenience. The ring Z m has two operations, addition and multiplication. Note that 1 2 = 1 + 1 3 = 2 + 1 = 1 + 1 + 1 4 = 3 + 1 = 1 + 1 + 1 + 1, and so on, give all the elements of Z m under addition. The group Z m under addition is called cyclic and 1 is called a generator. It is more interesting to figure out what happens under multiplication. If p is a prime then the non-zero elements of Z p are a group under multiplication. We will see that it is always cyclic. 2

For example, suppose we take p = 7. We have Thus 2 2 = 4 2 3 = 8 1 mod 7. 2 4 = 2 2 3 = 2 1 = 2. If we keep going we will just get 1, 2 and 4 (there is a reason it is called cyclic). Thus 2 is not a generator. Now consider 3 instead of 2. We have 3 2 = 9 2 mod 7 3 3 = 3 2 = 6 3 4 = 3 6 = 4 3 5 = 5 and 3 6 = 1. Thus the non-zero elements of Z 7 is a cyclic group with generator 3 (but not 2). For general m, the non-zero elements of Z m do not form a group under multiplication. We have already seen that the product of two elements might be zero, so that the set of non-zero elements is not closed under multiplication. Definition 8.4. Let m > 1 be an integer. U m is the set of units of Z m. It is not hard to check that U m is a group under multiplication. Definition 8.5. The Euler ϕ-function ϕ: N N just sends m to the cardinality of U m. If p is a prime then every non-zero element of Z p is a unit, so that ϕ(p) = p 1. Lemma 8.6. Let m > 1 and a Z be integers. Then [a] is a unit if and only if (a, m) = 1. Proof. If (a, m) = 1 then we can find integers λ and µ such that In this case Thus [λ] is the inverse of [a]. 1 = λa + µm. 1 = [1] = [λa + µm] = [λ][a] + [µ][m] = [λ][a]. 3

Conversely, suppose that [a] is a unit. Then we can find an integer b such that [a][b] = 1. It follows that ab 1 mod m, that is, ab 1 is divisible by m. Thus ab 1 = km, for some integer k. Rearranging, we get Thus (a, m) = 1. 1 = ( b)a + km. Lemma 8.7. If m is a natural number then ϕ(m) is the number of integers a from 0 to m 1 coprime to m. Proof. The elements of Z m are represented by the integers a from 0 to m 1 and [a] is a unit if and only if it is coprime to m. This gives an easy way to compute the Euler ϕ-function, at least for small values of m. Suppose m = 6. Of the integers 0, 1, 2, 3, 4 and 5, only 1 and 5 are coprime to 6. Thus ϕ(6) = 2. Definition 8.8. A set S of integers is called a reduced residue system, modulo m, if every integer coprime to m is equivalent to exactly one element of m. Lemma 8.9. Let S Z be a subset of the integers and let m be a non-negative integer. If any two of the following two hold conditions then so does the third, in which case S is a reduced residue system. (1) S has ϕ(m) elements. (2) No two different elements of S are congruent. (3) Every is congruent to at least one element of S. Proof. A simple variation of the proof of (8.2) Theorem 8.10. Let m be a positive integer and let a 1, a 2,..., a ϕ(m) is a reduced residue system, modulo m. If k Z is the coprime to m then ka 1, ka 2,..., ka ϕ(m) is also a reduced residue system, modulo m. Proof. Similar, and simpler, than the proof of (8.3). Definition 8.11. We say that a function f : N N is multiplicative if f(mn) = f(m)f(n), whenever m and n coprime. Theorem 8.12. ϕ is multiplicative. 4

Proof. Suppose that m = 1. Then mn = 1 n = n so that φ(m)φ(n) = φ(1)φ(n) = φ(n) = φ(1 n) = φ(mn). Thus the result holds if m = 1. Similarly the result holds if n = 1. Thus we may assume that m and n > 1. Consider the array 0 1 2... m 1 m m + 1 m + 2... m + (m 1)....... (n 1)m (n 1)m + 1 (n 1)m + 2... (n 1)m + (m 1). The last entry is nm 1 and so this is a complete residue system, modulo mn. Therefore ϕ(mn) is the number of elements of the array comprime to mn. Pick a column and suppose the first entry is a. The other entries in that column are m + a, 2m + a,..., (n 1)m + a and so every entry in that column is congruent to a modulo m. So if a is not coprime to m then no entry in that column is coprime to m, let alone mn. Thus we can focus on those columns whose first entry a is coprime to a. The first row is a complete residue system modulo m, so that ϕ(m) elements of the first row are coprime to m. Thus there are only ϕ(m) columns we need to focus on. On the other hand, the entries in this column are the numbers m 1 + a, m 2 + a, m 3 + a, and so they are a complete residue system modulo n, by (8.3). Thus ϕ(n) elements of this column are coprime to n. Thus ϕ(m)ϕ(n) elements of the array are coprime to both m and n. But as m and n are coprime, it follows that an integer l is coprime to mn if and only if it is coprime to m and n. Thus ϕ(m)ϕ(n) elements of the array are coprime to mn. Multiplicative functions are relatively easy to compute; if n = p e 1 1 p e 2 2... p en n is the prime factorisation of n and f is multiplicative then Therefore it suffices to compute where p is a prime. f(n) = f(p e 1 1 )f(p e 2 2 )... f(p en n ). f(p e ), 5

Lemma 8.13. If p is a prime then ϕ(p e ) = p e p e 1. Proof. Consider the numbers from to 1 to p e. These are a complete residue system. Now a is coprime to p e if and only if it is coprime to p. In other words, a is not coprime to p e if and only if it is a multiple of p. Of the numbers from 1 to p e, exactly p e p = pe 1. are multiples of p. Therefore the remaining numbers are coprime to p e. p e p e 1 Theorem 8.14. If n = p e 1 1 p e 2 2... p en n is the prime factorisation of n then ϕ(n) = (p e 1 1 p e 1 1 1 )(p e 2 2 p e 2 1 2 )... (p en n p en 1 n ). Question 8.15. How many units are there in the ring Z 1656? In other words, what is the cardinality of U 1656? This is the same as ϕ(1656). We first factor 1656. We have 1656 = 2 828 = 2 2 414 = 2 3 207 = 2 3 3 69 = 2 3 3 2 23. ϕ(1656) = ϕ(2 3 3 2 23) = ϕ(2 3 )ϕ(3 2 )ϕ(23) = (2 3 2 2 )(3 2 3)(23 1) = 4 6 22 = 2 4 3 11 = 528. 6