You are on page 1of 5

Let 𝑓(𝑥) be a polynomial with integral coefficient then 𝑓(𝑥) ≡ 0(𝑚𝑜𝑑 𝑝) is called a polynomial

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
𝑝𝑗

i) p incongruent solutions modulo p if 𝑝|𝑓′(𝑎) and 𝑝|𝑓(𝑎),


ii) one solution modulo p if 𝑝 ∤ 𝑓′(𝑎) and 𝑝 𝑗 |𝑓′(𝑎)
iii) no solution modulo p if 𝑝|𝑓′(𝑎) and 𝑝 𝑗 ∤ 𝑓′(𝑎)

Example:

Solve 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 27)


Solution:

𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 27) ⟹ 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 33 )

Start with 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 3) this congruence has a solution x=1

𝑎 𝑓(𝑥) = 𝑥 2 + 𝑥 + 7 𝑓 ′(𝑥) = 2𝑥 + 1
1 12 + 1 + 7 = 9 2(1) + 1 = 3

We obtain the value of 𝑡 in the congruence


𝑓(𝑎)
𝑡𝑓 ′(𝑎) ≡ − (𝑚𝑜𝑑 𝑝)
𝑝𝑗
First iteration where 𝑎 = 1, 𝑗 = 1, 𝑓(1) = 9, 𝑓 ′ (1) = 3
9
3𝑡 ≡ − (𝑚𝑜𝑑 3)
3
3𝑡 ≡ −3(𝑚𝑜𝑑 3)
By part i, since 3|3 and 3|9 then, there are 3 incongruent solutions modulo p.

Thus the solution to 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 32 ) is given by

𝑥 = 𝑎 + 𝑡𝑝 𝑗
𝑓𝑜𝑟 𝑎 = 1, 𝑡 = 0,1,2, 𝑗 = 1, 𝑝 = 3

𝑥 = 1 + 0(3)1 = 1

𝑥 = 1 + 1(3)1 = 4

𝑥 = 1 + 2(3)1 = 7

Second iteration to obtain the solution 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 33 )

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

𝑎=1 𝑎=4 𝑎=7


9 27 63
3𝑡 ≡ − 2 (𝑚𝑜𝑑 3) 9𝑡 ≡ − 2 (𝑚𝑜𝑑 3) 15𝑡 ≡ − 2 (𝑚𝑜𝑑 3)
3 3 3
3𝑡 ≡ −1(𝑚𝑜𝑑 3) 9𝑡 ≡ −3(𝑚𝑜𝑑 3) 15𝑡 ≡ −7(𝑚𝑜𝑑 3)
No solution by part iii t=0,1,2 by part i No solution by part iii

Thus the solution to 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 32 ) is given by

𝑥 = 𝑎 + 𝑡𝑝 𝑗

𝑓𝑜𝑟 𝑎 = 4, 𝑡 = 0,1,2, 𝑗 = 2, 𝑝 = 3

𝑥 = 4 + 0(3)2 = 4

𝑥 = 4 + 1(3)2 = 13

𝑥 = 4 + 2(3)2 = 22

Example 2: Use the result above to solve 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 81)


Solution

𝑎 𝑓(𝑥) = 𝑥 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

Obtain solution for t given 𝑎 = 4,13,22 𝑗 = 3, 𝑝 = 3

27 189 513
9𝑡 ≡ − (𝑚𝑜𝑑 3) 27𝑡 ≡ − (𝑚𝑜𝑑 3) 45𝑡 ≡ − (𝑚𝑜𝑑 3)
27 27 27

9𝑡 ≡ −1(𝑚𝑜𝑑 3) 27𝑡 ≡ −7(𝑚𝑜𝑑 3) 45𝑡 ≡ −19(𝑚𝑜𝑑 3)


No Solution No Solution No Solution
Thus 𝑥 2 + 𝑥 + 7 ≡ 0 (𝑚𝑜𝑑 81) has no solution.

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

Example: Solve 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 189)

Solution:

The given congruence is equivalent to the system of congruence

𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 27)

𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 7)

From previous example the solutions to


(1) (2) (3)
𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 27) are x=4,13,22 (𝑎1 = 4, 𝑎1 = 13, 𝑎1 = 22)

We may employ direct substitution to obtain the solution to


𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 7) by substituting x=0,1,2,3,4,5,6

𝑥 𝑥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 𝑖 )

𝑢1 = 28(4) − 27(0) ≡ 112(𝑚𝑜𝑑 189)


𝑢2 = 28(4) − 27(6) = −50 ≡ 139(𝑚𝑜𝑑 189)
𝑢3 = 28(13) − 27(0) = 364 ≡ 175(𝑚𝑜𝑑 189)
𝑢4 = 28(13) − 27(6) = 202 ≡ 13(𝑚𝑜𝑑 189)

𝑢5 = 28(22) − 27(0) = 616 ≡ 49(𝑚𝑜𝑑 189)


𝑢6 = 28(22) − 27(6) = 454 ≡ 76(𝑚𝑜𝑑 189)
Example 4: Solve 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 15)
This congruence is equivalent to system of congruence
𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 3)
𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 5)
The solution to 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 3) can be found by substituting x=0,1,2
𝑓(0) = 7
𝑓(1) = 9
𝑓(2) = 13
Thus 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 3) has solution x=1
The solution to 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 5) can be found by substituting 𝑥 = 0, ±1, ±2
𝑓(0) = 7
𝑓(1) = 9
𝑓(2) = 13
𝑓(−1) = 7
𝑓(−2) = 9
The congruence 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 5) has no solution.
Thus 𝑥 2 + 𝑥 + 7 ≡ 0(𝑚𝑜𝑑 15) has no solution.

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)

You might also like