Professional Documents
Culture Documents
congruence. To solve a polynomial congruence 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝𝑘 ), we start with a solution modulo p,
then move on to modulo 𝑝2 , then to 𝑝3 and by iteration to 𝑝 𝑘. Suppose that 𝑥 = 𝑎 is a solution to
𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝 𝑗 ) then we want to use it to get a solution modulo 𝑝 𝑗+1 . The idea is to try to get a
solution to 𝑥 = 𝑎 + 𝑡𝑝 𝑗 where 𝑡 is to be determined by
𝑓(𝑎)
𝑡𝑓 ′(𝑎) ≡ − (𝑚𝑜𝑑 𝑝)
𝑝𝑗
Where 𝑓 ′(𝑥) denotes the derivative of the function 𝑓(𝑥).
𝑓(𝑎)
The congruence 𝑡𝑓 ′(𝑎) ≡ − (𝑚𝑜𝑑 𝑝) will have
𝑝𝑗
Example:
𝑎 𝑓(𝑥) = 𝑥 2 + 𝑥 + 7 𝑓 ′(𝑥) = 2𝑥 + 1
1 12 + 1 + 7 = 9 2(1) + 1 = 3
𝑥 = 𝑎 + 𝑡𝑝 𝑗
𝑓𝑜𝑟 𝑎 = 1, 𝑡 = 0,1,2, 𝑗 = 1, 𝑝 = 3
𝑥 = 1 + 0(3)1 = 1
𝑥 = 1 + 1(3)1 = 4
𝑥 = 1 + 2(3)1 = 7
Use 𝑎 = 1,4,7 𝑗 = 2, 𝑝 = 3
𝑓(𝑎)
𝑡𝑓 ′(𝑎) ≡ − (𝑚𝑜𝑑 𝑝)
𝑝𝑗
𝑎 𝑓(𝑥) = 𝑥 2 + 𝑥 + 7 𝑓 ′(𝑥) = 2𝑥 + 1
1 𝑓(1) = 12 + 1 + 7 = 9 𝑓′ (1)
= 2(1) + 1 = 3
4 𝑓(4) = 42 + 4 + 7 = 27 𝑓 ′ (4)
= 2(4) + 1 = 9
7 𝑓(7) = 72 + 7 + 7 = 63 𝑓 ′ (7) = 2(7) + 1 = 15
𝑥 = 𝑎 + 𝑡𝑝 𝑗
𝑓𝑜𝑟 𝑎 = 4, 𝑡 = 0,1,2, 𝑗 = 2, 𝑝 = 3
𝑥 = 4 + 0(3)2 = 4
𝑥 = 4 + 1(3)2 = 13
𝑥 = 4 + 2(3)2 = 22
𝑎 𝑓(𝑥) = 𝑥 2 + 𝑥 + 7 𝑓 ′(𝑥) = 2𝑥 + 1
4 𝑓(4) = 42 + 4 + 7 = 27 ′ (4)
𝑓 = 2(4) + 1 = 9
13 𝑓(13) = 132 + 13 + 7 = 189 𝑓 ′(4) = 2(13) + 1 = 27
22 𝑓(22) = 222 + 22 + 7 = 513 𝑓 ′ (22) = 2(22) + 1 = 45
27 189 513
9𝑡 ≡ − (𝑚𝑜𝑑 3) 27𝑡 ≡ − (𝑚𝑜𝑑 3) 45𝑡 ≡ − (𝑚𝑜𝑑 3)
27 27 27
There is no general method for solving congruences. The methods previously discussed are mostly
based on cases. However, certain reduction can be made so that the problem finally becomes that of
solving congruences with prime moduli. We can use the method of the Chinese Remainder Theorem
in the first step of this reduction.
𝑒 𝑒 𝑒
If 𝑚 = 𝑝1 1 ⋅ 𝑝22 ⋯ 𝑝𝑟 𝑟 , then the congruence 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑚) is equivalent to the set of
𝑒
congruences 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝𝑖 𝑖 ), 𝑖 = 1,2,3 ⋯ 𝑟,
i.e.
𝑒
𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝1 1 )
𝑒
𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝22 )
⋮ ≡ ⋮
𝑒
𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝𝑟 𝑟 )
in the sense that solutions of one are solutions of the other. If for some 𝑗, 1 ≤ 𝑗 ≤ 𝑟, the congruence
𝑒𝑗
𝑓(𝑥) ≡ 0 (𝑚𝑜𝑑 𝑝𝑗 ) has no solution, then 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑚) has no solution.
𝑒
On the other hand, if all the congruences 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝𝑖 𝑖 ) have solutions, we can suppose that
(1) (2) (3) (𝑘𝑖 )
the i th congruence has exactly 𝑘𝑖 solutions say 𝑎𝑖 , 𝑎𝑖 , 𝑎𝑖 ⋯ 𝑎𝑖 . No two of these are congruent
𝑒
modulo 𝑝𝑖 𝑖 then Chinese Remainder Theorem is applicable.
𝑚 𝑒
We determine the integers 𝑏𝑖 such that 𝑒 𝑏𝑖 ≡ 1(𝑚𝑜𝑑 𝑝𝑖 𝑖 ) and thus obtain
𝑝𝑖 𝑖
𝑟
𝑚 (𝑗 )
𝑢=∑ 𝑒 𝑏𝑖 𝑎𝑖 𝑖 (𝑚𝑜𝑑 𝑚)
𝑝𝑖 𝑖
𝑖=1
Solution:
𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 27)
𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 7)
𝑥 𝑥2 + 𝑥 + 7
0 02 + 0 + 7 = 7
1 12 + 1 + 7 = 9
2 22 + 2 + 7 = 13
3 32 + 3 + 7 = 19
4 42 + 4 + 7 = 27
5 52 + 5 + 7 = 37
6 62 + 6 + 7 = 49
(1) (2)
the solutions to 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 7) are 𝑥 = 0 𝑎𝑛𝑑 𝑥 = 6; (𝑎2 = 0, 𝑎2 = 6)
𝑚 𝑒 𝑒 𝑒
We now determine 𝑏𝑖 such that 𝑒 𝑏𝑖 ≡ 1(𝑚𝑜𝑑 𝑝𝑖 𝑖 ) 𝑤ℎ𝑒𝑟𝑒 𝑚 = 189, 𝑝11 = 33 = 27, 𝑝22 = 71 = 7
𝑝𝑖 𝑖
For 𝑏1 For 𝑏2
189 189
𝑏 ≡ 1(𝑚𝑜𝑑 27) 𝑏 ≡ 1(𝑚𝑜𝑑 7)
27 1 7 2
7𝑏1 ≡ 1(𝑚𝑜𝑑 27) 27𝑏2 ≡ 1(𝑚𝑜𝑑 7)
7𝑏1 ≡ 28(𝑚𝑜𝑑 27) −𝑏2 ≡ 1(𝑚𝑜𝑑 7)
𝑏1 ≡ 4(𝑚𝑜𝑑 27) 𝑏2 ≡ −1(𝑚𝑜𝑑 7)
Now
𝑟
𝑚 (𝑗𝑖 ) 189 (𝑗 ) 189 (𝑗 )
𝑢=∑ 𝑒𝑖 𝑏𝑖 𝑎𝑖 (𝑚𝑜𝑑 𝑚) = (4) (𝑎1 𝑖 ) + (−1) (𝑎2 𝑖 )
𝑝 27 7
𝑖=1 𝑖
(𝑗 ) (𝑗 )
𝑢 = 7(4) (𝑎1 𝑖 ) + 27(−1) (𝑎2 𝑖 )
(𝑗 ) (𝑗 )
𝑢 = 28 (𝑎1 𝑖 ) − 27 (𝑎2 𝑖 )
Exercises:
Solve the following congruences
1. 𝑥 3 + 𝑥 2 + 5𝑥 + 1 ≡ 0(𝑚𝑜𝑑 8)
2. 5𝑥 3 − 𝑥 2 + 𝑥 + 1 ≡ 0 (𝑚𝑜𝑑 27)
3. 5𝑥 3 − 2𝑥 + 1 ≡ 0(𝑚𝑜𝑑 343)
4. 𝑥 3 − 3𝑥 2 + 27 ≡ 0 (𝑚𝑜𝑑 1125)
5. 𝑥 3 − 𝑥 2 + 7𝑥 + 1 ≡ 0(𝑚𝑜𝑑 72)