The Chinese remainder theorem states that if and are positive integers
which are relatively prime and and are any two integers , then there
is an integer such that
(1)
and
(2)
Moreover,
is uniquely determined modulo . Equivalently, every pair of residue
classes modulo and corresponds to a unique residue
class modulo .
The Chinese remainder theorem is implemented in the Wolfram Language as ChineseRemainder [a 1,
a 2, ... ,
m 1,
m 2, ... ].
It is also implemented indirectly using Reduce
with a domain specification of Integers .
More generally, given simultaneous congruences
(3)
for ,
..., ,
where the
are pairwise relatively prime positive
integers , a solution is
(4)
where
(5)
and the
are determined from
(6)
See also Congruence ,
Congruence
Equation ,
Linear Congruence Equation
Explore with Wolfram|Alpha
References Flannery, S. and Flannery, D. In Code: A Mathematical Journey. London, England: Profile Books, pp. 123-125,
2000. Ireland, K. and Rosen, M. "The Chinese Remainder Theorem."
§3.4 in A
Classical Introduction to Modern Number Theory, 2nd ed. New York: Springer-Verlag,
pp. 34-38, 1990. Numberphile. "Chinese Remainder Theorem and
Cards." Aug. 8, 2018. https://www.youtube.com/watch?v=l9dXo5f3zDc . Séroul,
R. "The Chinese Remainder Theorem." §2.6 in Programming
for Mathematicians. Berlin, Germany: Springer-Verlag, pp. 12-14, 2000. Uspensky,
J. V. and Heaslet, M. A. Elementary
Number Theory. New York: McGraw-Hill, pp. 189-191, 1939. Wagon,
S. "The Chinese Remainder Theorem." §8.4 in Mathematica
in Action. New York: W. H. Freeman, pp. 260-263, 1991. Referenced
on Wolfram|Alpha Chinese Remainder Theorem
Cite this as:
Weisstein, Eric W. "Chinese Remainder Theorem."
From MathWorld --A Wolfram Resource. https://mathworld.wolfram.com/ChineseRemainderTheorem.html
Subject classifications