Chapter 3 Flashcards
a is congruent to b modulo n
Let a,b∈ℤ and n∈ℕ. We write a≡bmodn and say a is congruent to b modulo n if n|(a-b)
a≡bmodn also means that => (there exists…)
there exists a k∈ℤ s.t. b=a+kn
a≡bmodn also means that => (a and b leave)
a and b leave the same remainder when divided by n
Lemma III.1.2 (congruence is an equivalence relation)
Let n∈ℕ and a,b,c∈ℤ
a) a≡amodn (reflexive
(b) if a≡bmodn then b≡amodn (symmetric)
(c) if a≡bmodn and b≡Cmodn then a≡cmodn
Lemma III.1.3 (operations on congruences)
Let n∈ℕ and a,b,c,d∈ℤ. Suppose that a≡bmodn and c≡dmodn. Then,
(i) a+c≡b+dmodn
(ii) a-c≡b-dmodn
(iii) ac≡bdmodn
complete set of residues
Let n∈ℕ. The a complete set of residues (CSR) modulo n is a subset S⊆ℤ with the property that every Integer is congruent modulo n to exactly one element of S.
Lemma II.2.1. complete set of residues modulo n.
Let n∈ℕ. Then {0,1,…,n-1} is a complete set of residues modulo n.
How to solve an equation of the form ax≡bmodn
- write out a table with x, ax and what ax is congruent to modulo n
- the solutions are given by the xs in the columns where the congruence is equal to b
Theorem III.3.1 ax≡bmodn
Let n∈ℕ and a,b∈ℤ and consider the equation ax≡bmodn. Let h=hcf(a,n). Then the following holds
(i) () has solutions <=> h|b
(ii) if x₀ is a solution to () then all the solutions to (*) are of the form
x₀, x₀ + n/h, … ,x₀ + (h-1)n/h
How to use the Euclidean algorithm to solve ax≡bmodn
- use Euclidean algorithm to find hcf(a,n)
- use extended Euclidean algorithm to find x,y s.t. h = xa +yn
- multiply through by b/h
- put into congruence modulo n
- find other solutions (from theorem III.3.1)
Corollary III.3.2 cancelling
Let n∈ℕ and a∈ℤ with a≢0modn. Let x₁,x₂∈ℤ suppose that
ax₁≡ax₂ modn and a and n are coprime. then x₁≡x₂ modn
i.e. you can cancel if a and n are coprime
Corollary III.3.3 cancelling when mod prime
Let p be a prime and a,x₁,x₂∈ℤ. Suppose that ax₁≡ax₂modp and that a≢0modp. Then,
x₁≡x₂modp
Corollary III.3.4 multiplicative inverse
let p be prime and a∈ℤ with a≢0modp. Then there exists a’∈ℤ such that aa’≡1modp
Fermats Little Theorem (FlT)
Suppose that p is prime and that a∈ℤ. Then:
(i) If a≢0modp then aᵖ⁻¹≡1modp
(ii) aᵖ≡amodp
How to determine the remainder when aᵇ is divided by p
- we know that for some c∈ℤ we have aᶜ≡1modp by FlT
- use the division theorem to divide b by c: b=dc + e
- aᵇ = aᵈᶜ ⁺ᵉ = (aᶜ)ᵈaᵉ = 1ᵈaᵉ≡modp