Lecture 1
Toy example (RSA encryption)
- Choose a letter, count to number of letters in the alphabet.
- Calculate , then divide by 33, take the remainder.
- Send the remainder.
To build up such system.
Step 1: Understanding the arithmetic of remainders.
Part 1: Divisibility and prime numbers
Divisibility and division algorithm
Let , with . There are unique integers, (quotient) and (remainder), such that and .
Example:
Proof:
The quotient and remainder are unique.
(1) Existence:
Let . Choose to be the smallest non-negative element of . This means for some . i.e. .
New notion: means For the sake of contradiction.
Notice that , by contradiction, suppose , then and , but , which contradicts the minimality of .
Therefore, and .
Example: , , .
So We choose and .
(2) Uniqueness:
Suppose we have two pairs and such that Suppose , without loss of generality, suppose , . Then .
Since , which contradicts that .
Therefore, and .
QED
Definition: Divisibility
Let , we say divides and write if there exists such that .
Example: because .
Properties of divisibility
Let .
(1) in the division algorithm.
(2) If and , then .
(3) If and , then .
(4) If and , then for all . (We call such a linear combination of and .)
(5) If and .
Some proof examples:
(2) Since and , there exist such that and . Then , so .
QED
(3) If and , then there exist such that and . Then , so .
Case 1: , then , so .
Case 2: , then , so . Since , , so .
QED
Definition: Divisor
Let , we define .
Note that .
Example: .
Definition: Greatest common divisor
Let , where not both zero, we define the greatest common divisor of and to be the largest element in . It is denoted by .
Terrible, I really hate this notation. But professor said it’s unlikely to be confused with the interval since they don’t show up in the same context usually.
Example:
.
Note that is not defined. (there is no largest element in .)
but it is okay that one of is zero. For example, .
for all .
In general, if we say and are relatively prime, or coprime.
, .
Theorem for calculating gcd
Let , with , then for any , .
Example: .
.
Proof:
We will prove that .
(1) :
Let , then and .
By property of divisibility (4), If and , then for all , .
So .
Therefore, .
(2) :
Let , then and .
By property of divisibility (4), .
Therefore, .
QED
This theorem gives rise to the Euclidean algorithm which is a efficient way to compute the greatest common divisor of two integers. (Proof in CSE 442T Lecture 7 ).
Euclidean algorithm
We will skip this part, it’s already the third time we see this algorithm in wustl.
Theorem: Euclidean algorithm returns correct gcd
Let , be integers. Using the Euclidean algorithm, we can find such that . Then .
Proof:
(a) This process terminates. is a strictly decreasing sequence of positive integers, so it must terminate.