johng said:
Hi,
I tend to agree with caffeinemachine that the easiest computation is via the Chinese remainder theorem.
Given m and n relatively prime, the unique x (mod mn) that satisfies x = a (mod m) and x = b (mod n) is of the form a + km for some k with 0 <= k < n.
(All of the given values are different for the range of k's and so one must be b (mod n)).
So I want -2 + 17k = 2 (mod 11)
6k = 4 (mod 11)
k = 8 (mod 11) -- the multiplicative inverse of 6 is 2 mod 11.
So x = -2 +8*17 = 136 - 2 = 134.
Yes, but...
The ease of this is "hidden" in the step:
6k = 4 --> k = 8.
In this particular case, one can guess rather easily that [6
-1]
11 = 2 by trial-and-error. In general, finding a (multiplicative) inverse mod n (if it exists, which it assuredly will if n is prime, and the element inverted is not a multiple of n = p) involves exactly the same steps I outlined above. One often does not have a discrete log table lying around to read off which power of a generator a particular element is, and one HAS to resort to the division algorithm to find the inverse (finding primitive elements is not always a trivial task, although it IS easier for small numbers).
Don't misunderstand me, I find the application of the CRT a beautiful and elegant solution. At its heart, the CRT states that:
If (m,n) = 1, then $\Bbb Z_{mn} \cong \Bbb Z_m \times \Bbb Z_n$
However, while the ring-homomorphism one way is trivial to display, the inverse homomorphism is nontrivial (and amounts to actually solving the congruence pair). There is a slight difference between knowing a solution exists and exhibiting that solution.
Your calculations and mine are, of course, the same, as can be seen by taking the equation:
11*12 + 2 = 17*8 - 2 (mod 11).
I also do not know if the original poster has seen a PROOF of the CRT, with an understanding of what it means for "compound" moduli. In all fairness (both to you and caffeinemachine) I admit sometimes an understanding of more advanced methods makes problems like these easier to deal with. Do I run the risk of under-estimating the original poster's sophistication? Of course. I am the first to admit the laziest proof is not always the shortest.
If the exponent has been larger, my way would undeniably be more cumbersome. I certainly mean no disrespect to either of your fine answers. Knowing we can reduce an exponent b in a
b (mod n), by taking b (mod φ(n)), is something well worth remembering, if one has been exposed to Euler's theorem (which we can assume the OP has, by the thread title), and I note in passing that Fermat's "Little Theorem" (which caffeinemachine DOES invoke) is just a special case of Euler's Theorem.
One hopes that the original poster gains more from our discussion of solution techniques here than just the answer to his problem.