Modular arithmetic


By Olof Sisask (P3033) on Friday, May 25, 2001 - 11:42 am :

Hi,


How does the fact that there's a unique integer x, 0xmn-1, such that

x a1 (modm)

and

x a2 (modn) ( m and n coprime)

follow from the results that if a, b are integers, and

ab(modm)

and

ab(modn),

then ab(modmn), and if 0a, bmn-1, then a=b?
It's a slow morning...

Thanks,
Olof


By Kerwin Hui (Kwkh2) on Friday, May 25, 2001 - 02:41 pm :
Yes, it does follow once you have shown there is a solution.

One way to prove that there exists the integer x is by Bezout's Theorem, which states that there exists l, m such that

lm+mn=hcf(m,n)

and in our case, hcf(m,n)=1. So now look at mod m and mod n respectively, we see that

lm1(modn)

mn1(modm)

and so one solution is x= a2 lm+ a1 mn.

Now we suppose that x and y are solutions. Then, we have x-y0(modm) and x-y0(modn) and so x-y0(modmn).

Kerwin


By Olof Sisask (P3033) on Friday, May 25, 2001 - 06:59 pm :

Hi Kerwin,

How do you know that x = a2 l m+a1 m n is a solution? I get the rest.

Thanks,
Olof


By Kerwin Hui (Kwkh2) on Friday, May 25, 2001 - 10:31 pm :
Look at lm1(modn), we see that x a2 ×1(modn), as n0modn. Similar for mod m.

Kerwin


By Olof Sisask (P3033) on Friday, May 25, 2001 - 11:10 pm :

Ah of course. Cheers Kerwin.

Olof


By Anonymous on Friday, June 1, 2001 - 12:31 pm :
How does x= a2 lm+ a1 mn fulfil the condition 0xmn-1?
By Kerwin Hui (Kwkh2) on Friday, June 1, 2001 - 11:36 pm :

I think there is some confusion here due to lazy-typing. What I have not typed is "a2 l m+a1 m n is a solution in Z , and we can always reduce this to a member of the set of residues {0,1,...,mn-1}".

Kerwin