Chinese remainder theorem
From Wikipedia, the free encyclopedia
Categories: Modular arithmetic | Commutative algebra | Mathematical theorems | Articles containing proofs
|
Chinese remainder theorem refers to a result about congruences in number theory and its generalizations in abstract algebra.
Theorem statementThe original form of the theorem, contained in a third-century AD book Sun Zi suanjing(孙子算经 The Mathematical Classic by Sun Zi) by Chinese mathematician Sun Tzu and later republished in a 1247 book by Qin Jiushao, Shu shu jiu zhang(数书九章 Mathematical Treatise in Nine Sections) is a statement about simultaneous congruences (see modular arithmetic). Suppose n1, n2, …, nk are integers which are pairwise coprime. Then, for any given integers a1,a2, …, ak, there exists an integer x solving the system of simultaneous congruences
Hence Failed to parse (Missing texvc executable; please see math/README to configure.): x\equiv y \pmod{n_i} for all Failed to parse (Missing texvc executable; please see math/README to configure.): 1\leq i \leq k , if and only if Failed to parse (Missing texvc executable; please see math/README to configure.): x \equiv y \pmod{N} . Sometimes, the simultaneous congruences can be solved even if the ni's are not pairwise coprime. A solution x exists if and only if:
Versions of the Chinese remainder theorem were also known to Brahmagupta, and appear in Fibonacci's Liber Abaci (1202). A constructive algorithm to find the solutionThis algorithm only treats the situations where the Failed to parse (Missing texvc executable; please see math/README to configure.): n_i 's are coprime. The method of successive substitution can often yield solutions to simultaneous congruences, even when the moduli are not pairwise coprime. Suppose, as above, that a solution is needed to the system of congruences:
is defined. Then a solution x can be found as follows. For each i the integers Failed to parse (Missing texvc executable; please see math/README to configure.): n_i and Failed to parse (Missing texvc executable; please see math/README to configure.): N/n_i are coprime. Using the extended Euclidean algorithm we can therefore find integers Failed to parse (Missing texvc executable; please see math/README to configure.): r_i and Failed to parse (Missing texvc executable; please see math/README to configure.): s_i such that Failed to parse (Missing texvc executable; please see math/README to configure.): r_in_i + s_iN/n_i = 1 . Then, choosing the label Failed to parse (Missing texvc executable; please see math/README to configure.): e_i=s_iN/n_i , the above expression becomes:
guarantees that it's evenly divisible by any Failed to parse (Missing texvc executable; please see math/README to configure.): n_j so long as Failed to parse (Missing texvc executable; please see math/README to configure.): j\ne i .
NOTE: There are multiple implementations of the extended Euclidean algorithm which will yield different sets of Failed to parse (Missing texvc executable; please see math/README to configure.): e_1 , Failed to parse (Missing texvc executable; please see math/README to configure.): e_2 , and Failed to parse (Missing texvc executable; please see math/README to configure.): e_3 . These sets however will produce the same solution i.e. 11 modulo 60. Statement for principal ideal domainsFor a principal ideal domain R the Chinese remainder theorem takes the following form: If u1, ..., uk are elements of R which are pairwise coprime, and u denotes the product u1...uk, then the quotient ring R/uR and the product ring R/u1R × ⋯ × R/ukR are isomorphic via the isomorphism
can be solved for x, and the injectivity of the map f shows that all the solutions x are congruent modulo u. Statement for general ringsThe general form of the Chinese remainder theorem, which implies all the statements given above, can be formulated for commutative rings and ideals. If R is a commutative ring and I1, ..., Ik are two-sided ideals of R which are pairwise coprime (meaning that Ii + Ij = R whenever 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/I1 x R/I2 x ... x R/Ik via the isomorphism
ApplicationsIn the RSA algorithm calculations are made modulo Failed to parse (Missing texvc executable; please see math/README to configure.): n , where Failed to parse (Missing texvc executable; please see math/README to configure.): n is a product of two large prime numbers Failed to parse (Missing texvc executable; please see math/README to configure.): p and Failed to parse (Missing texvc executable; please see math/README to configure.): q . 1024-, 2048- or 4096-bit integers Failed to parse (Missing texvc executable; please see math/README to configure.): n
are commonly used, making calculations in Failed to parse (Missing texvc executable; please see math/README to configure.): \Bbb{Z}/n\Bbb{Z}
very time-consuming. By the Chinese Remainder Theorem, however, these calculations can be done in the isomorphic ring Failed to parse (Missing texvc executable; please see math/README to configure.): \Bbb{Z}/p\Bbb{Z} \oplus \Bbb{Z}/q\Bbb{Z}
instead. Since Failed to parse (Missing texvc executable; please see math/README to configure.): p
and Failed to parse (Missing texvc executable; please see math/README to configure.): q
are normally of about the same size, that is about Failed to parse (Missing texvc executable; please see math/README to configure.): \sqrt{n}
, calculations in the latter representation are much faster. Note that RSA algorithm implementations using this isomorphism are more susceptible to fault injection attacks. The Chinese Remainder Theorem may also be used to construct an elegant Gödel numbering for sequences, which is needed to prove Gödel's incompleteness theorems. Non-commutative caseThe Chinese remainder theorem does not hold in the non-commutative case. Consider the ring Failed to parse (Missing texvc executable; please see math/README to configure.): R of non-commutative real polynomials in Failed to parse (Missing texvc executable; please see math/README to configure.): x and Failed to parse (Missing texvc executable; please see math/README to configure.): y . Let Failed to parse (Missing texvc executable; please see math/README to configure.): I be the principal two-sided ideal generated by Failed to parse (Missing texvc executable; please see math/README to configure.): x and Failed to parse (Missing texvc executable; please see math/README to configure.): J the principal two-sided ideal generated by Failed to parse (Missing texvc executable; please see math/README to configure.): xy+1. Then Failed to parse (Missing texvc executable; please see math/README to configure.): I+J=R but Failed to parse (Missing texvc executable; please see math/README to configure.): I\cap J \neq IJ.
Observe that Failed to parse (Missing texvc executable; please see math/README to configure.): I is formed by all polynomials with an Failed to parse (Missing texvc executable; please see math/README to configure.): x in every term and that every polynomial in Failed to parse (Missing texvc executable; please see math/README to configure.): J vanishes under the substitution Failed to parse (Missing texvc executable; please see math/README to configure.): y=-1/x . Consider the polynomial Failed to parse (Missing texvc executable; please see math/README to configure.): p=(xy+1)x . Clearly Failed to parse (Missing texvc executable; please see math/README to configure.): p\in I\cap J . Define a term in Failed to parse (Missing texvc executable; please see math/README to configure.): R as an element of the multiplicative monoid of Failed to parse (Missing texvc executable; please see math/README to configure.): R generated by Failed to parse (Missing texvc executable; please see math/README to configure.): x and Failed to parse (Missing texvc executable; please see math/README to configure.): y . Define the degree of a term as the usual degree of the term after the substitution Failed to parse (Missing texvc executable; please see math/README to configure.): y=x . On the other hand, suppose Failed to parse (Missing texvc executable; please see math/README to configure.): q\in J . Observe that a term in Failed to parse (Missing texvc executable; please see math/README to configure.): q of maximum degree depends on Failed to parse (Missing texvc executable; please see math/README to configure.): y otherwise Failed to parse (Missing texvc executable; please see math/README to configure.): q under the substitution Failed to parse (Missing texvc executable; please see math/README to configure.): y=-1/x can not vanish. The same happens then for an element Failed to parse (Missing texvc executable; please see math/README to configure.): q\in IJ . Observe that the last Failed to parse (Missing texvc executable; please see math/README to configure.): y , from left to right, in a term of maximum degree in an element of Failed to parse (Missing texvc executable; please see math/README to configure.): IJ is preceded by more than one Failed to parse (Missing texvc executable; please see math/README to configure.): x . (We are counting here all the preceding Failed to parse (Missing texvc executable; please see math/README to configure.): x s. e.g. in Failed to parse (Missing texvc executable; please see math/README to configure.): x^2yxyx^5 the last Failed to parse (Missing texvc executable; please see math/README to configure.): y is preceded by Failed to parse (Missing texvc executable; please see math/README to configure.): 3 Failed to parse (Missing texvc executable; please see math/README to configure.): x s.) This proves that Failed to parse (Missing texvc executable; please see math/README to configure.): (xy+1)x\notin IJ since that last Failed to parse (Missing texvc executable; please see math/README to configure.): y in a term of maximum degree ( Failed to parse (Missing texvc executable; please see math/README to configure.): xyx ) is preceded by only one Failed to parse (Missing texvc executable; please see math/README to configure.): x . Hence Failed to parse (Missing texvc executable; please see math/README to configure.): I\cap J\neq IJ . On the other hand, it is true in general that Failed to parse (Missing texvc executable; please see math/README to configure.): I+J = R implies Failed to parse (Missing texvc executable; please see math/README to configure.): I \cap J = IJ + JI . To see this, note that Failed to parse (Missing texvc executable; please see math/README to configure.): I \cap J = (I \cap J) (I+J) \subset IJ + JI , while the opposite inclusion is obvious. Also, we have in general that, provided Failed to parse (Missing texvc executable; please see math/README to configure.): I_1, \ldots, I_m are pairwise coprime two-sided ideals in Failed to parse (Missing texvc executable; please see math/README to configure.): R , the natural map
can be replaced by a sum over all orderings of Failed to parse (Missing texvc executable; please see math/README to configure.): I_1, \ldots, I_m of their product (or just a sum over enough orderings, using inductively that Failed to parse (Missing texvc executable; please see math/README to configure.): I \cap J = IJ + JI for coprime ideals Failed to parse (Missing texvc executable; please see math/README to configure.): I, J ). See alsoExternal links
References
cs:Čínská věta o zbytcích de:Chinesischer Restsatz es:Teorema chino del resto fr:Théorème des restes chinois zh-classical:韓信點兵 id:Teorema sisa Tiongkok it:Teorema cinese del resto he:משפט השאריות הסיני hu:Kínai maradéktétel mn:Үлдэгдлийн тухай Хятадын теорем nl:Chinese reststelling ja:中国の剰余定理 pl:Chińskie twierdzenie o resztach pt:Teorema chinês do resto ru:Китайская теорема об остатках sv:Kinesiska restsatsen vi:Định lý số dư Trung Quốc ur:چینی تقسیم باقی مسلئہ اثباتی |


