Discrete Mathematics with Applications MATH236

Similar documents
Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236

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

1 Structure of Finite Fields

Chapter 5. Modular arithmetic. 5.1 The modular ring

MATH 420 FINAL EXAM J. Beachy, 5/7/97

4 Powers of an Element; Cyclic Groups

Groups in Cryptography. Çetin Kaya Koç Winter / 13

5 Group theory. 5.1 Binary operations

Mathematics for Cryptography

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

Euler s, Fermat s and Wilson s Theorems

Homework #2 solutions Due: June 15, 2012

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

Wilson s Theorem and Fermat s Little Theorem

NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS

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

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

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

Number Theory Proof Portfolio

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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.

Kevin James. MTHSC 412 Section 3.4 Cyclic Groups

MTH 346: The Chinese Remainder Theorem

Basic elements of number theory

Basic elements of number theory

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

MATH 25 CLASS 21 NOTES, NOV Contents. 2. Subgroups 2 3. Isomorphisms 4

Math 4400 First Midterm Examination September 21, 2012 ANSWER KEY. Please indicate your reasoning and show all work on this exam paper.

Applied Cryptography and Computer Security CSE 664 Spring 2018

Number Theory Math 420 Silverman Exam #1 February 27, 2018

MATH 145 Algebra, Solutions to Assignment 4

Rings and modular arithmetic

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

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

ECEN 5022 Cryptography

Math 546, Exam 2 Information.

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

) = 1, ) = 2, and o( [ 11]

Foundations of Cryptography

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

A Readable Introduction to Real Mathematics

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Math Exam 1 Solutions October 12, 2010

Algebraic Structures Exam File Fall 2013 Exam #1

Ma/CS 6a Class 2: Congruences

Carmen s Core Concepts (Math 135)

Lecture 4: Number theory

0 Sets and Induction. Sets

LECTURE NOTES IN CRYPTOGRAPHY

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

MATH 430 PART 2: GROUPS AND SUBGROUPS

Ma/CS 6a Class 2: Congruences

Number Theory Alex X. Liu & Haipeng Dai

Greatest Common Divisor MATH Greatest Common Divisor. Benjamin V.C. Collins, James A. Swenson MATH 2730

CHAPTER 3. Congruences. Congruence: definitions and properties

ECE596C: Handout #11

Number Theory Notes Spring 2011

1 2 3 style total. Circle the correct answer; no explanation is required. Each problem in this section counts 5 points.

A SURVEY OF PRIMALITY TESTS

Notes on Primitive Roots Dan Klain

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

( ) 3 = ab 3 a!1. ( ) 3 = aba!1 a ( ) = 4 " 5 3 " 4 = ( )! 2 3 ( ) =! 5 4. Math 546 Problem Set 15

Public-key Cryptography: Theory and Practice

Introduction to Public-Key Cryptosystems:

Cyclic Group Supplement. g = g k : k Z.

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

Math 312/ AMS 351 (Fall 17) Sample Questions for Final

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

Congruences and Residue Class Rings

3 The fundamentals: Algorithms, the integers, and matrices

Numbers. Çetin Kaya Koç Winter / 18

Congruence of Integers

Notes on Systems of Linear Congruences

3.2 Solving linear congruences. v3

NOTES ON SIMPLE NUMBER THEORY

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

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

Math 109 HW 9 Solutions

Topics in Cryptography. Lecture 5: Basic Number Theory

Number Theory and Group Theoryfor Public-Key Cryptography

Some Facts from Number Theory

Numbers, Groups and Cryptography. Gordan Savin

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

Beautiful Mathematics

For your quiz in recitation this week, refer to these exercise generators:

Simultaneous Linear, and Non-linear Congruences

Elementary Number Theory Review. Franz Luef

Objective Type Questions

Math 3121, A Summary of Sections 0,1,2,4,5,6,7,8,9

Part V. Chapter 19. Congruence of integers

MATH 310: Homework 7

1 Overview and revision

On the number of semi-primitive roots modulo n

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

Part II. Number Theory. Year

MATH 433 Applied Algebra Lecture 19: Subgroups (continued). Error-detecting and error-correcting codes.

FROM GROUPS TO GALOIS Amin Witno

Transcription:

Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet (UKZN) MATH236 Semester 1, 2013 1 / 28

Table of contents 1 Fermat and Euler Theorems 2 Groups Tong-Viet (UKZN) MATH236 Semester 1, 2013 2 / 28

Fermat and Euler Theorems Fermat Theorem Theorem (Fermat) If a is a positive integer and p is a prime number, then a p a (mod p) Tong-Viet (UKZN) MATH236 Semester 1, 2013 3 / 28

Fermat and Euler Theorems Euler Theorem Theorem (Euler) Let a, m be integers with m 2 and gcd(a, m) = 1. Then a φ(m) 1 (mod m). Tong-Viet (UKZN) MATH236 Semester 1, 2013 4 / 28

Fermat and Euler Theorems Euler Theorem Proof. 1 Let s 1, s 2,, s φ(m) be the φ(m) integers in {1, 2,, m 1} that are relatively prime to m 2 For each i with 1 i φ(m), let as i = q i m + r i where 0 r i m. 3 We claim that {s 1, s 2,, s φ(m) } = {r 1, r 2,, r φ(m) } 4 Since each r i {0, 1,, m 1} and there are exactly φ(m) integers in {0, 1,, m 1} that are relatively prime to m, we need to prove two things: 5 (1) all the numbers r 1, r 2,, r φ(m) are pairwise distinct 6 (2) for each i, we have gcd(m, r i ) = 1. Tong-Viet (UKZN) MATH236 Semester 1, 2013 5 / 28

Fermat and Euler Theorems Euler Theorem Proof. 1 We first prove (1). 2 Suppose that there exist i j such that r i = r j where 1 i, j φ(m) 3 WLOG, we assume that s i > s j. 4 Then a(s i s j ) = as i as j = (q i q j )m. 5 Since gcd(a, m) = 1, a has a multiplicative inverse a 1 in Z m. 6 Hence s i s j = a 1 (q i q j )m. 7 Thus m s i s j 8 But 0 < s j < s i < m, so 1 s i s j < m, so m cannot divide s i s j, a contradiction. 9 Thus if i j, then r i r j. Tong-Viet (UKZN) MATH236 Semester 1, 2013 6 / 28

Fermat and Euler Theorems Euler Theorem Proof. 1 We now prove (2) 2 Suppose that gcd(r i, m) > 1 for some i 3 Then p r i and p m for some prime p 4 Hence p divides q i m + r i and so p as i 5 It follows that p a or p s i 6 Hence gcd(a, m) > 1 or gcd(s i, m) > 1 which contradicts our assumption Tong-Viet (UKZN) MATH236 Semester 1, 2013 7 / 28

Euler Theorem Fermat and Euler Theorems Proof. 1 Thus we have proved that {s 1, s 2,, s φ(m) } = {r 1, r 2,, r φ(m) } 2 We have a φ(m) s 1 s 2 s φ(m) = (as 1 )(as 2 ) (as φ(m) ) r 1 r 2 r φ(m) (mod m) s 1 s 2 s φ(m) (mod m) 3 Since each s i is relatively prime to m, each s i has a multiplicative inverse s 1 i. 4 Multiplying both sides of the last equation by s 1 φ(m) s 1 2 s 1 1, we have a φ(m) 1 (mod m) Tong-Viet (UKZN) MATH236 Semester 1, 2013 8 / 28

Fermat and Euler Theorems Fermat s Little Theorem Corollary Let a be a positive integer and p be a prime number such that gcd(a, p) = 1. Then a p 1 1 (mod p). Example Find 100 25 mod 7. Proof. Since gcd(100, 7) = 1, by Fermat theorem, we have 100 7 1 = 100 6 1 (mod 7). We see that 25 = 6 4 + 1 so 100 25 = 100 6 4+1 = (100 6 ) 4 100 100 2 (mod 7) Tong-Viet (UKZN) MATH236 Semester 1, 2013 9 / 28

Fermat and Euler Theorems Example Example Solve the congruence x 4 301 (modd 13) Fermat s Little Theorem implies that 4 12 1 (mod 13) since gcd(4, 11) = 1 We have 300 = 12 25 + 1 so 4 301 = (4 12 ) 25 4 1 25 4 4 (mod 13) Hence x = 4 Z 13 Tong-Viet (UKZN) MATH236 Semester 1, 2013 10 / 28

Fermat and Euler Theorems Finding Multiplicative Inverses Corollary If a, m Z, m 2 and gcd(a, m) = 1, then a 1 = a φ(1) 1 is the multiplicative inverse in Z m of a. Proof. Since a φ(m) 1 a = a φ(m) 1 (mod m), the result follows. Example Find 3 1 in Z 10. Tong-Viet (UKZN) MATH236 Semester 1, 2013 11 / 28

Fermat and Euler Theorems Finding Multiplicative Inverses Proof. We have 3 1 = 3 φ(10) 1 = 3 3 = 7 in Z 10. We can check that 3 7 = 21 1 (mod 10) and hence 3 1 = 7 in Z 10 Example Find 7 1 in Z 25. Tong-Viet (UKZN) MATH236 Semester 1, 2013 12 / 28

Fermat and Euler Theorems Finding Multiplicative Inverses Proof. We have 7 1 = 7 φ(25) 1 = 7 20 1 = 7 19 18 (mod 25) Example Solve the congruence equation ax b (mod m) where gcd(a, m) = 1. Tong-Viet (UKZN) MATH236 Semester 1, 2013 13 / 28

Fermat and Euler Theorems Linear congruence equations Example Since a φ(m) 1 (mod m) We have x a φ(m) x (mod m) a φ(m) 1 ax (mod m) a φ(m) 1 b (mod m) Solve the congruence 7x 4 (mod 10) Tong-Viet (UKZN) MATH236 Semester 1, 2013 14 / 28

Fermat and Euler Theorems Linear congruence equations Since gcd(7, 10) = 1, the solution is x 7 φ(10) 1 4 (mod 10) 7 3 4 (mod 10) 343 4 (mod 10) 1372 (mod 10) 2 (mod 10) We can check that 7 2 = 14 4 (mod 10). So x = 2 is a solution of this congruence. Tong-Viet (UKZN) MATH236 Semester 1, 2013 15 / 28

Groups Definition of Groups Definition A group is an ordered pair (S, ), where S is a nonempty set and is a binary operation on S such that the following conditions hold: 1 S is closed under 2 is associative, that is, for all x, y, z S, (x y) z = x (y z) 3 There is a unique element e S such that for all x S, x e = e x = x. The element e is called the identity of S. 4 For every x S, there is a unique element x 1 S such that x x 1 = x 1 x = e. Tong-Viet (UKZN) MATH236 Semester 1, 2013 16 / 28

Groups Definition of Groups In addition, if x y = y x for all x, y S, then (S, ) is called an abelian group. A group (S, ) is called a finite group if S = n is finite. Otherwise, it is called an infinite group S is called the order of the group (S, ) Tong-Viet (UKZN) MATH236 Semester 1, 2013 17 / 28

Groups Examples of Groups Example (Z, +) is an abelian group. The identity element e is the number 0 since x + 0 = 0 + x = x for all x Z + is associative in Z since (x + y) + z = x + (y + z) for all x, y, z Z The inverse of x Z is x since x + ( x) = ( x) + x = 0 Furthermore, x + y = y + x for all x, y Z So (Z, +) is an abelian group. Tong-Viet (UKZN) MATH236 Semester 1, 2013 18 / 28

Groups Examples of Groups Example (Z, ) is not a group. The number 1 is the identity However 2 does not have an inverse in Z under So (Z, ) is not a group. Tong-Viet (UKZN) MATH236 Semester 1, 2013 19 / 28

Groups Examples of Groups Example (Q, ) is an abelian group, where Q = Q {0}. is obviously associative in Q The identity element is 1 For any x Q, x 1 Q exists and x x 1 = 1 for any x, y Q, we have x y = y x Hence (Q, ) is an abelian group Tong-Viet (UKZN) MATH236 Semester 1, 2013 20 / 28

Groups Examples of Groups Example (General Linear Groups) Let n 1 be an integer. Denote by GL n (R) the set of all invertible n n matrices with entries from R. Then GL n (R) together with the operation of matrix multiplication is a group, which is called the general linear group. The identity element is the n n identity matrix I n The group inverse of a matrix A GL n (R) is its matrix inverse A 1. Tong-Viet (UKZN) MATH236 Semester 1, 2013 21 / 28

Groups Examples of Groups Example (Special Linear Groups) For n 1 be an integer. Denote by SL n (R) the subset of GL n (R) consisting of all those invertible n n matrices with determinant 1. Then SL n (R) is a group called the special linear group. Example For n 1 an integer, (Z n, +) is an abelian group, where + denotes addition modulo n. The identity element is the number 0. The inverse of x Z n is the unique number y Z n such that x + y 0 (mod n). Tong-Viet (UKZN) MATH236 Semester 1, 2013 22 / 28

Groups Element orders Definition Let (S, e) be a finite group with identity e. 1 Let a S. The order of a, denoted by a or o(a), is the smallest positive integer k such that a k = e. 2 A group (S, ) is called a cyclic group if there is an element a S such that the order of a is exactly S. In this case, a is called a generator of S. 3 If (S, ) is a cyclic group, then any element x S with x = S is also called a generator of S. Tong-Viet (UKZN) MATH236 Semester 1, 2013 23 / 28

Groups The multiplicative group Example For a positive integer n, the multiplicative group of Z n is Z n = {a Z n : gcd(a, n) = 1} the group operation is multiplication modulo n The identity in Z n is the number 1 Every element a Z n has an inverse The order of Z n is φ(n) If p is a prime, then Z p = Z p {0} = {1, 2,, p 1} Tong-Viet (UKZN) MATH236 Semester 1, 2013 24 / 28

The multiplicative group Groups Example Consider the group Z 15 We have Z 15 = {1, 2, 4, 7, 8, 11, 13, 14} Z 15 = 8 = φ(15) = 15(1 1 3 )(1 1 5 ) Order of 2 Z 15 Thus 2 = 4 in Z 15. k 2 k mod 15 1 2 2 4 3 8 4 1 Tong-Viet (UKZN) MATH236 Semester 1, 2013 25 / 28

Groups The multiplicative group Orders of elements in Z 15 a 1 2 4 7 8 11 13 14 a 1 4 2 4 4 2 4 2 Z 15 is not cyclic as there is no elements whose order is 8 = Z 15 If (S, ) is a finite group and a S, then a divides S. This is a corollary of Lagrange s Theorem in Group Theory. We are interested in the case Z p where p is a prime In this case, Z p is a cyclic group of order φ(p) = p 1 If a is a generator for Z p, then a k is also a generator of Z p whenever gcd(k, p 1) = 1 and so Z p has φ(p 1) generators. Tong-Viet (UKZN) MATH236 Semester 1, 2013 26 / 28

Finding generators Groups Theorem Suppose that p is a prime and α Z p. Then α is a generator of Z p if and only if α (p 1)/q 1 (mod p) for all primes q such that q (p 1). Tong-Viet (UKZN) MATH236 Semester 1, 2013 27 / 28

Finding generators Groups Example Consider the group Z 37. We have 37 1 = 36 = 22 3 2. For α Z 37, we need to compute α 36/2 (mod 37) α 36/3 (mod 37) If all the results are not trivial, then α is a generator of Z 37. We have 2 18 36 and 2 12 26 (mod 37), so 2 is a generator of Z 37 However 4 18 1 and 4 12 10 (mod 37), so 4 is NOT a generator of Z 37 Is 31 a generator of Z 37? Tong-Viet (UKZN) MATH236 Semester 1, 2013 28 / 28