Modular Arithmetic Flashcards
the range of a mod n
0 to n-1
5 mod 11
5
17 mod 11
6
11 mod 11
0
-12 mod 11
10
≈ denotes ___ in modulo arithmetic
congruence
refers to numbers that have the same modular value
congruence
Note that congruent numbers differ by multiples of…
the modulus
For large values, we can use ___ to simplify modular computations.
modulo reduction
( ( a mod n ) + ( b mod n ) ) mod n =
( a + b ) mod n
( 12 + 8 ) mod 5 =
( 12 + 8 ) mod 5 = ( ( 12 mod 5 ) + ( 8 mod 5 ) ) mod 5 = ( 2 + 3 ) mod 5 = 5 mod 5 = 0
( 12 * 8 ) mod 5 =
( 12 * 8 ) mod 5 = ( ( 12 mod 5 ) * ( 8 mod 5 ) ) mod 5 = ( 2 * 3 ) mod 5 = 6 mod 5 = 1
2^6 mod 5 =
2^6 mod 5 = ( ( 2^2 mod 5 ) * ( 2^4 mod 5 ) ) mod 5 = ( 4 mod 5 ) * ( 16 mod 5 ) = (4*1) mod 5 = 4
3^7 mod 5 =
2
if x and y are mod inverses, x and y must be…
less than the modulus