This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Modular Arithmetic Definition: If a, b Z , and m Z + , we say that a is congruent to b modulo m , and write a b (mod m ) if a and b leave the same remainder on division by m . Examples . 10 24 (mod 7), 15 12 (mod 9), and 442 2 (mod 10). You can think of the integers (mod m ) as the hours on a circular clock with m hours, , 1 , . . . , m 1. For positive numbers you move around the circle clockwise, and for negative numbers you move counterclockwise. The important part is that the number of times you go around the circle and return to zero makes no difference to where you end up. What matters is the number of places you move when it is no longer possible to make it around the circle any more, and this number is one of 0 , 1 , 2 , . . . , m 1. These are the possible remainders on division by m . The universe of integers (mod m ) really only consists of the numbers 0 , 1 , 2 , . . . , m 1; modulo m , any other integer is just one of these with another name. In many programming languages there is a function mod . If m 6 = 0 is an integer, then a (mod m ) is the unique number among 0 , 1 , 2 , . . . , m 1 to which a is congruent modulo m . It is the remainder (as in the division algorithm  thats why its unique) when a is divided by m ....
View
Full
Document
This note was uploaded on 02/05/2011 for the course MATH 377 taught by Professor Stephenlang during the Spring '11 term at University of Victoria.
 Spring '11
 stephenlang
 Calculus, Division, Remainder

Click to edit the document details