Linear Congruences
- is an equation of the
form ax≡ b(mod m)
Conguence ax≡ b(mod m) has a
solution for x if and only if b is divisible
by the greatest common divisor d of a
and m(denoted by (gcd(a,m)) and
there are integers x and k such that
ax≡b+km.
Linear congruence
may have
➲No solution
➲One solution
➲Infinitely/many solution
Example.examining the equation ax≡ 2 (mod 6)
with different values
3X≡ 2 (mod 6)
Here d=gcd(3,6) =3 but since 3 does not divide 2,
there is no solution.
5X≡ 2 (mod 6)
Here d=gcd(5,6) =1, which divides any b, and so there
is just one solution in {0,1,2,3,4,5}: x=4.
{0,1,2,3,4,5} -are the set of least positive residues
(mod 6)
4x≡2 (mod 6)
Here d=gcd(4,6) = 2, which does divides 2, andso
there are exactly two solutions in {0,1,2,3,4,5}:x=2 ans
x=5.
x 0 1 2 3 4 5 6 7 8 9
3x(mod5) 0 3 1 4 2 0 3 1 4 2
Infinitely many solution
Example:
3x≡4(mod5)
Is true if x=3 and x=8,It is also true if x=13,18,23.........In general,
If r is an integer such that ar≡b(mod m),then all of the integers
(r+m,r+2m,......r-m,r-2m.....)
Solving Linear Congruence
● A linear congruence ax≡ b (mod m) has solution if
and only if (a,m) │ b.
● You can solve linear congruences by finding
modular inverses and by turning the congruence
into a linear Diophantine equation.
Theorem. Let d = (a,m) , and consider the equation ax ≡ b (mod m)
(a) If d ⁄ b , there are no solutions.
(b) If d│b , there exactly d distinct solutions mod m.
Proof. Observe that ax ≡ b (mod m) ↔ ax + my = b for some y.
Hence , (a) follows immediately from the corresponding result
on linear Diophantine equations. The result on linear Diophantine
equations which corresponds to (b) says that there are infinitely
many integer solutions
x = x +m/d t,ₒ
Where x is a particular solution. I need to show that of theseₒ
infinitely many solutions, there are exactly d distinct solutions mod
m.
Suppose two solution of this form are congruent mod m:
x + m/d t ≡ xₒ ᶦ ₒ + m/d t² (mod m).
Then
m/d t ≡ m/d t² (mod m).ᶦ
Now m/d divides both sides, and (m/d, m) ≡ m/d , so I can divide this
congruence through by m/d to obtain
t ≡ t² (mod m)ᶦ
Going the other way, suppose t ≡ t² (mod m) . This means that t andᶦ ᶦ
t² differ by a multiple of d.
t - t² = kd.ᶦ
So
m/d t - m/d t² = m/d. kd = km.ᶦ
This implies that
m/d t ≡ m/d t² (mod m)ᶦ
So
x + m/d t ≡ x + m/d t² (mod m).ₒ ᶦ ₒ
Let summarize what shown. That its proven that two solutions of the
above form are equal mod m if and only if there is parameter values are
equal mod d. That is, if let t range over a complete system of residues
mod d, then x + m/d t ranges over all possible solutions mod m. To beₒ
very specific,
x + m/d t (mod m) for t = 0,1,2,.......,d-1ₒ
are all the solutions mod m.
Example 1: Solve 6x≡ 7 ( mod 8)
Since (6,8)≡ 2 │ 7, there are no solutions.
Example2: Solve 3x ≡ 7 (mod 4)
Since (3,4) = 1│7 ,there will be 1 solutions mod 4.
a) Using linear Diophantine equations.
3X ≡ 7 (mod 4) implies 3x+ 4y =7 for some y.
By inspection x = 1 ,y =1 is a particular solution.(3,4)=1, so the generalₒ ₒ
solution is
X=1 +4t, y=1-3t.
The y equation is irrelevant. The x equation says,
X= 1(m0d 4).
b)Using Inverse mod 4
* 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 0 2
3 0 3 2 1
From the table 3.3 =1(mod 4), so multiply the equation
by 3:
3X≡ 7 (mod 4)
3.3x≡7.3(mod 4)
9X≡21 (mod 4)
≡ 9X (mod 4)≡ 1
x=21=1(mod 4)
X =1 (mod 4)
1.Solve each of tha following:
2X≡ 1 (mod 17) 4x≡ 6(mod 18)
3x≡ 6(mod 18) 12x≡ 20(mod 28)
2.Solve the systems
a) x≡1(mod 2), x≡1(mod 3)

Linear cong slide 2

  • 1.
    Linear Congruences - isan equation of the form ax≡ b(mod m) Conguence ax≡ b(mod m) has a solution for x if and only if b is divisible by the greatest common divisor d of a and m(denoted by (gcd(a,m)) and there are integers x and k such that ax≡b+km.
  • 2.
    Linear congruence may have ➲Nosolution ➲One solution ➲Infinitely/many solution
  • 3.
    Example.examining the equationax≡ 2 (mod 6) with different values 3X≡ 2 (mod 6) Here d=gcd(3,6) =3 but since 3 does not divide 2, there is no solution. 5X≡ 2 (mod 6) Here d=gcd(5,6) =1, which divides any b, and so there is just one solution in {0,1,2,3,4,5}: x=4. {0,1,2,3,4,5} -are the set of least positive residues (mod 6) 4x≡2 (mod 6) Here d=gcd(4,6) = 2, which does divides 2, andso there are exactly two solutions in {0,1,2,3,4,5}:x=2 ans x=5.
  • 4.
    x 0 12 3 4 5 6 7 8 9 3x(mod5) 0 3 1 4 2 0 3 1 4 2 Infinitely many solution Example: 3x≡4(mod5) Is true if x=3 and x=8,It is also true if x=13,18,23.........In general, If r is an integer such that ar≡b(mod m),then all of the integers (r+m,r+2m,......r-m,r-2m.....)
  • 5.
    Solving Linear Congruence ●A linear congruence ax≡ b (mod m) has solution if and only if (a,m) │ b. ● You can solve linear congruences by finding modular inverses and by turning the congruence into a linear Diophantine equation.
  • 6.
    Theorem. Let d= (a,m) , and consider the equation ax ≡ b (mod m) (a) If d ⁄ b , there are no solutions. (b) If d│b , there exactly d distinct solutions mod m. Proof. Observe that ax ≡ b (mod m) ↔ ax + my = b for some y. Hence , (a) follows immediately from the corresponding result on linear Diophantine equations. The result on linear Diophantine equations which corresponds to (b) says that there are infinitely many integer solutions x = x +m/d t,ₒ Where x is a particular solution. I need to show that of theseₒ infinitely many solutions, there are exactly d distinct solutions mod m. Suppose two solution of this form are congruent mod m: x + m/d t ≡ xₒ ᶦ ₒ + m/d t² (mod m). Then m/d t ≡ m/d t² (mod m).ᶦ
  • 7.
    Now m/d dividesboth sides, and (m/d, m) ≡ m/d , so I can divide this congruence through by m/d to obtain t ≡ t² (mod m)ᶦ Going the other way, suppose t ≡ t² (mod m) . This means that t andᶦ ᶦ t² differ by a multiple of d. t - t² = kd.ᶦ So m/d t - m/d t² = m/d. kd = km.ᶦ This implies that m/d t ≡ m/d t² (mod m)ᶦ So x + m/d t ≡ x + m/d t² (mod m).ₒ ᶦ ₒ Let summarize what shown. That its proven that two solutions of the above form are equal mod m if and only if there is parameter values are equal mod d. That is, if let t range over a complete system of residues mod d, then x + m/d t ranges over all possible solutions mod m. To beₒ very specific, x + m/d t (mod m) for t = 0,1,2,.......,d-1ₒ are all the solutions mod m.
  • 8.
    Example 1: Solve6x≡ 7 ( mod 8) Since (6,8)≡ 2 │ 7, there are no solutions. Example2: Solve 3x ≡ 7 (mod 4) Since (3,4) = 1│7 ,there will be 1 solutions mod 4. a) Using linear Diophantine equations. 3X ≡ 7 (mod 4) implies 3x+ 4y =7 for some y. By inspection x = 1 ,y =1 is a particular solution.(3,4)=1, so the generalₒ ₒ solution is X=1 +4t, y=1-3t. The y equation is irrelevant. The x equation says, X= 1(m0d 4).
  • 9.
    b)Using Inverse mod4 * 0 1 2 3 0 0 0 0 0 1 0 1 2 3 2 0 2 0 2 3 0 3 2 1 From the table 3.3 =1(mod 4), so multiply the equation by 3: 3X≡ 7 (mod 4) 3.3x≡7.3(mod 4) 9X≡21 (mod 4) ≡ 9X (mod 4)≡ 1 x=21=1(mod 4) X =1 (mod 4)
  • 10.
    1.Solve each oftha following: 2X≡ 1 (mod 17) 4x≡ 6(mod 18) 3x≡ 6(mod 18) 12x≡ 20(mod 28) 2.Solve the systems a) x≡1(mod 2), x≡1(mod 3)