Wednesday, May 25, 2016

elementary number theory - Solving congruences



I've the following congruence system:



I2x0mod7IIx1mod5IIIx3mod4



Now I tried to solve it:



IIx1mod5x=5x1+1I2(5x1+1)0mod710x1+20mod10x12mod710x112mod75x16mod75x1=7x2+6



and now



x=5x1+1=7x2+6+1=7x2+7x0mod7




This result is obviously no solution. If I try to solve it with euclidean algorithm, I'll get the correct result. Now I try to unterstand why the first idea is wrong. In general I understood the way of solving congruence systems, but never thought about why it works.



Any help is appreciated.


Answer



It's a good idea to try a pedestrian way to solve your problem.
Here's mine.



Let xZ be a solution of your system. Then
there exists a,b,cZ such that:
{2x=7ax=1+5bx=3+4c.

We must then have1:
{40x=140a28x=28+140b35x=105+140c
Now2, 3×403×2835=1, hence:
x=3×28105+140(3a3bc)=189+140(3a3bc),
i.e.,
x=91+140(3a3bc2).



Hence a necessary condition for xZ to be a solution of your system is:
x=91mod140.
It is now easy to check that this condition is also sufficient: let mZ and set x=91+140m. Then:

x=7×(13+20m)
hence x=0mod7.
x=1+5×(18+28m)
hence x=1mod5.
x=3+4×(22+45m)
hence x=3mod4.








In general I understood the way of solving congruence systems, but never thought about why it works.




Hope this helps…






1140 naturally appears as the least common multiple of 4, 5 and 7.



2We're lucky to find such a simple relation, aren't we?



No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...