john_hopes's blog

By john_hopes, history, 6 years ago, In English

Suppose, I know m1, m2, m3 and P1, P2, P3 of the following equations. Here P1, P2, P3 are prime numbers.

X mod P1 = m1

X mod P2 = m2

X mod P3 = m3

Now, for another prime number P4,

I need to find, X mod P4 = ?

Using Chinese Remainder Theorem I can calculate this if P4 is not a prime and is equal to (P1xP2xP3).

How can I solve this problem for any prime P4?

  • Vote: I like it
  • +7
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Just find X from the three equations, and calculate X mod P4? I assume it's given to you.

  • »
    »
    22 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how can I find the smallest x from here? can you explain a lil bit?

»
6 years ago, # |
  Vote: I like it +17 Vote: I do not like it

If P4 is different from P1, P2 and P3, then (by the Chinese Remainder Theorem) X mod P4 can be anything, as you can solve the 4-equation system regardless of the value you choose for X mod P4.