Linear Congruences
- A congruence of the form:
INFO
is called a linear congruence
where
Inverse of an modulo theorem
Theorem 1
If
Proof:
- If
, then (BÉZOUT’S THEOREM) - It also means,
- Because
is inverse of modulo
- If
Find the inverse of
modulo
TIP
To find the inverse of
- Working backward through the divisions of the Euclidean Algorithm
- The Extended Euclidean Algorithm
- Example
- 5, -2, 12, -9,... is the inverse of 3 modulo 7
Solve The Linear Congruences
- To solve the linear congruences, we first find the inverse
of modulo . - Then, we multiply both sides of the congruence by
, we get the equation:
- Because
, we get the equation:
- Finally, we get the solution:
- Example:
- Solve:
(1) - Because gcd(3,7) = 1, then we have
(we choose 5 here) - Multiply both sides of the equation (1) by
: - Finally,
- Solve:
The Chinese Remainder Theorem
Theorem 2
- Let
, , ..., be pairwise relatively primepositive integers greater than one - and
, , ..., arbitrary integers. Then the system - ...
- has
a unique solution modulo. (That is, there is a solution with 0 ≤ x < m, and all other solutions are congruent modulo to this solution.)
TIP
We can also use a method known as Back substitution
Computer Arithmetic with Large Integers
- Based on
The Chinese remainder theorem, we canuniquely representan integerwith by
INFO
- Example:
- What are the pairs used to represent the nonnegative integers less than m = 12
- we choose
, , - 0 = (0, 0) 4 = (1, 0) 8 = (2, 0)
- 1 = (1, 1) 5 = (2, 1) 9 = (0, 1)
- 2 = (2, 2) 6 = (0, 2) 10 = (1, 2)
- 3 = (0, 3) 7 = (1, 3) 11 = (2, 3)
Fermat’s Little Theorem
Theorem 3
If
Furthermore, for every integer
- Remark: Fermat’s little theorem tells us that if
, then in - Example:
- Find
- Find
Primitive Roots and Discrete Logarithms
Def
A primitive root modulo a prime every nonzero element of
- Example:
- 2 is a primitive root modulo 11, because every nonzero element of
is a power of 2 - we obtain
- 2 is a primitive root modulo 11, because every nonzero element of
Def
- Suppose that
is a prime,is a primitive rootmodulo, and is an integerbetween 1 and− 1 inclusive - If
and , we say that is the discrete logarithmof a moduloto the base - and we write
- Example:
- Find the discrete logarithms of 3 and 5 modulo 11 to the base 2.
- Because
and - The result is 8 and 4