How do you solve modulo equations ? I need steps ! Example : 3x = 5 (mod 7) read = as "congruent".
Well, I would use equivalence sign, not equality sign. 3x is congruent to 5 in modulo 7 means that when you divide 3x by 7, the remainder is 5, i.e., 3x=7a+5, where a is an integer. Then the solution would be x=(7a+5)/3, where a is an integer.
Suppose we want to solve the congruence \[ax\equiv c \mod m\]First, find \(g=\gcd(a, m)\). Now, if \(g \nmid c\), then there is not solution. If \(g \;|\;c\) it has exactly \(g\) incongruous solutions. To find each solution, find a solution \((v_0, w_0)\) to the equation \(av+mw=g\). Then, a solution to \(ax\equiv c \mod m\) is given by the formula \[x_0={c v_0 \over g}\]
To find all incongruous solutions, use the formula \[x\equiv x_0+k\cdot{ m \over g} \mod m\]
I only understood till the part where you said taking gcd(a,m). Can you explain the further part please ?
The notation \(g\;|\;c\) means that g divides c, and \(g\nmid c\) means that g does not divide c.
So for your particular problem, \(\gcd(3, 7)=1\), and 1 divides 5, so it has exactly 1 solution.
Now we need to find two integers \((v_0, w_0)\) such that \[av_0+mw_0=-1\]We can find this using the Extended Euclidean Algorithm or just by looking at the numbers and noticing that \[-2(3)+1(7)=1\]Thus we have that \((v_0, w_0)=(-2, 1)\)
Now to find the solution, \[x={5(-2) \over 1}=-10\]We can reduce this number modulo 7, to get that \[-10\equiv 4 \mod 7\]
Does this process make more sense to you know @juggalox?
She does not need that much rigor, George..
This is the simplest process I know of to solve any linear congruence relation. For small values such as \(3x\equiv 5 \mod 7\) it may be faster to use guess and check. What if you were to try to solve \[2346x\equiv 32453 \mod 96181\]The method I provided is a method for solving any linear congruence very quickly and efficiently.
You know that juggalox won't encounter such numbers. Nor will be asked for a rigorous approach to such a problem in this level. Though, you must be a very good mathematician.
Thanks for the compliment, but quite frankly, this was the method I learned when I was first introduced to modular arithmetic. Although it would be a good question to ask @juggalox what level of math they are currently in.
Join our real-time social learning platform and learn together with your friends!