[an error occurred while processing this directive]
Recall:
-
a mod m means the remainder upon dividing by m;
this partitions the integers into equivalence classes.
-
a ≡ b (mod n) means… m | a-b.
-
In +,⋅ mod m, we saw we can replace any number with
a congruent number. Not so for exponentiation.
Division mod m
Consider the series 0, 1⋅a, 2⋅a, 3⋅a, 4⋅a, … mod m.
-
Try a=5, m=8:
0, 5, 2, 7, 4, 1, 6, 3, 0, 5, 2, 7, …
We see we hit a cycle (of length 8).
What is 5-1 mod 8?
That is, the multiplicative inverse of 5, mod 8?
Looking at the sequence above, we see that 5⋅5≡1,
so 5 is its own inverse: 5-1 ≡ 5 (mod 8).
-
Try a=6, m=8:
0, 6, 4, 2, 0, 6, …
Uh-oh, we hit a cycle (of length four).
What is 6-1 mod 8? It doesn't exist!
(This makes sense when you think about it: 6 times any number
will be even, so it will never by 1 plus a multiple of 8.
What is the difference between 5 and 6, in mod 8, so that
one has an invese and the other doesn't?
Th'm: If ac≡bc (mod m), and gcd(c,m)=1, then a≡b (mod m).
["relatively prime"]
[Proof.]
What this means:
"We can divide by c, mod m."
For instance, let m=8 and c=3.
Knowing that 3x ≡ 15 (mod 8),
we can divide both sides by 3
and conclude that x ≡ 5.
(Indeed, this turns out to be the the only x satisfying the constraint,
mod 8).
However, consider 4x &equiv 12 (mod 8).
We can not conclude that x≡3.
In fact, only x≡1 satisfies the constraint 4x≡12 (mod 8).
Applications: parity check; hash: ssn mod 104.
[an error occurred while processing this directive]
[an error occurred while processing this directive]