Section 5.2 A Strategy For the First Solution
The previous proposition always works. However, it can be very tedious to find that first solution if the modulus is not small. This section is devoted to strategies 1 for simplifying a congruence so that finding such a solution is easier.Fact 5.2.1. Strategies that work for simplifying congruences.
We can do two main types of simplification. First, there are two types of cancellation.
If
and all are divisible by a common divisor, we can cancel that divisor out (keeping in mind that we still will need our final solution to be modulo ).If
and share a common divisor which is coprime to the modulus, we can cancel that divisor from (only).
See Propositions 5.2.6 and 5.2.7 for precise statements and proofs.
Secondly, there are two counterintuitive operations that may lead to a simpler congruence (using least nonnegative residues).
We could multiply
and by something coprime to If, after reducing modulo that makes or smaller, then that was a good idea!We can add some multiple of
to Again, if that happens to make and (the new) share a factor, then it was a good idea!
These four steps may be applied in any order, though typically the first two are done as often as possible. See Example 5.2.5 for why coprime is necessary in two of the steps.
Example 5.2.2. A big example.
Let's do a big problem exemplifying all the strategies; we will break it up into possible steps you might do.
First, note that all three of the coefficients and modulus are divisible by
So right away we should simplify by dividing by 3. But keep in mind that our final solution will need to be modulo 33, not modulo eleven! We should still end up with total solutions, and if we don't, we have messed up somewhere.-
Now we have
(mod ). (Again, although this will have one solution modulo 11, we will need to get the other two solutions modulo 33.) Since 10 and 6 are both divisible by 2, and since we can divide the coefficients (not modulus) by without any other muss. -
So take
(mod ), and let's try to replace by another number congruent to 3 modulo 11 which would allow me to use the above steps again.-
I could try
but that givesand 14 doesn't share a divisor with
(from the ). -
If I try
givingthen
does share a divisor with
-
-
Now I can go back and reduce
(mod ) toAnd that's the answer!
-
Or is it? Remember in the first step that we started modulo 33, and that all the answers will be equivalent modulo 11. So we see that
will be the answer, which is the three equivalence classes
Does it check out?
xxxxxxxxxx
[mod(30*x,33)==18 for x in [5,16,27]]
One final observation is that we avoided trial and error as long as possible. At various points we could have done so, but
Example 5.2.3.
Let's finish the previous example again, but using the other possible counterintuitive strategy. That was the trick to multiply
We were at
(mod ).-
Multiplying
and by which is coprime to gives us This reduces to
and gives the same answer as before (provided we remember to get all possible answers modulo 33).
Example 5.2.4.
Try completely solving one of the following two congruences (Exercise 5.6.3) on your own now, before moving on. The rest of the Exercises provide other interesting practice.
(mod ) (mod )
Example 5.2.5.
Finally, let's see examples of using the strategies poorly.
First, suppose
As a similar example, suppose we want to solve
The moral of the story is that while some structure is preserved when we don't stick to numbers coprime to the modulus, it's very easy to remove or add spurious solutions, so it must be avoided.
Proposition 5.2.6. Canceling, Part I.
If
Proof.
Like many such proofs, you basically follow your nose.
First write \(ad\equiv bd\) (mod \(nd\)) as \(nd \mid ad-bd\text{,}\) or \(ad-bd=k(nd)\) for some \(k\in\mathbb{Z}\text{.}\) We rewrite this as \(d(a-b)=d(kn)\text{.}\)
Since \(d\neq 0\text{,}\) asserting \(d(a-b)=d(kn)\) is equivalent to saying \(a-b=kn\text{,}\) which is of course by definition saying that \(a\equiv b\) (mod \(n\)).
Since all steps were equivalences, both statements are equivalent.
Proposition 5.2.7. Canceling, Part II.
If
Proof.
We already essentially know the direction when we assume \(a\equiv b\) from Proposition 4.3.2. I'll sketch the proof of the cancellation direction; see Exercise 5.6.2 and Exercise 5.6.7.
Use the definitions as above, starting with the \(ad\) situation.
You should have that \(n\) divides some stuff, which is itself a product of \(d\) and other stuff.
We had a proposition somewhere about coprimeness and division; what remains should yield us \(a\equiv b\) (mod \(n\))