## Frequent Links

# Chinese remainder theorem

The **Chinese remainder theorem** is a result about congruences in number theory and its generalizations in abstract algebra. It was first published in the 3rd to 5th centuries by the Chinese mathematician Sun Tzu.

In its basic form, the Chinese remainder theorem will determine a number *n* that, when divided by some given divisors, leaves given remainders. For example, what is the lowest number *n* that when divided by 3 leaves a remainder of 2, when divided by 5 leaves a remainder of 3, and when divided by 7 leaves a remainder of 2?

## Contents

- 1 Theorem statement
- 2 Existence and uniqueness
- 3 Finding the solution with basic algebra and modular arithmetic
- 4 A constructive algorithm to find the solution
- 5 Statement for principal ideal domains
- 6 Statement for general rings
- 7 Applications
- 8 Non-commutative case: a caveat
- 9 See also
- 10 Notes
- 11 References
- 12 External links

## Theorem statement

The original form of the theorem, which is contained in the 5th-century book *Sunzi's Mathematical Classic* (孫子算經) by the Chinese mathematician Sun Tzu and later generalized with a complete solution called *Dayanshu* (大衍術) in Qin Jiushao's 1247 *Mathematical Treatise in Nine Sections* (數書九章, *Shushu Jiuzhang*), is a statement about simultaneous congruences.

Suppose *n*_{1}, ..., *n _{k}* are positive integers that are pairwise coprime. Then, for any given sequence of integers

*a*

_{1}, ...,

*a*, there exists an integer x solving the following system of simultaneous congruences.

_{k}- <math>\begin{cases} x \equiv a_1 & \pmod{n_1} \\ \quad \cdots \\ x \equiv a_k &\pmod{n_k} \end{cases}</math>

Furthermore, all solutions x of this system are congruent modulo the product, *N* = *n*_{1} ... *n _{k}*. Hence

- <math>x \equiv y \pmod{n_i}, \quad 1 \leq i \leq k \qquad \Longleftrightarrow \qquad x \equiv y \pmod{N}.</math>

Sometimes, the simultaneous congruences can be solved even if the *n _{i}* are not pairwise coprime. A solution x exists if and only if:

- <math>a_i \equiv a_j \pmod{\gcd(n_i,n_j)} \qquad \text{for all }i\text{ and }j</math>

All solutions x are then congruent modulo the least common multiple of the *n _{i}*.

Sun Tzu's work contains neither a proof nor a full algorithm. What amounts to an algorithm for solving this problem was described by Aryabhata (6th century; see Kak 1986). Special cases of the Chinese remainder theorem were also known to Brahmagupta (7th century), and appear in Fibonacci's Liber Abaci (1202).

A modern restatement of the theorem in algebraic language is that for a positive integer with prime factorization

- <math>n = p_1^{r_1}\cdots p_k^{r_k}</math>

we have the isomorphism between a ring and the direct product of its prime power parts:

- <math>\mathbf{Z}/n\mathbf{Z} \cong \mathbf{Z}/p_1^{r_1}\mathbf{Z} \times \cdots \times \mathbf{Z}/p_k^{r_k}\mathbf{Z}</math>

The theorem can also be restated in the language of combinatorics as the fact that the infinite arithmetic progressions of integers form a Helly family (Duchet 1995).

## Existence and uniqueness

The existence and uniqueness of the solution can easily be seen through a non-constructive argument:

There are *N* = *n*_{1}·…·*n _{k}* different k-tuples of remainders. Let us call this set R. On the other hand

*N*= #{1, ...,

*N*}, and each element of {1, ...,

*N*} corresponds to an element of R. Can two numbers

*a*,

*b*∈ {1, ...,

*N*}, correspond to the same member of R? That is, can they have the same set of remainders when divided by

*n*

_{1}, ...,

*n*? If they did then

_{k}*a*−

*b*would be divisible by each n

_{i}. Since the n

_{i}are relatively prime,

*a*−

*b*would be divisible by their product: N. But, as 0 < #REDIRECTmw:Help:Magic words#Other

This page is a soft redirect.

*a*−

*b*#REDIRECTmw:Help:Magic words#Other

This page is a soft redirect. <

*N*, this can't be, so this function {1, ...,

*N*} →

*R*is one-to-one. Since #{1, ...,

*N*} = #

*R*, it must be onto as well. Thus we have established the existence of a bijection.

Existence can be seen by an explicit construction of x. Let [*a*^{−1}]_{b} denote the multiplicative inverse of *a* (mod *b*) given by the Extended Euclidean algorithm. It is defined exactly when a and b are coprime; the following construction explains why this condition is needed.

### Case of two equations (*k* = 2)

Consider the system:

- <math>\begin{cases} x \equiv a_1 & \pmod{n_1} \\ x \equiv a_2 & \pmod{n_2} \end{cases}</math>

Since gcd(*n*_{1}, *n*_{2}) = 1, Bézout's identity implies:

- <math>n_2 \left [n_2^{-1} \right ]_{n_1} + n_1 \left [n_1^{-1} \right ]_{n_2} = 1</math>

This is true because we are using the inverses provided by the Extended Euclidean algorithm; for any other inverses, this would not necessarily be true, but still be valid (mod *n*_{1}*n*_{2}).

Multiplying both sides by x, we get

- <math>x = x n_2 \left [n_2^{-1} \right ]_{n_1} + x n_1 \left [n_1^{-1} \right ]_{n_2}</math>

If we take the congruence modulo *n*_{1} for the right-hand-side expression, it is readily seen that

- <math>x \underbrace{n_2 \left [n_2^{-1} \right ]_{n_1}}_1 + x \underbrace{n_1}_0 \left [n_1^{-1} \right ]_{n_2} \equiv x \times 1 + x \times 0 \times \left [n_1^{-1} \right ]_{n_2} \equiv x \pmod {n_1}</math>

But we know that *x* ≡ *a*_{1} (mod *n*_{1}), thus this suggests that the coefficient of the first term on the right-hand-side expression can be replaced by *a*_{1}. Similarly, we can show that the coefficient of the second term can be substituted by *a*_{2}. We can now define the value

- <math>x \equiv a_1 n_2 \left [n_2^{-1} \right ]_{n_1} + a_2 n_1 \left [n_1^{-1} \right ]_{n_2}</math>

and it is seen to satisfy both congruences, for example:

- <math>a_1 n_2 \left [n_2^{-1} \right ]_{n_1} + a_2 n_1 \left [n_1^{-1} \right ]_{n_2} \equiv a_1 \times 1 + a_2 \times 0 \times \left [n_1^{-1} \right ]_{n_2} \equiv a_1 \pmod {n_1}</math>

### General case

The same type of construction works in the general case of k congruence equations. Let *N* = *n*_{1} ... *n _{k}* be the product of every modulus then define

- <math>x := \left[\sum_{i} a_i \frac{N}{n_i} \left[\left(\frac{N}{n_i}\right)^{-1}\right]_{n_i}\right]_{N}</math>

and this is seen to satisfy the system of congruences by a similar calculation as before.

## Finding the solution with basic algebra and modular arithmetic

For example, consider the problem of finding an integer x such that

- <math>\begin{cases} x \equiv 2 \pmod{3} \\ x \equiv 3 \pmod{4} \\ x \equiv 1 \pmod{5} \end{cases}</math>

### Brute-force approach

A brute-force approach converts these congruences into sets and writes the elements out to the product of 3×4×5 = 60 (the solutions modulo 60 for each congruence):

*x*∈ {2, 5, 8,**11**, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68,**71**, 74, ...}*x*∈ {3, 7,**11**, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67,**71**, 75, 79, ...}*x*∈ {1, 6,**11**, 16, 21, 26, 31, 36, 41, 46, 51, 56, 61, 66,**71**, 76, 81, 86, 91, 96, ...}

To find an x that satisfies all three congruences, intersect the three sets to get:

*x*∈ {11, 71, ...}

Which can be expressed as

- <math>x \equiv 11 \pmod{60}</math>

### Algebraic approach

Another way to find a solution is with basic algebra, modular arithmetic, and stepwise substitution.

We start by translating these congruences into equations for some t, s, and u:

- <math>\begin{cases}x = 2 + 3t \\ x = 3 + 4s \\ x = 1 + 5u \end{cases}</math>

Start by substituting the x from the first equation into the second congruence:

- <math>\begin{align}

2 + 3t &\equiv 3 &&\pmod{4} \\ 3t &\equiv 1 && \pmod{4} \\ t &\equiv (3)^{-1} \equiv 3 &&\pmod{4}

\end{align}</math>

meaning that *t* = 3 + 4*s* for some integer s. Substitute t into the first equation:

- <math>x = 2 + 3t = 2 + 3(3 + 4s) = 11 + 12s</math>

Substitute this x into the third congruence:

- <math> \begin{align}

11 + 12s &\equiv 1 && \pmod{5} \\

1 + 2s &\equiv 1 &&\pmod{5} \\ 2s &\equiv 0 &&\pmod{5}

\end{align}</math>

meaning that *s* = 0 + 5*u* for some integer u. Finally,

- <math>x = 11 + 12s = 11 + 12(5u) = 11 + 60u</math>

So, we have solutions {11, 71, 131, 191, ...}.

Notice that 60 = lcm(3,4,5). If the moduli are pairwise coprime (as they are in this example), the solutions will be congruent modulo their product.

## A constructive algorithm to find the solution

The following algorithm only applies if the *n _{i}* are pairwise coprime. (For simultaneous congruences when the moduli are not pairwise coprime, the method of successive substitution can often yield solutions.)

Suppose, as above, that a solution is required for the system of congruences:

- <math>x \equiv a_i \pmod{n_i}, \qquad i = 1, \cdots, k.</math>

Define: *N* = *n*_{1} ... *n _{k}*. For each i, the integers

*n*and

_{i}*N*/

*n*are coprime. Using the extended Euclidean algorithm we can find

_{i}*r*,

_{i}*s*∈

_{i}**Z**such that

*r*+

_{i}n_{i}*s*/

_{i}N*n*= 1. Substitute

_{i}*e*for

_{i}*s*/

_{i}N*n*, to arrive at:

_{i}*r*+

_{i}n_{i}*e*= 1. So the remainder of

_{i}*e*divided by

_{i}*n*is 1. On the other hand,

_{i}*e*=

_{i}*s*/

_{i}N*n*, guarantees that

_{i}*n*divides

_{j}*e*for

_{i}*j*≠

*i*. To summarize:

- <math>e_i \equiv \begin{cases} 1 \pmod{n_i} \\ 0 \pmod{n_j} & j \ne i \end{cases}</math>

Because of this, and the multiplication rules allowed in congruences, one solution to the system of simultaneous congruences is:

- <math>x = \sum_{i=1}^k a_i e_i</math>

For example, consider the problem of finding an integer x such that

- <math>\begin{cases} x \equiv 2 & \pmod{3} \\ x \equiv 3 & \pmod{4} \\ x \equiv 1 & \pmod{5} \end{cases}</math>

Using the extended Euclidean algorithm, for x modulo 3 and 20 [4 × 5], we find (−13) × 3 + 2 × 20 = 1; i.e., *e*_{1} = 40. For x modulo 4 and 15 [3 × 5], we get (−11) × 4 + 3 × 15 = 1, i.e. *e*_{2} = 45. Finally, for x modulo 5 and 12 [3 × 4], we get 5 × 5 + (−2) × 12 = 1, i.e. *e*_{3} = −24. A solution x is therefore 2 × 40 + 3 × 45 + 1 × (−24) = 191. All other solutions are congruent to 191 modulo 60, [3 × 4 × 5], which means they are all congruent to 11 modulo 60.

Or in words:

- Find a number
*e*_{i}that gives modulo 1 for a particular divisor, but is divisible by all other divisors (coprime, in this case). - Multiply the remainder (of the original number N to this particular divisor). Repeat with all the divisors.
- Sum all these products together.
- Divide the sum by the LCM of all the divisors. N shares the modulo with the final remainder.

Thus, we have *e*_{i} values of *40* (divisible by 4 and 5; gives 1 for mod 3), *45* (for mod 4) and *36* (for mod 5). Multiplying by the given remainders 2, 3 and 1 yields 80, 135 and 36 respectively. The sum, 251, is then divided by 60, yielding remainder **11**.

**Note**: There are multiple implementations of the extended Euclidean algorithm which will yield different sets of*e*_{1}= −20,*e*_{2}= −15, and*e*_{3}= −24. These sets however will produce the same solution; i.e., (−20)2 + (−15)3 + (−24)1 = −109 ≡ 11 (mod 60).

Using the same principle, the answer to Sun Tzu's original question is therefore **23**, using *e*_{i} values of *70*, *21* and *15* for divisors 3, 5, 7: (70)2 + (21)3 + (15)2 = 233 ≡ 23 (mod 105).

## Statement for principal ideal domains

**Chinese Remainder Theorem for Principal Ideal Domains.**Let R be principal ideal domain. If*u*_{1}, ...,*u*are pairwise coprime elements of R where_{k}*u*=*u*_{1}...*u*, then the quotient ring_{k}*R/uR*and the product ring*R/u*_{1}*R*× ... ×*R/u*are isomorphic via the following map:_{k}R- <math>\begin{cases} f: R/uR \to R/u_1R \times \cdots \times R/u_k R \\ f(x +uR) = (x + u_1R, \ldots, x + u_kR) \end{cases}</math>

This statement is a straightforward generalization of the above theorem about integer congruences: **Z** is a principal ideal domain, the surjectivity of the map *f* shows that every system of congruences of the form

- <math>x \equiv a_i \pmod{u_i} \qquad 1 \leq i \leq k</math>

can be solved for x, and the injectivity of the map *f* shows that all the solutions x are congruent modulo u.

**Proof.** This map is well-defined and a homomorphism of rings. An inverse homomorphism can be constructed as follows, showing that it is in fact an isomorphism. For each i, the elements *u _{i}* and

*u/u*are coprime, and therefore there exist elements r and s in R with

_{i}- <math>r u_i + s u/u_i = 1</math>

Set *e _{i}* =

*su/u*. Then it is clear that

_{i}- <math>e_i \equiv \delta_{ij} \pmod{u_jR}.</math>

Thus the inverse of *f* is the map

- <math>\begin{cases}g: R/u_1R \times \cdots \times R/u_kR \to R/uR \\ g(a_1 + u_1R, \ldots, a_k + u_kR) = \sum_{i=1}^k a_i e_i + uR \end{cases}</math>

## Statement for general rings

The general form of the Chinese remainder theorem, which implies all the statements given above, can be formulated for commutative rings and ideals.

**Chinese Remainder Theorem for Commutative Rings.**If R is a commutative ring and*I*_{1}, ...,*I*are ideals of_{k}*R*that are pairwise coprime (meaning*I*+_{i}*I*=_{j}*R*for all*i*≠*j*), then the product I of these ideals is equal to their intersection, and the quotient ring*R/I*is isomorphic to the product ring*R*/*I*_{1}× ... ×*R*/*I*via the isomorphism_{k}- <math>\begin{cases}f: R/I \to R/I_1 \times \cdots \times R/I_k \\ f(x + I) = (x + I_1, \cdots, x + I_k) \end{cases}</math>

Here is a version of the theorem where *R* is not required to be commutative:

**Chinese Remainder Theorem for Noncommutative Rings.**Let R be any ring with 1 (not necessarily commutative) and*I*_{1}, ...,*I*be pairwise coprime 2-sided ideals. Then the canonical R-module homomorphism_{k}*R*→*R*/*I*_{1}× ... ×*R*/*I*is onto, with kernel_{k}*I*_{1}∩ ... ∩*I*. Hence, <math>\scriptstyle R/(I_1 \,\cap\, \cdots \,\cap\, I_k) \,\simeq\, R/I_1 \,\times\, \cdots \,\times\, R/I_k</math> (as R-modules)._{k}

## Applications

### Sequence Numbering

The Chinese remainder theorem can be used to construct an elegant Gödel numbering for sequences, which is needed to prove Gödel's incompleteness theorems.

### Fast Fourier Transform

The Good-Thomas fast Fourier transform algorithm exploits a re-indexing of the data based on the Chinese remainder theorem. The Prime-factor FFT algorithm contains an implementation.

### Encryption

The Chinese remainder theorem can also be used in secret sharing, which consists of distributing a set of shares among a group of people who, all together (but no one alone), can recover a certain secret from the given set of shares. Each of the shares is represented in a congruence, and the solution of the system of congruences using the Chinese remainder theorem is the secret to be recovered. Secret Sharing using the Chinese Remainder Theorem uses, along with the Chinese remainder theorem, special sequences of integers that guarantee the impossibility of recovering the secret from a set of shares with less than a certain cardinality.

### Hermite Interpolation

**The General Hermite Interpolation Problem.**Given r complex points ("interpolation nodes")*λ*_{1}, ...,*λ*and complex data {_{r}*a*: 1 ≤_{j,k}*j*≤*r*, 0 ≤*k*<*ν*}, find_{j}*P*(*x*) ∈**C**[*x*] such that:- <math>P^{(k)}(\lambda_j) = a_{j, k}\qquad 1 \leq j \leq r, \quad 0 \leq k < \nu_j.</math>

**Solution.** Introducing the polynomials

- <math>A_j(x) := \sum_{k=0}^{\nu_j - 1}\frac{a_{j, k}}{k!}(x - \lambda_j)^k</math>

the problem may be equivalently reformulated as a system of r simultaneous congruences:

- <math>P(x) \equiv A_j(x) \pmod {(x - \lambda_j)^{\nu_j}}, \qquad 1 \leq j \leq r</math>

By the Chinese remainder theorem in the principal ideal domain **C**[*x*], there is a unique polynomial *P*(*x*) such that:

- <math>\deg(P) < n := \sum_j\nu_j.</math>

A direct construction, in analogy with the above proof for the integer number case, can be performed as follows. Define the polynomials

- <math>\begin{align}

Q &= \prod_{i=1}^{r}(x - \lambda_i)^{\nu_i} \\ Q_j &= \frac{Q}{(x - \lambda_j)^{\nu_j}} \end{align}</math>

The partial fraction decomposition of 1/*Q* gives r polynomials *S _{j}* with degrees deg(

*S*) <

_{j}*ν*such that

_{j}- <math>\frac{1}{Q} = \sum_{i=1}^{r} \frac{S_i}{(x - \lambda_i)^{\nu_i}}</math>

so that

- <math>1 = \sum_{i=1}^{r}S_i Q_i.</math>

Then a solution of the simultaneous congruence system is given by the polynomial

- <math>\sum_{i=1}^r A_i S_i Q_i = A_j + \sum_{i=1}^{r}(A_i - A_j) S_i Q_i \equiv A_j\pmod{(x - \lambda_j)^{\nu_j}}\qquad 1 \leq j \leq r</math>

and the minimal degree solution is this one reduced modulo Q, that is the unique with degree less than n.

### Dedekind's Theorem

**Dedekind's Theorem on the Linear Independence of Characters.**Let M be a monoid and k an integral domain, viewed as a monoid by considering the multiplication on k. Then any finite family (*f*)_{i}_{i∈I}of distinct monoid homomorphisms*f*:_{i}*M*→*k*is linearly independent. In other words every family (*α*)_{i}_{i∈I}of elements*α*∈_{i}*k*satisfying- <math>\sum_{i \in I}\alpha_i f_i = 0</math>

- must be equal to the family (0)
_{i∈I}.

**Proof.** First assume that k is a field, otherwise, replace the integral domain k by its quotient field, and nothing will change. We can linearly extend the monoid homomorphisms *f _{i}* :

*M*→

*k*to k-algebra homomorphisms

*F*:

_{i}*k*[

*M*] →

*k*, where

*k*[

*M*] is the monoid ring of M over k. Then, by linearity, the condition

- <math>\sum_{i\in I}\alpha_i f_i = 0,</math>

yields

- <math>\sum_{i \in I}\alpha_i F_i = 0.</math>

Next, for *i*, *j* ∈ *I*; *i* ≠ *j* the two k-linear maps *F _{i}* :

*k*[

*M*] →

*k*and

*F*:

_{j}*k*[

*M*] →

*k*are not proportional to each other. Otherwise

*f*and

_{i}*f*would also be proportional, and thus equal since as monoid homomorphisms they satisfy:

_{j}*f*(1) = 1 =

_{i}*f*(1), which contradicts the assumption that they are distinct.

_{j}Therefore the kernels Ker *F _{i}* and Ker

*F*are distinct. Since

_{j}*k*[

*M*]/Ker

*F*≅

_{i}*F*(

_{i}*k*[

*M*]) =

*k*is a field, Ker

*F*is a maximal ideal of

_{i}*k*[

*M*] for every

*i*∈

*I*. Because they are distinct and maximal the ideals Ker

*F*and Ker

_{i}*F*are coprime whenever

_{j}*i*≠

*j*. The Chinese Remainder Theorem (for general rings) yields an isomorphism:

- <math>\begin{cases} \phi: k[M] / K \to \prod_{i \in I}k[M] / \mathrm{Ker} F_i \\ \phi(x + K) = \left(x + \mathrm{Ker} F_i\right)_{i \in I} \end{cases}</math>

where

- <math>K = \prod_{i \in I}\mathrm{Ker} F_i = \bigcap_{i \in I}\mathrm{Ker} F_i.</math>

Consequently, the map

- <math> \begin{cases} \Phi: k[M] \to \prod_{i \in I}k[M]/ \mathrm{Ker} F_i \\ \Phi(x) = \left(x + \mathrm{Ker} F_i\right)_{i \in I} \end{cases}</math>

is surjective. Under the isomorphisms *k*[*M*]/Ker *F _{i}* →

*F*(

_{i}*k*[

*M*]) =

*k*, the map Φ corresponds to:

- <math>\begin{cases}\psi: k[M] \to \prod_{i \in I}k \\ \psi(x) = \left[F_i(x)\right]_{i \in I} \end{cases}</math>

Now,

- <math>\sum_{i \in I}\alpha_i F_i = 0</math>

yields

- <math>\sum_{i \in I}\alpha_i u_i = 0</math>

for every vector (*u _{i}*)

_{i∈I}in the image of the map ψ. Since ψ is surjective, this means that

- <math>\sum_{i \in I}\alpha_i u_i = 0</math>

for every vector

- <math>\left(u_i\right)_{i \in I} \in \prod_{i \in I}k.</math>

Consequently, (*α _{i}*)

_{i∈I}= (0)

_{i∈I}. QED.

## Non-commutative case: a caveat

Sometimes in the commutative case, the conclusion of the Chinese Remainder Theorem is stated as *R*/(*I*_{1} ... *I _{k}*) ≅

*R*/

*I*

_{1}× ... ×

*R*/

*I*. This version does not hold in the non-commutative case, since

_{k}*I*

_{1}∩ ... ∩

*I*≠

_{k}*I*

_{1}...

*I*, as can be seen from the following case:

_{k}**Proposition.**Let R be the ring of non-commutative real polynomials in x and y. Let I be the principal two-sided ideal generated by x and J the principal two-sided ideal generated by*xy*+ 1. Then*I*+*J*=*R*but*I*∩*J*≠*IJ*.

**Proof.** Observe that I is formed by all polynomials with an x in every term and that every polynomial in J vanishes under the substitution *y* = − 1/*x*. Then clearly *p* = (*xy* + 1)*x* ∈ *I* ∩ *J*. Define a "term in R", as an element of the multiplicative monoid of R generated by x and y, and its degree as the usual degree of the term after the substitution *y* = *x*. On the other hand, suppose *q* ∈ *J*. Observe that a term in q of maximum degree depends on y otherwise q under the substitution *y* = − 1/*x* can not vanish. The same happens then for an element *q* ∈ *IJ*. Note that the last y, from left to right, in a term of maximum degree in an element of IJ is preceded by more than one x. (We are counting here all the preceding xs. E.g., in *x*^{2}*yxyx*^{5} the last y is preceded by three xs.) This proves that *p* = (*xy* + 1)*x* ∉ *IJ* since the last y in the term of maximum degree in p (xyx) is preceded by only one x. Hence *I* ∩ *J* ≠ *IJ*.

However, it is true in general that *I* + *J* = *R* implies *I* ∩ *J* = *IJ* + *JI*. To see this, note that *I* ∩ *J* = (*I* ∩ *J*)(*I* + *J*) ⊂ *IJ* + *JI*, while the opposite inclusion is obvious. Also, we have in general that, provided *I*_{1}, ..., *I _{m}* are pairwise coprime two-sided ideals in R, the natural map

- <math>R / (I_1 \cap \cdots \cap I_m) \to R/I_1 \oplus \cdots \oplus R/I_m</math>

is an isomorphism. Note that *I*_{1} ∩ ... ∩ *I _{m}* can be replaced by a sum over all orderings of

*I*

_{1}, ...,

*I*of their product (or just a sum over enough orderings, using inductively that

_{m}*I*∩

*J*=

*IJ*+

*JI*for coprime ideals

*I*,

*J*⊂

*R*).

## See also

- Covering system
- Hasse principle
- Residue number system
- Secret sharing using the Chinese remainder theorem

## Notes

**^**Gauss & Clarke (1986, Art. 32-36)

## References

This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. (February 2015) |

- Cormen, Thomas H.; Leiserson, Charles E.; Rivest, Ronald L.; Stein, Clifford (2001),
*Introduction to Algorithms*(Second ed.), MIT Press and McGraw-Hill, ISBN 0-262-03293-7. See Section 31.5: The Chinese remainder theorem, pp. 873–876. - Ding, Cunsheng; Pei, Dingyi; Salomaa, Arto (1996),
*Chinese Remainder Theorem: Applications in Computing, Coding, Cryptography*, World Scientific Publishing, pp. 1–213, ISBN 981-02-2827-9 - Duchet, Pierre (1995), "Hypergraphs", in Graham, R. L.; Grötschel, M.; Lovász, L.,
*Handbook of combinatorics, Vol. 1, 2*, Amsterdam: Elsevier, pp. 381–432, MR 1373663. See in particular Section 2.5, "Helly Property", pp. 393–394. - Gauss, Carl Friedrich; Clarke, Arthur A. (translator into English) (1986),
*Disquisitiones Arithemeticae*(Second, corrected ed.), New York: Springer, ISBN 978-0-387-96254-2 - Hungerford, Thomas W. (1974),
*Algebra*, Graduate Texts in Mathematics, Vol. 73, Springer-Verlag, pp. 131–132, ISBN 978-1-4612-6101-8 - Kak, Subhash (1986), "Computational aspects of the Aryabhata algorithm" (PDF),
*Indian Journal of History of Science***21**(1): 62–71 - Knuth, Donald (1997),
*The Art of Computer Programming*, Volume 2:*Seminumerical Algorithms*(Third ed.), Addison-Wesley, ISBN 0-201-89684-2. See Section 4.3.2 (pp. 286–291), exercise 4.6.2–3 (page 456). - Leonardo Pisano; Sigler, Laurence E. (translator into English) (2002),
*Fibonacci's Liber Abaci*, Springer-Verlag, pp. 402–403, ISBN 0-387-95419-8

## External links

- Hazewinkel, Michiel, ed. (2001), "Chinese remainder theorem",
*Encyclopedia of Mathematics*, Springer, ISBN 978-1-55608-010-4 - "Chinese Remainder Theorem" by Ed Pegg, Jr., Wolfram Demonstrations Project, 2007.
- Weisstein, Eric W., "Chinese Remainder Theorem",
*MathWorld*. - C# program and discussion at codeproject
- University of Hawaii System CRT by Lee Lady
- Full text of the Sunzi Suanjing (Chinese) — Chinese Text Project