Modular arithmetic Math 2320

Size: px
Start display at page:

Download "Modular arithmetic Math 2320"

Transcription

1 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 from this division; we write a mod m = r or a r (mod m). If a mod m = r and b mod m = r, we say that a is congruent to b modulo m; we write a mod m = b mod m or a b (mod m). Another way of saying this is that a b (mod m) if and only if b a is divisible by m. For each remainder 0 r < m, the set of elements with remainder r is denoted [r] = { a Z : a r (mod m) }. Example. Take m =. There are three possible remainders after division by, namely r = 0, 1, 2. We have [0] = { a Z : a 0 (mod 5) } = {..., 10, 5, 0, 5, 10,...} [1] = { a Z : a 1 (mod 5) } = {...,, 4, 1, 6,,...} [2] = { a Z : a 2 (mod 5) } = {..., 8,, 2, 7, 12,...} [] = { a Z : a (mod 5) } = {..., 7, 2,, 8, 1,...} [4] = { a Z : a 4 (mod 5) } = {..., 6, 1, 4,, 14,...}. For example, 7 1 (mod 5) because they have the same remainder, or equivalently, because 1 ( 7) = 20 is divisible by 5. Arithmetic modulo m. For any integers a, b, we can either perform arithmetic operations first and then reduce modulo m or we can reduce modulo m first and then perform arithmetic operations. We want to verify that we get the same result either way. To do this, we use the division algorithm to write so that a r and b s. Addition yields a = qm + r and b = Qm + s, a + b = (qm + r) + (Qm + s) = (q + Q)m + (r + s), so a + b r + s (mod m). Multiplication yields ab = (qm + r)(qm + s) = (qqm + qs + Qr)m + rs, so ab rs (mod m). As an example, consider the modulus m = 1 and the integers a = 1 and b = 21. We can add them together and reduce modulo 1 to get = 40 1 (mod 1). Or we can reduce first, then add them together, and then reduce again to get = 14 1 (mod 1). We can also multiply them and reduce modulo 1 to get 1 21 = (mod 1). Or we can reduce first, then multiply, then reduce again to get (mod 1). The important thing is that we get the same remainder through either process.

2 Solving equations modulo m. 1. Suppose we want to find solutions x to First, we subtract to get 7x + 4 (mod ). 7x (mod ), so we are trying to solve 7x 6 (mod ). In regular arithmetic, we would divide by 7, but modular division does not always make sense. Instead, by trial and error we can compute all possible 7x modulo. x x Therefore, the only solution to 7x 6 modulo is x To solve the same equation modulo 14, we first subtract, just as before. 7x 4 5 (mod 14), so we want to solve 7x (mod 14). By trial and error again, we compute all possible 7x modulo 14. x x This time, there is no solution to 7x (mod 14).. We will find the solutions to x 2x 2 (mod ). Although there are more efficient methods, we proceed again by trial and error, computing x 2, 2x 2, and x modulo. x x x x Therefore, the solutions to x 2x 2 (mod ) are x 0, 2,, 6. (Notice how there are 4 solutions to a polynomial equation with degree.) Application. One nice application of modular arithmetic is to know when an integer is divisible by,, or. A decimal expansion n = a r... a 2 a 1 a 0 means that n = a 0 + a 1 (10) + a 2 (10 2 ) +... a r (10 r ). Since 10 1 (mod ), we deduce that 10 k 1 k 1 (mod ) for all positive powers k. If we reduce the expression of the decimal expansion modulo, we get n a 0 + a 1 + a a r (mod ). In other words, modulo, n is congruent to the sum of its digits. Since 10 1 (mod ), the same thing is true, namely that n is congruent to the sum of its digits modulo. Since 10 1 (mod ), we know that 10 k ( 1) k 1 (mod ). Therefore, n a 0 a 1 + a ( 1) r (mod ). In other words, modulo, n is congruent to the alternating sum of its digits. To summarize, an integer n is divisible by or if and only if the sum of its digits is divisible by or. An integer n is divisible by if and only if the alternating sum of its digits is divisible by. For example, for n = 177, the sum of the digits is = 27, which is divisible by both and. Therefore, n is divisible by. The alternating sum of the digits is =. Since this is divisible by, the original number n is also divisible by.

3 Exercises 1. Find all solutions modulo 14 to the following equations. (a) 5x 4 (mod 14) (b) 6x 5 (mod 14) (c) 6x 6 (mod 14) 2. For each a {0, 1, 2,, 4, 5, 6, 7}, find the solutions modulo 8 to x 2 a (mod 8).. Show that n 7 n is always divisible by 7. (Hint: for each remainder a modulo 7, show that a 7 a 0 (mod 7).) 4. In the integers, we often use two properties: - if kx = ky, then k = 0 or x = y. - if xy = 0, then x = 0 or y = 0. Find some counter-examples to these properties when the arithmetic is done modulo 20. In other words, find some examples of k, x, y {1, 2,..., 18, 1} such that kx ky (mod 20), but x y (mod 20). Also find some examples of x, y 0 such that xy 0 (mod 20). 5. Determine how many times,, and go into the following integers. (a) 21,44,787 (b),16,800 (c),6,6 (d) 4,24, Fill out the following multiplication table modulo 15. In other words, if the column is a and the row is b, the entry should be ab (mod 15)

4 Answers 1. (a) The only solution is x 12 (mod 14). x x (b) There are no solutions. x x (c) The solutions are x 1, 8 (mod 14). 2. x 2 0 has two solutions, x 0, 4 (mod 8). x 2 1 has four solutions, x 1,, 5, 7 (mod 8). x 2 4 has two solutions, x 2, 6 (mod 8). And x 2 a has zero solutions for a = 2,, 5, 6, 7. x x n 7 n is divisible by 7 if and only if n 7 n 0 (mod 7), i.e., if and only if n 7 n (mod 7). There are 7 possible remainders modulo 7 for n. For each of these, we compute n 7 modulo 7. n n n = n 2 n n 4 = n 2 n n 7 = n 4 n The first row and the last row are the same, so n 7 n (mod 7) for all integers n, proving that n 7 n is always divisible by For example, if k = 8, we have that and Also, we have that (mod 20) (mod 20) (mod 20). 21,44, (a) The sum of the digits is 6, which is divisible by : = 2, 81, 64. The 2,81,64 sum of the new digits is 27, which is divisible by : = 264, 627. The sum 264,627 of the new digits is 27, which is divisible by : = 2, 40. The sum of the 2,40 new digits is 18, which is divisible by : =, 267. The sum of the new digits,267 is 18, which is divisible by : = 6. The sum of the new digits is 12, which 6 is divisible by : = 121. Therefore, 21, 44, 787 is divisible by 5 and divisible by. It is also divisible by 2 = 121. (b) The alternating sum of the digits is = 0, which is,16,800 divisible by : =, 628, 800. The alternating sum of the new digits is = 1, which is not divisible by. The sum of the new,628,800 digits is 27, which is divisible by : = 40, 200. The sum of the new digits 40,200 is, which is divisible by : = 44, 800. The sum of the new digits is 16, which is not divisible by or. So,, 16, 800 is divisible by and (c) The sum of the digits is 42, which is divisible by : = 22. The alternating sum of the digits is 0, which is divisible by : 22 = The

5 alternating sum of the new digits is 7, which is not divisible by. So,, 6, 6 is divisible by and by. 4,24,551 (d) The sum of the digits is 27, which is divisible by : = 4, 804, 8. The sum of the new digits is 6, which is divisible by : 4,804,8 = 5, 871. The sum of 5,871 the new digits is 27, which is divisible by : = 5, 1. The sum of the new 5,1 digits is 27, which is divisible by : = 6, 51. The sum of the new digits is 6,51 21, which is divisible by : = 2, 17. The alternating sum of the new digits is =, which is not divisible by. Therefore, 4, 24, 551 is divisible by 4,, and not divisible by

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

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

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

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

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

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

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

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

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. 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

Carmen s Core Concepts (Math 135)

Carmen s Core Concepts (Math 135) Carmen s Core Concepts (Math 135) Carmen Bruni University of Waterloo Week 7 1 Congruence Definition 2 Congruence is an Equivalence Relation (CER) 3 Properties of Congruence (PC) 4 Example 5 Congruences

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

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

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

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

Groups, Modular Arithmetic and Geometry

Groups, Modular Arithmetic and Geometry Groups, Modular Arithmetic and Geometry Pupil Booklet 2012 The Maths Zone www.themathszone.co.uk Modular Arithmetic Modular arithmetic was developed by Euler and then Gauss in the late 18th century and

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

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902 Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902 http://www.ms.uky.edu/~mschreffler Topic Idea: Cryptography Our next topic is something called Cryptography,

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

A Quick Introduction to Modular Arithmetic

A Quick Introduction to Modular Arithmetic A Quick Introduction to Modular Arithmetic Art Duval University of Texas at El Paso November 16, 2004 1 Idea Here are a few quick motivations for modular arithmetic: 1.1 Sorting integers Recall how you

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

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

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

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

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

Final Exam, Math 6105

Final Exam, Math 6105 Final Exam, Math 6105 SWIM, June 29, 2006 Your name Throughout this test you must show your work. 1. Base 5 arithmetic (a) Construct the addition and multiplication table for the base five digits. (b)

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

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

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

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

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

Solutions to Exercises Chapter 6: Latin squares and SDRs

Solutions to Exercises Chapter 6: Latin squares and SDRs Solutions to Exercises Chapter 6: Latin squares and SDRs 1 Show that the number of n n Latin squares is 1, 2, 12, 576 for n = 1, 2, 3, 4 respectively. (b) Prove that, up to permutations of the rows, columns,

More information

Introduction To Modular Arithmetic

Introduction To Modular Arithmetic Introduction To Modular Arithmetic February, Olga Radko radko@math.ucla.edu Oleg Gleizer oleg@gmail.com Warm Up Problem It takes a grandfather s clock seconds to chime 6 o clock. Assuming that the time

More information

Rational Points On Elliptic Curves - Solutions. (i) Throughout, we ve been looking at elliptic curves in the general form. y 2 = x 3 + Ax + B

Rational Points On Elliptic Curves - Solutions. (i) Throughout, we ve been looking at elliptic curves in the general form. y 2 = x 3 + Ax + B Rational Points On Elliptic Curves - Solutions (Send corrections to cbruni@uwaterloo.ca) (i) Throughout, we ve been looking at elliptic curves in the general form y 2 = x 3 + Ax + B However we did claim

More information

Math 205 Test 2 Key. 1. Do NOT write your answers on these sheets. Nothing written on the test papers will be graded

Math 205 Test 2 Key. 1. Do NOT write your answers on these sheets. Nothing written on the test papers will be graded Math 20 Test 2 Key Instructions. Do NOT write your answers on these sheets. Nothing written on the test papers will be graded. 2. Please begin each section of questions on a new sheet of paper. 3. Please

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

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

Latin Squares for Elementary and Middle Grades

Latin Squares for Elementary and Middle Grades Latin Squares for Elementary and Middle Grades Yul Inn Fun Math Club email: Yul.Inn@FunMathClub.com web: www.funmathclub.com Abstract: A Latin square is a simple combinatorial object that arises in many

More information

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

SESAME Modular Arithmetic. MurphyKate Montee. March 2018 IN,Z, We think numbers should satisfy certain rules, which we call axioms: 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

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

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

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

Number Theory: Modulus Math

Number Theory: Modulus Math Page 1 of 5 How do you count? You might start counting from 1, or you might start from 0. Either way the numbers keep getting larger and larger; as long as we have the patience to keep counting, we could

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

Grade 6 Math Circles March 8-9, Modular Arithmetic

Grade 6 Math Circles March 8-9, Modular Arithmetic Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 6 Math Circles March 8-9, 26 Modular Arithmetic Introduction: The 2-hour Clock Question: If its 7

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

Grade 7/8 Math Circles February 9-10, Modular Arithmetic

Grade 7/8 Math Circles February 9-10, Modular Arithmetic Faculty of Mathematics Waterloo, Ontario N2L 3G Centre for Education in Mathematics and Computing Grade 7/8 Math Circles February 9-, 26 Modular Arithmetic Introduction: The 2-hour Clock Question: If it

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

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence. Section 4.4 Linear Congruences Definition: A congruence of the form ax b (mod m), where m is a positive integer, a and b are integers, and x is a variable, is called a linear congruence. The solutions

More information

ALGEBRA: Chapter I: QUESTION BANK

ALGEBRA: Chapter I: QUESTION BANK 1 ALGEBRA: Chapter I: QUESTION BANK Elements of Number Theory Congruence One mark questions: 1 Define divisibility 2 If a b then prove that a kb k Z 3 If a b b c then PT a/c 4 If a b are two non zero integers

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

Classwork Example 1: Exploring Subtraction with the Integer Game

Classwork Example 1: Exploring Subtraction with the Integer Game 7.2.5 Lesson Date Understanding Subtraction of Integers Student Objectives I can justify the rule for subtraction: Subtracting a number is the same as adding its opposite. I can relate the rule for subtraction

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

Sheet 1: Introduction to prime numbers.

Sheet 1: Introduction to prime numbers. Option A Hand in at least one question from at least three sheets Sheet 1: Introduction to prime numbers. [provisional date for handing in: class 2.] 1. Use Sieve of Eratosthenes to find all prime numbers

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

Discrete Math Class 4 ( )

Discrete Math Class 4 ( ) Discrete Math 37110 - Class 4 (2016-10-06) 41 Division vs congruences Instructor: László Babai Notes taken by Jacob Burroughs Revised by instructor DO 41 If m ab and gcd(a, m) = 1, then m b DO 42 If gcd(a,

More information

Square & Square Roots

Square & Square Roots Square & Square Roots 1. If a natural number m can be expressed as n², where n is also a natural number, then m is a square number. 2. All square numbers end with, 1, 4, 5, 6 or 9 at unit s place. All

More information

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012

Divisibility. Igor Zelenko. SEE Math, August 13-14, 2012 Divisibility Igor Zelenko SEE Math, August 13-14, 2012 Before getting started Below is the list of problems and games I prepared for our activity. We will certainly solve/discuss/play only part of them

More information

PRMO Official Test / Solutions

PRMO Official Test / Solutions Date: 19 Aug 2018 PRMO Official Test - 2018 / Solutions 1. 17 ANSWERKEY 1. 17 2. 8 3. 70 4. 12 5. 84 6. 18 7. 14 8. 80 9. 81 10. 24 11. 29 12. 88 13. 24 14. 19 15. 21 16. 55 17. 30 18. 16 19. 33 20. 17

More information

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography Mathematics Explorers Club Fall 2012 Number Theory and Cryptography Chapter 0: Introduction Number Theory enjoys a very long history in short, number theory is a study of integers. Mathematicians over

More information

Three Pile Nim with Move Blocking. Arthur Holshouser. Harold Reiter.

Three Pile Nim with Move Blocking. Arthur Holshouser. Harold Reiter. Three Pile Nim with Move Blocking Arthur Holshouser 3600 Bullard St Charlotte, NC, USA Harold Reiter Department of Mathematics, University of North Carolina Charlotte, Charlotte, NC 28223, USA hbreiter@emailunccedu

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

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST First Round For all Colorado Students Grades 7-12 October 31, 2009 You have 90 minutes no calculators allowed The average of n numbers is their sum divided

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

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

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 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

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

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS DANIEL BACZKOWSKI, OLAOLU FASORANTI, AND CARRIE E. FINCH Abstract. In this paper, we show that there are infinitely many Sierpiński numbers in the sequence of

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

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

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

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

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

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

How to Become a Mathemagician: Mental Calculations and Math Magic

How to Become a Mathemagician: Mental Calculations and Math Magic How to Become a Mathemagician: Mental Calculations and Math Magic Adam Gleitman (amgleit@mit.edu) Splash 2012 A mathematician is a conjurer who gives away his secrets. John H. Conway This document describes

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

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

Implementation / Programming: Random Number Generation

Implementation / Programming: Random Number Generation Introduction to Modeling and Simulation Implementation / Programming: Random Number Generation OSMAN BALCI Professor Department of Computer Science Virginia Polytechnic Institute and State University (Virginia

More information

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02 Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02 Public Polynomial congruences come up constantly, even when one is dealing with much deeper problems

More information

Launchpad Maths. Arithmetic II

Launchpad Maths. Arithmetic II Launchpad Maths. Arithmetic II LAW OF DISTRIBUTION The Law of Distribution exploits the symmetries 1 of addition and multiplication to tell of how those operations behave when working together. Consider

More information

Course Syllabus - Online Prealgebra

Course Syllabus - Online Prealgebra Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 1.1 Whole Numbers, Place Value Practice Problems for section 1.1 HW 1A 1.2 Adding Whole Numbers Practice Problems for section 1.2 HW 1B 1.3 Subtracting Whole Numbers

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

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

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

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

Shuffling with ordered cards

Shuffling with ordered cards Shuffling with ordered cards Steve Butler (joint work with Ron Graham) Department of Mathematics University of California Los Angeles www.math.ucla.edu/~butler Combinatorics, Groups, Algorithms and Complexity

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

The Problem. Tom Davis December 19, 2016

The Problem. Tom Davis  December 19, 2016 The 1 2 3 4 Problem Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles December 19, 2016 Abstract The first paragraph in the main part of this article poses a problem that can be approached

More information

Congruence properties of the binary partition function

Congruence properties of the binary partition function Congruence properties of the binary partition function 1. Introduction. We denote by b(n) the number of binary partitions of n, that is the number of partitions of n as the sum of powers of 2. As usual,

More information

Lesson 21: If-Then Moves with Integer Number Cards

Lesson 21: If-Then Moves with Integer Number Cards Student Outcomes Students understand that if a number sentence is true and we make any of the following changes to the number sentence, the resulting number sentence will be true: i. Adding the same number

More information

ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey

ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey Shah [1] and Bruckner [2] have considered the problem

More information

Constructions of Coverings of the Integers: Exploring an Erdős Problem

Constructions of Coverings of the Integers: Exploring an Erdős Problem Constructions of Coverings of the Integers: Exploring an Erdős Problem Kelly Bickel, Michael Firrisa, Juan Ortiz, and Kristen Pueschel August 20, 2008 Abstract In this paper, we study necessary conditions

More information

MATH 351 Fall 2009 Homework 1 Due: Wednesday, September 30

MATH 351 Fall 2009 Homework 1 Due: Wednesday, September 30 MATH 51 Fall 2009 Homework 1 Due: Wednesday, September 0 Problem 1. How many different letter arrangements can be made from the letters BOOKKEEPER. This is analogous to one of the problems presented in

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

Number Theory. Applications of Congruences. Francis Joseph Campena Mathematics Department De La Salle University-Manila

Number Theory. Applications of Congruences. Francis Joseph Campena Mathematics Department De La Salle University-Manila Number Theory Applications of Congruences Francis Joseph Campena Mathematics Department De La Salle University-Manila Introduction Divisibility Test In this section, we discuss some divisibility rules

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

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

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