I've the following congruence system:
I2x≡0mod7IIx≡1mod5IIIx≡3mod4
Now I tried to solve it:
IIx≡1mod5⇒x=5x1+1I⇒2(5x1+1)≡0mod7⇔10x1+2≡0mod⇔10x1≡−2mod7⇔10x1≡12mod7⇒5x1≡6mod7⇒5x1=7x2+6
and now
x=5x1+1=7x2+6+1=7x2+7⇔x≡0mod7
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 x∈Z be a solution of your system. Then
there exists a,b,c∈Z such that:
{2x=7ax=1+5bx=3+4c.
We must then have1:
{40x=140a28x=28+140b35x=105+140c
Now2, 3×40−3×28−35=1, hence:
x=−3×28−105+140(3a−3b−c)=−189+140(3a−3b−c),
i.e.,
x=91+140(3a−3b−c−2).
Hence a necessary condition for x∈Z to be a solution of your system is:
x=91mod140.
It is now easy to check that this condition is also sufficient: let m∈Z 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