1

Suppose we have two relatively prime integers $a$ and $b$. Now, suppose that for some $x$ we have $x \equiv A \pmod{a}$ and $x \equiv B \pmod{b}$. Is there any way we can express $x \pmod{a \cdot b}$ in terms of $A$ and $B$? Also, can we do something similar for $x \pmod{a^n \cdot b^m}$ where $n, m\in \mathbb{Z}_{>0}$?

I suppose this would involve solving the congruence relation $(x-A)^n(x-B)^m \equiv 0 \pmod{a^n \cdot b^m}$, but I have no clue as to what to do with this...

Bill Dubuque
  • 272,048
milin
  • 223
  • 1
  • 6

1 Answers1

1

You can use the inverse isomorphism of the isomorphism of the Chinese Remainder theorem: \begin{align} \varphi:\mathbf Z/ab\mathbf Z &\longrightarrow \mathbf Z/a\mathbf Z\times\mathbf Z/b\mathbf Z\\ x\bmod ab &\longmapsto(x\bmod a,x\bmod b) \end{align} This inverse isomorphism can be expressed in terms of a Bézout's relation $ua+vb=1$. It is given, with your notations, by $$\varphi^{-1}(A\bmod a, B\bmod b)=Bua+Avb.$$

As to the case of $a^n$ and $b^m$, you have to find a Bézout's relation for these elements (the fastest is with the extended Euclidean algorithm).

Bernard
  • 175,478