20161013 We looked at a few more examples of solving equations

20161013
We looked at a few more examples of solving equations using modular arithmetic.
Example 1:
Find all solutions to
is equivalent to
in
Since 3 and 7 are relatively prime (i.e. gcd(3,7) = 1), we know
A little bit of thought (and experimentation) reveals that
exists in
in
So
Thus
is one solution ... but we are asked for all solutions. We know that adding
7 to a number does not change its final value when we take the result mod 7.
(Example: (2) mod 7 = 2,
(2 + 7) mod 7 = 2,
(2 + 2*7) mod 7 = 2, etc.
This means that since 6 is a solution to our problem, so are 6 + 7, 6 + 14, 6 – 7, etc.
We can summarize these as
Note that this example demonstrates an important principle: if a and k are relatively prime, we can
always solve equations of the form
using
in
Example 2:
Find all solutions to
We can take the first step the same way as in the last example:
is exactly equivalent to
in
But if we look at the table for
we see that there is no value of x such that
... from which we conclude that there are no solutions to the original problem
(because if there were, there would have to be one in )
We also see that 4 has no inverse in , so it will not be possible to apply the solution
technique used in Example 1.
We have seen that finding all solutions to the equation
is straightforward when a and
k are relatively prime. This means that when k is prime, all equations of the form
have solutions.
In Example 2, we saw a case where a and k were not relatively prime, and the problem had no solution.
Unfortunately the situation is still not cleared up. Consider this example:
Example 3:
Find all solutions to
6 and 8 are not relatively prime so 6 has no inverse in
... but it turns out that the
question does have solutions. For example,
so 2 is a solution ... and
by what we saw before, this means that any integer of the form
is a solution. But
these are not the only solutions! For example,
so 6 is another
solution, and so any integer of the form 6 + 8k is also a solution.
The bottom line is that
may be solvable when gcd(a,k) > 1
is always solvable when a and k are relatively prime, and
The (Chinese) Remainder Theorem
Now we are going to use the information above to illustrate one of the most important and widely
applied theorems in Discrete Mathematics.
Consider this problem: Find all values
such that
and
is solved by all integers of the form
determine the values of k such that
. Our task is now to
We can simplify this to
... and look! 5 and 8 are relatively prime!
(This is no accident – I chose this example carefully). This means we can find
in
... in fact it turns out that
. So the values of k that satisfy
are
all integers of the form
Now that we know the appropriate values of k, we can go back to
know k must equal 5+8j, so we see that
to
. We now
which simplifies
and this is exactly the solution to the original problem.
(Chinese) Remainder Theorem: Let n and m be relatively prime integers, and let a and b be any
integers. Then the equivalences
and
are solvable for x, using the method in the previous example.
Proof: The proof of this theorem is in the text – you should make sure you understand it.