Chinese remainder theorem when modulus are not distinct, is my solution right? also - is this a good way to solve such kind of questions?

37 Views Asked by At

i learnt about the Chinese remainder theorem, and im trying to solve the following question:

find the minimal solution x for

(1)x = 11 mod 24

(2)x = 5 mod 18

(3)x = 5 mod 30

i know that in order to use the Chinese reminder theorem i need the modulos to be distinct

how can i solve it regardless?

i tried the following(and i think this is good):

24 = 8*3

18 = 2*9

30 = 2 * 3 * 5

so(1) is the same as:

(1*)x = 11 = 3 mod 8

(2*)x = 11 = 2 mod 3

(2) is the same as:

(3*)x = 5 = 1 mod 2

(4*)x = 5 mod 9

(3) is the same as:

(5*)x = 5 = 1 mod 2

(6*)x = 5 = 2 mod 3

(7*)x = 5 = 0 mod 5

from 1* we get x = 8k+3 so it also means x = 1 mod 2 so if x satisfies 2* it also satisfies 3*,5*)

from 4* we get x = 9k + 5 and this implies x = 2 mod 3, so if x satisfies 4* it also satisfies 2*,6*

so it is enough to solve :

x = 3 mod 8 x = 5 mod 9 x = 0 mod 5

and from here i can use the Chinese remainder theorem

this way of solving is fine right? is there a better way? is this a good way to approach solving such equations when i cant use the chinese remainder theorem because the modulus are not distinct?

thanks!!