MODULAR ARITHMETIC II: CONGRUENCES AND DIVISION

Similar documents
PERMUTATIONS - II JUNIOR CIRCLE 11/17/2013

CRACKING THE 15 PUZZLE - PART 4: TYING EVERYTHING TOGETHER BEGINNERS 02/21/2016

Modular arithmetic Math 2320

GRAPH THEORY PART III

PERMUTATIONS - II JUNIOR CIRCLE 05/01/2011

GAMES AND STRATEGY BEGINNERS 12/03/2017

6.2 Modular Arithmetic

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

Introduction To Modular Arithmetic

Math 127: Equivalence Relations

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

CRACKING THE 15 PUZZLE - PART 1: PERMUTATIONS

Modular Arithmetic and Doomsday

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

A Quick Introduction to Modular Arithmetic

Applications of Fermat s Little Theorem and Congruences

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

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

POKER (AN INTRODUCTION TO COUNTING)

CRACKING THE 15 PUZZLE - PART 2: MORE ON PERMUTATIONS AND TAXICAB GEOMETRY

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

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

Grade 7 & 8 Math Circles October 12, 2011 Modular Arithmetic

Groups, Modular Arithmetic and Geometry

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

SOLUTIONS TO PROBLEM SET 5. Section 9.1

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

Practice Midterm 2 Solutions

Modular Arithmetic. claserken. July 2016

Carmen s Core Concepts (Math 135)

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

Fermat s little theorem. RSA.

MATH 135 Algebra, Solutions to Assignment 7

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

The bottom number in the fraction is called the denominator. The top number is called the numerator.

Introduction to Modular Arithmetic

Number Theory. Konkreetne Matemaatika

MAT Modular arithmetic and number theory. Modular arithmetic

Solutions for the Practice Final

Example Enemy agents are trying to invent a new type of cipher. They decide on the following encryption scheme: Plaintext converts to Ciphertext

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

1.6 Congruence Modulo m

Solutions for the 2nd Practice Midterm

The Chinese Remainder Theorem

Number Theory/Cryptography (part 1 of CSC 282)

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

Divisibility Rules I: Base 10 Number System

Public Key Cryptography

Distribution of Primes

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

Wilson s Theorem and Fermat s Theorem

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

Modular Arithmetic. Kieran Cooney - February 18, 2016

SOLUTIONS FOR PROBLEM SET 4

Math Fundamentals for Statistics (Math 52) Unit 2:Number Line and Ordering. By Scott Fallstrom and Brent Pickett The How and Whys Guys.

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

Remember that represents the set of all permutations of {1, 2,... n}

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

Math 412: Number Theory Lecture 6: congruence system and

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

Diophantine Equations and Modulo 11.

Logarithms. Since perhaps it s been a while, calculate a few logarithms just to warm up.

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

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

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

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

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

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

Modular Arithmetic: refresher.

Addition and Subtraction

Equivalent Fractions

Discrete Math Class 4 ( )

MST125. Essential mathematics 2. Number theory

Math Runes. Abstract. Introduction. Figure 1: Viking runes

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

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

Solutions for the Practice Questions

The number theory behind cryptography

The Problem. Tom Davis December 19, 2016

Math 1111 Math Exam Study Guide

Grade 6 Math Circles March 1-2, Introduction to Number Theory

Math 1111 Math Exam Study Guide

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

An elementary study of Goldbach Conjecture

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

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

It feels like magics

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

Primitive Roots. Chapter Orders and Primitive Roots

By Scott Fallstrom and Brent Pickett The How and Whys Guys

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

Mark Kozek. December 7, 2010

ALGEBRA: Chapter I: QUESTION BANK

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

Quadratic Residues. Legendre symbols provide a computational tool for determining whether a quadratic congruence has a solution. = a (p 1)/2 (mod p).

Algorithmic Number Theory and Cryptography (CS 303)

A Covering System with Minimum Modulus 42

How to Become a Mathemagician: Mental Calculations and Math Magic

Lesson 1 6. Algebra: Variables and Expression. Students will be able to evaluate algebraic expressions.

Section 1.5 An Introduction to Logarithms

Transcription:

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 the same remainders when divided by n. In other words, the difference a b is divisible by n. For instance, when you divide 16 by 3, you get 5 remainder 1; and when you divide 22 by 3 you get 7 remainder 1. Since the remainders are the same (1), we say that 16 22 (mod 3). Note that another way of checking this is that 16 22 = 6, which is divisible by 3. Examples: 5 1 (mod 2)... because 5 1 = 4 is divisible by 2. 6 2 (mod 4)... because 6 2 = 4 is divisible by 4. 12 0 (mod 3) because 12 0 = 12 is divisible by 3. In general, saying that x is congruent to zero modulo n ( x 0 (mod n) ) is just another way of saying that x is divisible by n. 7 3 (mod 5)... because 7 ( 3) = 10 is divisible by 5. The word congruent means the same or equivalent. Congruences are useful because many of their properties are similar to properties of ordinary equality. They tell us that certain properties of numbers depend only on their remainder, not on the actual number itself. Properties of Congruences: (1) a a (mod d) (2) a b (mod d) implies b a (mod d) (3) If a b (mod d) and b c (mod d), then a c (mod d). (4) If a a (mod d) and b b (mod d), then a ± b a ± b (mod d) ab a b (mod d) Copyright 2008-2011 Olga Radko/Los Angeles Math Circle/UCLA Department of Mathematics. 1

LAMC handout 2 Suppose I wanted to define an unusual kind of addition for fractions I ll call it crazyaddition and write it with a little circle around the plus sign, and it works like this: a b c d = a + c b + d Problem 1. How does this compare to the usual formula for addition? The usual formula is: a b + c d = Problem 2. The crazy-addition formula is simpler than the usual formula for adding fractions. Why don t we use it instead? (There could be more than one reason...)

LAMC handout 3 Here s one good reason we don t use crazy-addition: It doesn t work to represent fractions different ways! Take the fractions 1 2 = 2 4 and 2 3 = 6 9. Problem 3. Compute: Now compute: 1 2 2 3 = 2 4 6 9 = I (crazy-)added the same two numbers each time are the results equal? (Right, they re not equal!) We should step back and worry a bit about modular arithmetic. I ve said that it s just fine to add and subtract and multiply remainders, and that 3 7 11 1 (mod 4), but how do I know that adding and multiplying actually works? That is to say, even though 3 11 (mod 4) and 2 18 (mod 4), how do I know that 3 + 2 11 + 18 (mod 4) and 3 2 11 18 (mod 4)? Remember, with crazy-addition, this sort of thing DIDN T work; when I crazy-added different-but-equal representations, I got UNEQUAL answers. Why couldn t the same thing happen with modular addition (or multiplication)? Let s prove that addition and multiplication work... If an integer a is divisible by n, it means that we can write a = qn for some other integer q. If a has a remainder of r upon division by n (where r is between 0 and n 1 inclusive), it means that we can write a = And if a a (mod n), it means they both have the same remainder... so I could write a = (Careful... Don t use the variable q twice in different places to mean possibly-different numbers! Pick another variable for the second time, say q.) Now if b b (mod n) it means we can write...

LAMC handout 4 It s fine to add, subtract, and multiply remainders modulo n. (We just proved it!) But division is trickier... DIVISION DIFFICULTY #1: Sometimes there is not a unique answer! Problem 4. Fill in the blanks: [2] 4 [1] 4 = [ ] 4 [2] 4 [3] 4 = [ ] 4 What should [2] 4 /[2] 4 be? Or what s the problem here? DIVISION DIFFICULTY #2: Sometimes two nonzero numbers multiply to give 0! Problem 5. Give at least two different examples, using two different modulus, of two nonzero numbers multiplying to give 0. Problem 6. Can you find a modulus where it s never the case that two nonzero numbers multiply to 0? Write down the multiplication table for your modulus to be sure. Is it the only one, or are there others?

LAMC handout 5 In the ordinary numbers, dividing is the same thing as multiplying by the inverse. If I want to divide by 3, I may as well multiply by 1. 3 If I want to divide by 1, I can multiply by 8. 8 If I want to divide by 2, I can always multiply by 5. 5 2 In ordinary numbers, the multiplicative inverse of x is a number y such that x y = 1. We can think about multiplicative inverses in modular-arithmetic world too! For example, in modulus 5, we have [2] 5 [3] 5 = [6] 5 = [1] 5, so 2 and 3 are inverses of each other modulo 5. Problem 7. Fill in the blanks where possible, or if there is no inverse write No inverse exists! (1) [3] 8 [ ] 8 = [1] 8 (2) [5] 7 [ ] 7 = [1] 7 (3) [6] 11 [ ] 11 = [1] 11 (4) [2] 12 [ ] 12 = [1] 12 (5) [8] 15 [ ] 15 = [1] 15

LAMC handout 6 (6) [9] 15 [ ] 15 = [1] 15 (7) [2] 1000 [ ] 1000 = [1] 1000