SESAME Modular Arithmetic. MurphyKate Montee. March 2018 IN,Z, We think numbers should satisfy certain rules, which we call axioms:

Size: px
Start display at page:

Download "SESAME Modular Arithmetic. MurphyKate Montee. March 2018 IN,Z, We think numbers should satisfy certain rules, which we call axioms:"

Transcription

1 SESAME Modular Arithmetic MurphyKate Montee March 08 What is a Number? Examples of Number Systems: We think numbers should satisfy certain rules which we call axioms: Commutivity Associativity 3 Existence of an Identity Existence of Inverses Usually we want our numbers to satisfy these rules for two operations: addition and multiplication If a set of numbers satisfies these rules for one operation we call them a: If a set of numbers satisfies these rules for two operations (except that the additive identity has no multiplicative inverse) we call them a: Commutative Group IN Z Examples Q R modular sword modular 6 World ring NonExamples Commutative / t ) % noinvwses! group Ring I Q tin +x ) modular 5 World modular 6 World

2 ' Arithmetic Modulo 5 In the system arithmetic modulo 5 there are 5 numbers : 0 3 and they follow the rule of addition around a circle 05 3 / In algebraic terms we say that two integers are equivalent mod 5 if they di er by a multiple of 5 We write this with a triple equals sign: If it is not totally clear we can write (mod 5) at the end \z i Examples: (mod 5) 3+7 (mod D 3 FF ' 5) +3 3 (mod 5) 3 Mj ; z z z ' We can fill in an addition table to help our calculations: I I 3 0 I 3 Question: Does this satisfy our axioms? because Commutative Yes! O Inverse Identity symmetric over diagonal is a 0 in exist because there and column each row

3 3 Subtraction Modulo 5 We want our subtraction to work like it does in the integers: 5+! 5 and 5 In the modulo 5 world we can use the addition table to help us Example: What is 0 (mod 5)? Since + 0 (mod 5) then 0 (mod 5) You try: 3 0 Since + since : + E 0 Mutiplication Modulo 5 We use the same rule as before: two integers are equivalent modulo 5 if they di er by a multiple of 5 Notice that you can still use the circle to help you * o* Example: 3 6 and 6 (5) + so 6 (mod 5) Therefore: 3 (mod 5) Example: 3 and (5) + so (mod 5) Therefore: 3 (mod 5) Notice that just like in the integers! 3 ( 3) 3

4 So O I Name at least three patterns that you see in the multiplication table: each number shows row and column 0 are all 0 rows come in paired Symmetric over up exactly once in each now and column minor diagonal images Kandis land ) Definition: A number k is a square root of n if k n Question: What elements in modulo 5 arithmetic have square roots? Which have cubed roots? Fourth roots? The numbers on the main diagonal and 3 aren't on the diagonal so they are squares aren't squares so every number is a cube! If n ekt a square then n(k so ho or! n is a square of

5 5 Division Modulo 5 Just like subtraction we can use the multiplication table to help us divide Remember that 3 3 so we can say that 3 is the number n such that 3n Example: Since 3 6 (mod 5) (mod 5) 3 Example: Since 3 (mod 5) 3 (mod 5) You try: Calculate the following in modulo 5 arithmetic 3 FX 3 then use the multiplication table! 3 3 Ex 3 : + El!! 5

6 But 6 What s So Special About 5? Why should 5 have all the fun? You know from your last homework that you can play these games with 6 too Why not any integer? Fill in the following tables for modulo 6 arithmetic: I O Y I g Questions: What patterns are the same as the modulo 5 world? What are di erent? The addition tables au similar! But every the how very the mod 6 MWH table not has have 3 numbers number! Some rows way and the row has Zhumbosl What is 5 (mod 6)? We Want EX so 5 Is no such X! Ez DOES modulo 6! in Not there EXIST 6

7 3 In general it is not always fastest to solve a modular arithmetic problem by writing out an entire table We want to use the fact that two integers are equivalent modulo n if they di er by a multiple of n We write that in algebra by the following formula: Ab lmodn ) If A btkn Example: To calculate + 3 (mod 7) I first know that Then 5 (7) + 8 so 5 8 (mod 7) Therefore (mod 7) for some K You try: 6 3 (mod 7) 5 7 (mod 3) + 9 (mod3) ( mod ) C mod 3 ) ( mod 3 ) 7 Calculations in Modular Arithmetic There is more than one way to solve these problems Sometimes one method is faster and sometimes the other Example: Calculate 376 (mod 7) Method Method (calculate then reduce) (reduce then calculate) (7) (b) I 6 ( mod 7 ) zzy } ( mod 7 ) ( mod 7 ) ( mod 'D Example: Calculate (mod 633) Since 63 (mod 633) (mod 633) 7

8 ) You try: Calculate the following: (mod 7) (mod 509) (mod7 ) 367 (mod 369) 7 6 (mod D 5) 507 ( mod 509 ) (mod 00) (mod 7) ) 76( ( mod 369 ) ( ( mod 369 ( ) + ( mod > ) ( mod 7) L mod 509 ) 79 ( mod 5 ) Lmod 00 ) 76 f)3 I E ( mod 00 ) 3 ( mod 5 ) ( modloo ) ) ( mod 7) ( mod 7) 8

9 Then a) 8 Modular Division To solve an equation like x 5 (mod 6) we need division Indeed in this case x 5 (mod 6) But we saw earlier that there is no such number! What s going on? For division to be possible we need: to have every number in every row Fta m Theorem: If p is prime then division is always possible in modulo p arithmentic Proof: Suppose division isn't possible in some how inmate tmminsaomenyauenanapaear So nb " na In ba) 0 That means n ( b So Since is P Prime p But kp for some K is a factor of n or (b a) < and 0 b at p O< n < p that's impossible! 9

10 Question: What if p is not prime? (Hint: Look at the times table for modulo 6 arithmetic and make a hypothesis) Theorem: In arithmetic modulo n for any n we can divide by a if: ( n a) 0

11 9 Modular Division Now that we know when we can divide we want to be able to actually do it If we have a multiplication table it s not too hard But in general this is tricky! Example: Suppose I want to find 7 (mod ) Method : List all the possibilities until you find a solution: # 0 7 : I 6 since 87 ( mod " ) 35 8 ( mod 9 95 )

12 Method : Find the number congruent to modulo which is also a multiple of 7: () + ( not a multiple of 7) () + 3 sits : 3() + () + 5() + Since 8756 El ( mod ) 8 mod )

13 CB ) (6037) ( }_ 3E8x8x+By Method 3: Do both at once! We want a number which is a multiple of 7 and is congruent to modulo That means we need to solve How do you solve this? 7x y + You try: Calculate the following fractions: (mod 69) (mod 3) EUCLIDEAN ALGORITHM Ex so (mod 60) # 69 3 ( 6 )! 76 X so y 6 5 ( 5 ) ( mod b) ) (5) (3) + so X 8 ) 6 So 767 ) And 6 ) ) (6936) ± EhzYmod q#8 () HD 3 Ex mod 60 ) y F_xE35lmodbtIS ) L 9) +8 9 (8) HD (3) 7 60 (760) 8 (6037) So : and 357 Cmod 60 )

14 IM Her 0 Powers in Modular Arithmetic Remember that x a x b x a+b and (x a ) b x ab Calculating large powers is usually very di cult because the numbers quickly get very large But in modular arithmetic we don t have that problem! Example: Calculate 7 (mod ) We could calculate this and then reduce but which is a really big number so that seems like a bad plan Instead let s try to use modular arithmetic to make this a little easier I can write as a sum of powers of : So So: You try: a D 55 (mod 9) 65 (mod 7) lmodh) * ( mod ") I % E 7 ( and 9 ) EZ ( mod 7) ' ( mod 9 ) " iii 7 l mod 9 It ± ) 9 EH E 9 (mod 9) " I 7 l mod " ) 36 E 553 E 7 (77) 656 7H I I D 77 EH 'll 7Cmodl9D ( mod 7) 8 H)E l mod > ) " 36 / ( mod > ' 3

15 ' Theorem (Fermat): If p is prime and p is not a factor of a then a p (modp) Example: Calculate 55 (mod 9) Since 9 is prime and 9 is not a factor of we can use Fermat s Theorem Since 55 3(8) + we get 55 3(8)+ ( 8 ) 3 3 (mod 9) You try: Calculate the following: (mod ) 7 86 (mod 3) 83 (mod 3) ) ( 6 " ) " 633 ' 7lmodD) ' ) 786(7 ) (3) You can also use Fermat s Theorem to find reciprocals Example: Find 8 (mod 9) By Fermat s Theorem 88 (mod 9) so and 8 87 (mod 9) 83(93736) ' ( 6 ) 56 z (6 3 3 ( 9) z 3 9µ@odT) 6(mod3)) 5

1.6 Congruence Modulo m

1.6 Congruence Modulo m 1.6 Congruence Modulo m 47 5. Let a, b 2 N and p be a prime. Prove for all natural numbers n 1, if p n (ab) and p - a, then p n b. 6. In the proof of Theorem 1.5.6 it was stated that if n is a prime number

More information

Modular arithmetic Math 2320

Modular arithmetic Math 2320 Modular arithmetic Math 220 Fix an integer m 2, called the modulus. For any other integer a, we can use the division algorithm to write a = qm + r. The reduction of a modulo m is the remainder r resulting

More information

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation. Congruences A congruence is a statement about divisibility. It is a notation that simplifies reasoning about divisibility. It suggests proofs by its analogy to equations. Congruences are familiar to us

More information

Applications of Fermat s Little Theorem and Congruences

Applications of Fermat s Little Theorem and Congruences Applications of Fermat s Little Theorem and Congruences Definition: Let m be a positive integer. Then integers a and b are congruent modulo m, denoted by a b mod m, if m (a b). Example: 3 1 mod 2, 6 4

More information

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand. Midterm #2: practice MATH 311 Intro to Number Theory midterm: Thursday, Oct 20 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating

More information

Solutions for the 2nd Practice Midterm

Solutions for the 2nd Practice Midterm Solutions for the 2nd Practice Midterm 1. (a) Use the Euclidean Algorithm to find the greatest common divisor of 44 and 17. The Euclidean Algorithm yields: 44 = 2 17 + 10 17 = 1 10 + 7 10 = 1 7 + 3 7 =

More information

Solutions for the Practice Final

Solutions for the Practice Final Solutions for the Practice Final 1. Ian and Nai play the game of todo, where at each stage one of them flips a coin and then rolls a die. The person who played gets as many points as the number rolled

More information

Math 127: Equivalence Relations

Math 127: Equivalence Relations Math 127: Equivalence Relations Mary Radcliffe 1 Equivalence Relations Relations can take many forms in mathematics. In these notes, we focus especially on equivalence relations, but there are many other

More information

Wilson s Theorem and Fermat s Theorem

Wilson s Theorem and Fermat s Theorem Wilson s Theorem and Fermat s Theorem 7-27-2006 Wilson s theorem says that p is prime if and only if (p 1)! = 1 (mod p). Fermat s theorem says that if p is prime and p a, then a p 1 = 1 (mod p). Wilson

More information

Modular Arithmetic. claserken. July 2016

Modular Arithmetic. claserken. July 2016 Modular Arithmetic claserken July 2016 Contents 1 Introduction 2 2 Modular Arithmetic 2 2.1 Modular Arithmetic Terminology.................. 2 2.2 Properties of Modular Arithmetic.................. 2 2.3

More information

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION MATH CIRCLE (BEGINNERS) 02/05/2012 Modular arithmetic. Two whole numbers a and b are said to be congruent modulo n, often written a b (mod n), if they give

More information

6.2 Modular Arithmetic

6.2 Modular Arithmetic 6.2 Modular Arithmetic Every reader is familiar with arithmetic from the time they are three or four years old. It is the study of numbers and various ways in which we can combine them, such as through

More information

MAT Modular arithmetic and number theory. Modular arithmetic

MAT Modular arithmetic and number theory. Modular arithmetic Modular arithmetic 1 Modular arithmetic may seem like a new and strange concept at first The aim of these notes is to describe it in several different ways, in the hope that you will find at least one

More information

Introduction to Modular Arithmetic

Introduction to Modular Arithmetic 1 Integers modulo n 1.1 Preliminaries Introduction to Modular Arithmetic Definition 1.1.1 (Equivalence relation). Let R be a relation on the set A. Recall that a relation R is a subset of the cartesian

More information

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method Exercises Exercises 1. Show that 15 is an inverse of 7 modulo 26. 2. Show that 937 is an inverse of 13 modulo 2436. 3. By inspection (as discussed prior to Example 1), find an inverse of 4 modulo 9. 4.

More information

SOLUTIONS TO PROBLEM SET 5. Section 9.1

SOLUTIONS TO PROBLEM SET 5. Section 9.1 SOLUTIONS TO PROBLEM SET 5 Section 9.1 Exercise 2. Recall that for (a, m) = 1 we have ord m a divides φ(m). a) We have φ(11) = 10 thus ord 11 3 {1, 2, 5, 10}. We check 3 1 3 (mod 11), 3 2 9 (mod 11), 3

More information

Number Theory. Konkreetne Matemaatika

Number Theory. Konkreetne Matemaatika ITT9131 Number Theory Konkreetne Matemaatika Chapter Four Divisibility Primes Prime examples Factorial Factors Relative primality `MOD': the Congruence Relation Independent Residues Additional Applications

More information

Number Theory/Cryptography (part 1 of CSC 282)

Number Theory/Cryptography (part 1 of CSC 282) Number Theory/Cryptography (part 1 of CSC 282) http://www.cs.rochester.edu/~stefanko/teaching/11cs282 1 Schedule The homework is due Sep 8 Graded homework will be available at noon Sep 9, noon. EXAM #1

More information

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00 18.781 Solutions to Problem Set 6 - Fall 008 Due Tuesday, Oct. 1 at 1:00 1. (Niven.8.7) If p 3 is prime, how many solutions are there to x p 1 1 (mod p)? How many solutions are there to x p 1 (mod p)?

More information

Modular Arithmetic. Kieran Cooney - February 18, 2016

Modular Arithmetic. Kieran Cooney - February 18, 2016 Modular Arithmetic Kieran Cooney - kieran.cooney@hotmail.com February 18, 2016 Sums and products in modular arithmetic Almost all of elementary number theory follows from one very basic theorem: Theorem.

More information

Power = 36² mod 99 Power = 9 5 a 5 = 0 x = 81 Power = 9² mod 99 Power = 81 6 a 6 = 1 x = 81 x 81 mod 99 x = 27 7 a 7 = 1 x = 27 x 27 mod 99 x = 36

Power = 36² mod 99 Power = 9 5 a 5 = 0 x = 81 Power = 9² mod 99 Power = 81 6 a 6 = 1 x = 81 x 81 mod 99 x = 27 7 a 7 = 1 x = 27 x 27 mod 99 x = 36 Question 1 Section 4.1 11. What time does a 12-hour clock read a) 80 hours after it reads 11:00? b) 40 hours before it reads 12:00? c) 100 hours after it reads 6:00? I don't really understand this question

More information

Practice Midterm 2 Solutions

Practice Midterm 2 Solutions Practice Midterm 2 Solutions May 30, 2013 (1) We want to show that for any odd integer a coprime to 7, a 3 is congruent to 1 or 1 mod 7. In fact, we don t need the assumption that a is odd. By Fermat s

More information

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013 CMPSCI 250: Introduction to Computation Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013 The Chinese Remainder Theorem Infinitely Many Primes Reviewing Inverses and the Inverse

More information

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = =

1 = 3 2 = 3 ( ) = = = 33( ) 98 = = = Math 115 Discrete Math Final Exam December 13, 2000 Your name It is important that you show your work. 1. Use the Euclidean algorithm to solve the decanting problem for decanters of sizes 199 and 98. In

More information

Modular Arithmetic and Doomsday

Modular Arithmetic and Doomsday Modular Arithmetic and Doomsday Blake Thornton Much of this is due directly to Joshua Zucker and Paul Zeitz. 1. Subtraction Magic Trick. While blindfolded, a magician asks a member from the audience to

More information

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012 CMPSCI 250: Introduction to Computation Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012 The Chinese Remainder Theorem Infinitely Many Primes Reviewing Inverses and the

More information

Numbers (8A) Young Won Lim 6/21/17

Numbers (8A) Young Won Lim 6/21/17 Numbers (8A Copyright (c 2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

MATH 135 Algebra, Solutions to Assignment 7

MATH 135 Algebra, Solutions to Assignment 7 MATH 135 Algebra, Solutions to Assignment 7 1: (a Find the smallest non-negative integer x such that x 41 (mod 9. Solution: The smallest such x is the remainder when 41 is divided by 9. We have 41 = 9

More information

Numbers (8A) Young Won Lim 5/24/17

Numbers (8A) Young Won Lim 5/24/17 Numbers (8A Copyright (c 2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm)

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm) Congruence Solving linear congruences A linear congruence is an expression in the form ax b (modm) a, b integers, m a positive integer, x an integer variable. x is a solution if it makes the congruence

More information

MATH 13150: Freshman Seminar Unit 15

MATH 13150: Freshman Seminar Unit 15 MATH 1310: Freshman Seminar Unit 1 1. Powers in mod m arithmetic In this chapter, we ll learn an analogous result to Fermat s theorem. Fermat s theorem told us that if p is prime and p does not divide

More information

Distribution of Primes

Distribution of Primes Distribution of Primes Definition. For positive real numbers x, let π(x) be the number of prime numbers less than or equal to x. For example, π(1) = 0, π(10) = 4 and π(100) = 25. To use some ciphers, we

More information

University of British Columbia. Math 312, Midterm, 6th of June 2017

University of British Columbia. Math 312, Midterm, 6th of June 2017 University of British Columbia Math 312, Midterm, 6th of June 2017 Name (please be legible) Signature Student number Duration: 90 minutes INSTRUCTIONS This test has 7 problems for a total of 100 points.

More information

Algorithmic Number Theory and Cryptography (CS 303)

Algorithmic Number Theory and Cryptography (CS 303) Algorithmic Number Theory and Cryptography (CS 303) Modular Arithmetic Jeremy R. Johnson 1 Introduction Objective: To become familiar with modular arithmetic and some key algorithmic constructions that

More information

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI 1. Hensel Lemma for nonsingular solutions Although there is no analogue of Lagrange s Theorem for prime power moduli, there is an algorithm for determining

More information

SOLUTIONS FOR PROBLEM SET 4

SOLUTIONS FOR PROBLEM SET 4 SOLUTIONS FOR PROBLEM SET 4 A. A certain integer a gives a remainder of 1 when divided by 2. What can you say about the remainder that a gives when divided by 8? SOLUTION. Let r be the remainder that a

More information

b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.

b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively. Solutions to Exam 1 Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers. Prove that m φ(n) + n φ(m) 1 (mod mn). Solution: a) Fermat s Little

More information

Numbers (8A) Young Won Lim 5/22/17

Numbers (8A) Young Won Lim 5/22/17 Numbers (8A Copyright (c 2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem The Chinese Remainder Theorem 8-3-2014 The Chinese Remainder Theorem gives solutions to systems of congruences with relatively prime moduli The solution to a system of congruences with relatively prime

More information

Solutions to the 2004 CMO written March 31, 2004

Solutions to the 2004 CMO written March 31, 2004 Solutions to the 004 CMO written March 31, 004 1. Find all ordered triples (x, y, z) of real numbers which satisfy the following system of equations: xy = z x y xz = y x z yz = x y z Solution 1 Subtracting

More information

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory - Divisibility - Congruences June 23, 2014 Primes - Divisibility - Congruences Definition A positive integer p is prime if p 2 and its only positive factors are itself and 1. Otherwise, if p 2, then p

More information

Fermat s little theorem. RSA.

Fermat s little theorem. RSA. .. Computing large numbers modulo n (a) In modulo arithmetic, you can always reduce a large number to its remainder a a rem n (mod n). (b) Addition, subtraction, and multiplication preserve congruence:

More information

Solutions for the Practice Questions

Solutions for the Practice Questions Solutions for the Practice Questions Question 1. Find all solutions to the congruence 13x 12 (mod 35). Also, answer the following questions about the solutions to the above congruence. Are there solutions

More information

Data security (Cryptography) exercise book

Data security (Cryptography) exercise book University of Debrecen Faculty of Informatics Data security (Cryptography) exercise book 1 Contents 1 RSA 4 1.1 RSA in general.................................. 4 1.2 RSA background.................................

More information

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m. Great Theoretical Ideas In Computer Science Steven Rudich CS - Spring Lecture Feb, Carnegie Mellon University Modular Arithmetic and the RSA Cryptosystem p- p MAX(a,b) + MIN(a,b) = a+b n m means that m

More information

#A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS. Thomas A. Plick

#A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS. Thomas A. Plick #A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS Thomas A. Plick tomplick@gmail.com Received: 10/5/14, Revised: 9/17/16, Accepted: 1/23/17, Published: 2/13/17 Abstract We show that out of the

More information

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017 Name: Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name legibly at the top of this page. No calculators

More information

NOTES: SIGNED INTEGERS DAY 1

NOTES: SIGNED INTEGERS DAY 1 NOTES: SIGNED INTEGERS DAY 1 MULTIPLYING and DIVIDING: Same Signs (POSITIVE) + + = + positive x positive = positive = + negative x negative = positive Different Signs (NEGATIVE) + = positive x negative

More information

MA/CSSE 473 Day 9. The algorithm (modified) N 1

MA/CSSE 473 Day 9. The algorithm (modified) N 1 MA/CSSE 473 Day 9 Primality Testing Encryption Intro The algorithm (modified) To test N for primality Pick positive integers a 1, a 2,, a k < N at random For each a i, check for a N 1 i 1 (mod N) Use the

More information

NUMBER THEORY AMIN WITNO

NUMBER THEORY AMIN WITNO NUMBER THEORY AMIN WITNO.. w w w. w i t n o. c o m Number Theory Outlines and Problem Sets Amin Witno Preface These notes are mere outlines for the course Math 313 given at Philadelphia

More information

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained. THE CHINESE REMAINDER THEOREM INTRODUCED IN A GENERAL KONTEXT Introduction The rst Chinese problem in indeterminate analysis is encountered in a book written by the Chinese mathematician Sun Tzi. The problem

More information

Discrete Square Root. Çetin Kaya Koç Winter / 11

Discrete Square Root. Çetin Kaya Koç  Winter / 11 Discrete Square Root Çetin Kaya Koç koc@cs.ucsb.edu Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2017 1 / 11 Discrete Square Root Problem The discrete square root problem is defined as the computation

More information

Public Key Cryptography

Public Key Cryptography Public Key Cryptography How mathematics allows us to send our most secret messages quite openly without revealing their contents - except only to those who are supposed to read them The mathematical ideas

More information

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2 Quadratic Reciprocity To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we need to be able to evaluate q for any prime q. The first (and most delicate) case

More information

MATH CIRCLE, 10/13/2018

MATH CIRCLE, 10/13/2018 MATH CIRCLE, 10/13/2018 LARGE SOLUTIONS 1. Write out row 8 of Pascal s triangle. Solution. 1 8 28 56 70 56 28 8 1. 2. Write out all the different ways you can choose three letters from the set {a, b, c,

More information

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g., Binary exponentiation An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g., What are the last two digits of the number 2 284? In the absence

More information

An elementary study of Goldbach Conjecture

An elementary study of Goldbach Conjecture An elementary study of Goldbach Conjecture Denise Chemla 26/5/2012 Goldbach Conjecture (7 th, june 1742) states that every even natural integer greater than 4 is the sum of two odd prime numbers. If we

More information

Math 255 Spring 2017 Solving x 2 a (mod n)

Math 255 Spring 2017 Solving x 2 a (mod n) Math 255 Spring 2017 Solving x 2 a (mod n) Contents 1 Lifting 1 2 Solving x 2 a (mod p k ) for p odd 3 3 Solving x 2 a (mod 2 k ) 5 4 Solving x 2 a (mod n) for general n 9 1 Lifting Definition 1.1. Let

More information

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic

Grade 6/7/8 Math Circles April 1/2, Modular Arithmetic Faculty of Mathematics Waterloo, Ontario N2L 3G1 Modular Arithmetic Centre for Education in Mathematics and Computing Grade 6/7/8 Math Circles April 1/2, 2014 Modular Arithmetic Modular arithmetic deals

More information

Math 412: Number Theory Lecture 6: congruence system and

Math 412: Number Theory Lecture 6: congruence system and Math 412: Number Theory Lecture 6: congruence system and classes Gexin Yu gyu@wm.edu College of William and Mary Chinese Remainder Theorem Chinese Remainder Theorem: let m 1, m 2,..., m k be pairwise coprimes.

More information

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 7 Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014 Cryptography studies techniques for secure communication in the presence of third parties. A typical

More information

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand. Midterm #: practice MATH Intro to Number Theory midterm: Thursday, Nov 7 Please print your name: Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating

More information

Assignment 2. Due: Monday Oct. 15, :59pm

Assignment 2. Due: Monday Oct. 15, :59pm Introduction To Discrete Math Due: Monday Oct. 15, 2012. 11:59pm Assignment 2 Instructor: Mohamed Omar Math 6a For all problems on assignments, you are allowed to use the textbook, class notes, and other

More information

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties. LECTURE 3: CONGRUENCES 1. Basic properties of congruences We begin by introducing some definitions and elementary properties. Definition 1.1. Suppose that a, b Z and m N. We say that a is congruent to

More information

A C E. Answers Investigation 4. Applications. Dimensions of 39 Square Unit Rectangles and Partitions. Small Medium Large

A C E. Answers Investigation 4. Applications. Dimensions of 39 Square Unit Rectangles and Partitions. Small Medium Large Answers Applications 1. An even number minus an even number will be even. Students may use examples, tiles, the idea of groups of two, or the inverse relationship between addition and subtraction. Using

More information

Modular Arithmetic: refresher.

Modular Arithmetic: refresher. Lecture 7. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. Division!!! 3. Euclid s GCD Algorithm. A little tricky here! Clock Math If it is 1:00

More information

Primitive Roots. Chapter Orders and Primitive Roots

Primitive Roots. Chapter Orders and Primitive Roots Chapter 5 Primitive Roots The name primitive root applies to a number a whose powers can be used to represent a reduced residue system modulo n. Primitive roots are therefore generators in that sense,

More information

1999 Mathcounts National Sprint Round Solutions

1999 Mathcounts National Sprint Round Solutions 999 Mathcounts National Sprint Round Solutions. Solution: 5. A -digit number is divisible by if the sum of its digits is divisible by. The first digit cannot be 0, so we have the following four groups

More information

I.M.O. Winter Training Camp 2008: Invariants and Monovariants

I.M.O. Winter Training Camp 2008: Invariants and Monovariants I.M.. Winter Training Camp 2008: Invariants and Monovariants n math contests, you will often find yourself trying to analyze a process of some sort. For example, consider the following two problems. Sample

More information

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005 MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005 Deartment of Mathematical and Statistical Sciences University of Alberta Question 1. Find integers

More information

Goldbach Conjecture (7 th june 1742)

Goldbach Conjecture (7 th june 1742) Goldbach Conjecture (7 th june 1742) We note P the odd prime numbers set. P = {p 1 = 3, p 2 = 5, p 3 = 7, p 4 = 11,...} n 2N\{0, 2, 4}, p P, p n/2, q P, q n/2, n = p + q We call n s Goldbach decomposition

More information

Cryptography, Number Theory, and RSA

Cryptography, Number Theory, and RSA Cryptography, Number Theory, and RSA Joan Boyar, IMADA, University of Southern Denmark November 2015 Outline Symmetric key cryptography Public key cryptography Introduction to number theory RSA Modular

More information

Math 319 Problem Set #7 Solution 18 April 2002

Math 319 Problem Set #7 Solution 18 April 2002 Math 319 Problem Set #7 Solution 18 April 2002 1. ( 2.4, problem 9) Show that if x 2 1 (mod m) and x / ±1 (mod m) then 1 < (x 1, m) < m and 1 < (x + 1, m) < m. Proof: From x 2 1 (mod m) we get m (x 2 1).

More information

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete

More information

Three of these grids share a property that the other three do not. Can you find such a property? + mod

Three of these grids share a property that the other three do not. Can you find such a property? + mod PPMTC 22 Session 6: Mad Vet Puzzles Session 6: Mad Veterinarian Puzzles There is a collection of problems that have come to be known as "Mad Veterinarian Puzzles", for reasons which will soon become obvious.

More information

12. Let Rm = {0,1,2,..., m 1} be a complete residue system modulo ra. Let a be an integer. When is a Rm = {0,1 a, 2 a,...

12. Let Rm = {0,1,2,..., m 1} be a complete residue system modulo ra. Let a be an integer. When is a Rm = {0,1 a, 2 a,... 12. Let Rm = {0,1,2,..., m 1} be a complete residue system modulo ra. Let a be an integer. When is a Rm = {0,1 a, 2 a,..., a (ra - 1)} a complete residue system modulo m? Prove your conjecture. (Try m

More information

CHAPTER 2. Modular Arithmetic

CHAPTER 2. Modular Arithmetic CHAPTER 2 Modular Arithmetic In studying the integers we have seen that is useful to write a = qb + r. Often we can solve problems by considering only the remainder, r. This throws away some of the information,

More information

Overview. The Big Picture... CSC 580 Cryptography and Computer Security. January 25, Math Basics for Cryptography

Overview. The Big Picture... CSC 580 Cryptography and Computer Security. January 25, Math Basics for Cryptography CSC 580 Cryptography and Computer Security Math Basics for Cryptography January 25, 2018 Overview Today: Math basics (Sections 2.1-2.3) To do before Tuesday: Complete HW1 problems Read Sections 3.1, 3.2

More information

Public Key Encryption

Public Key Encryption Math 210 Jerry L. Kazdan Public Key Encryption The essence of this procedure is that as far as we currently know, it is difficult to factor a number that is the product of two primes each having many,

More information

Two congruences involving 4-cores

Two congruences involving 4-cores Two congruences involving 4-cores ABSTRACT. The goal of this paper is to prove two new congruences involving 4- cores using elementary techniques; namely, if a 4 (n) denotes the number of 4-cores of n,

More information

Meet #5 March Intermediate Mathematics League of Eastern Massachusetts

Meet #5 March Intermediate Mathematics League of Eastern Massachusetts Meet #5 March 2008 Intermediate Mathematics League of Eastern Massachusetts Meet #5 March 2008 Category 1 Mystery 1. In the diagram to the right, each nonoverlapping section of the large rectangle is

More information

IMLEM Meet #5 March/April Intermediate Mathematics League of Eastern Massachusetts

IMLEM Meet #5 March/April Intermediate Mathematics League of Eastern Massachusetts IMLEM Meet #5 March/April 2013 Intermediate Mathematics League of Eastern Massachusetts Category 1 Mystery You may use a calculator. 1. Beth sold girl-scout cookies to some of her relatives and neighbors.

More information

1 Introduction. 2 An Easy Start. KenKen. Charlotte Teachers Institute, 2015

1 Introduction. 2 An Easy Start. KenKen. Charlotte Teachers Institute, 2015 1 Introduction R is a puzzle whose solution requires a combination of logic and simple arithmetic and combinatorial skills 1 The puzzles range in difficulty from very simple to incredibly difficult Students

More information

METHOD 1: METHOD 2: 4D METHOD 1: METHOD 2:

METHOD 1: METHOD 2: 4D METHOD 1: METHOD 2: 4A Strategy: Count how many times each digit appears. There are sixteen 4s, twelve 3s, eight 2s, four 1s, and one 0. The sum of the digits is (16 4) + + (8 2) + (4 1) = 64 + 36 +16+4= 120. 4B METHOD 1:

More information

Math 1111 Math Exam Study Guide

Math 1111 Math Exam Study Guide Math 1111 Math Exam Study Guide The math exam will cover the mathematical concepts and techniques we ve explored this semester. The exam will not involve any codebreaking, although some questions on the

More information

1111: Linear Algebra I

1111: Linear Algebra I 1111: Linear Algebra I Dr. Vladimir Dotsenko (Vlad) Lecture 7 Dr. Vladimir Dotsenko (Vlad) 1111: Linear Algebra I Lecture 7 1 / 8 Invertible matrices Theorem. 1. An elementary matrix is invertible. 2.

More information

Class 8 Cubes and Cube Root

Class 8 Cubes and Cube Root ID : in-8-cubes-and-cube-root [1] Class 8 Cubes and Cube Root For more such worksheets visit www.edugain.com Answer the questions (1) Find the value of A if (2) If you subtract a number x from 15 times

More information

Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm

Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm Clock Math If it is 1:00 now. What time is it in 5 hours?

More information

Arithmetic of Remainders (Congruences)

Arithmetic of Remainders (Congruences) Arithmetic of Remainders (Congruences) Donald Rideout, Memorial University of Newfoundland 1 Divisibility is a fundamental concept of number theory and is one of the concepts that sets it apart from other

More information

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, 2016 CS1800 Discrete Structures Midterm Version C Instructions: 1. The exam is closed book and closed notes.

More information

Final exam. Question Points Score. Total: 150

Final exam. Question Points Score. Total: 150 MATH 11200/20 Final exam DECEMBER 9, 2016 ALAN CHANG Please present your solutions clearly and in an organized way Answer the questions in the space provided on the question sheets If you run out of room

More information

Patterns and Relations

Patterns and Relations Grade 7 - Unit One Patterns and Relations Name: In this section we will be looking at the Divisibility Rules for the numbers 2, 4, 5, 8 & 10. Divisible means that a number can be divided by a certain number.

More information

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees. 7 Symmetries 7 Permutations A permutation of a set is a reordering of its elements Another way to look at it is as a function Φ that takes as its argument a set of natural numbers of the form {, 2,, n}

More information

FREDRIK TUFVESSON ELECTRICAL AND INFORMATION TECHNOLOGY

FREDRIK TUFVESSON ELECTRICAL AND INFORMATION TECHNOLOGY 1 Information Transmission Chapter 5, Block codes FREDRIK TUFVESSON ELECTRICAL AND INFORMATION TECHNOLOGY 2 Methods of channel coding For channel coding (error correction) we have two main classes of codes,

More information

Algorithmic Number Theory and Cryptography (CS 303)

Algorithmic Number Theory and Cryptography (CS 303) Algorithmic Number Theory and Cryptography (CS 303) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson 1 Introduction Objective: To understand what a public key cryptosystem is and

More information

Improper Fractions. An Improper Fraction has a top number larger than (or equal to) the bottom number.

Improper Fractions. An Improper Fraction has a top number larger than (or equal to) the bottom number. Improper Fractions (seven-fourths or seven-quarters) 7 4 An Improper Fraction has a top number larger than (or equal to) the bottom number. It is "top-heavy" More Examples 3 7 16 15 99 2 3 15 15 5 See

More information

Diophantine Equations and Modulo 11.

Diophantine Equations and Modulo 11. Diophantine Equations and Modulo 11. Those who were present during the Mental Calculation World Cup will remember that from Andreas Berger and Andy Robertshaw came the question Is there always one solution

More information

Fall. Spring. Possible Summer Topics

Fall. Spring. Possible Summer Topics Fall Paper folding: equilateral triangle (parallel postulate and proofs of theorems that result, similar triangles), Trisect a square paper Divisibility by 2-11 and by combinations of relatively prime

More information

T101 DEPARTMENTAL FINAL REVIEW

T101 DEPARTMENTAL FINAL REVIEW T101 DEPARTMENTAL FINAL REVIEW REVISED SPRING 2009 *******This is only a sampling of some problems to review. Previous tests and reviews should also be reviewed.*** 1) a) Find the 14th term of the arithmetic

More information

Exam 1 7 = = 49 2 ( ) = = 7 ( ) =

Exam 1 7 = = 49 2 ( ) = = 7 ( ) = Exam 1 Problem 1. a) Define gcd(a, b). Using Euclid s algorithm comute gcd(889, 168). Then find x, y Z such that gcd(889, 168) = x 889 + y 168 (check your answer!). b) Let a be an integer. Prove that gcd(3a

More information