Better way to solve systems of linear congruences in general
-
Note: this requires knowledge about modular inverses.
Suppose you have the systemwhich was used in the mini-question.
By CRT (Chinese Remainder Theorem), we know that there is a unique solution modulo that satisfies the system. From the first congruence, we see that can be expressed as where is a positive integer.
Substituting this into the second congruence, we getThis means that , where is another positive integer. Substituting this into , we get . Therefore, . From this, you would get the answer of for the mini-question.
Anyways, I made this post to emphasize a different way to solve systems of linear congruences, which I found from AoPS.
(I usually use this method to solve modular congruences, but if numbers are small enough, I usually end up using guess and check. Also, mods, can you check this?) -
This is a very nice and interesting way to solve modular congruences!
What is this method called?
-
@西瓜 There isn't a name. This method can be used to solve systems of modular congruences in general: bigger numbers, etc.
-
Okay, thanks!
@professionalbronco