Number theory MOC

Chinese remainder theorem

The Chinese remainder theorem states that given a set of pairwise co-prime numbers {𝑝1,𝑝2,,𝑝𝑛} with a product 𝑀 =𝑛𝑖=1𝑝𝑖, then the following set of congruence equations

𝑥𝑝1𝑎1𝑥𝑝2𝑎2𝑥𝑝𝑛𝑎3

is guaranteed a solution, unique up to congruence modulo 𝑀.

Solution

For 𝑖 =1,2,,𝑛, define 𝑏𝑖 so that

𝑏𝑖(𝑀𝑝𝑖)𝑝𝑖1

which is guaranteed to exist by Bézout's lemma and the co-prime requirement, then the value of 𝑥 is given by

𝑥𝑀𝑛𝑖=1𝑎𝑖𝑏𝑖(𝑀𝑝𝑖)

This works since every term except the 𝑖-th term goes to 0 modular 𝑝𝑖, and thus

𝑥𝑝𝑖𝑎𝑖𝑏𝑖(𝑀𝑝𝑖)𝑝𝑖𝑎𝑖1𝑎𝑖

This is generalized by the Chinese remainder theorem for rings

Practice problems


#state/tidy | #lang/en | #SemBr | #review