Discrete Mathematics (H) Lecture 7-9 Notes
Number Theory
The number theory is a branch of mathematics that explores integers and their properties, is the basis of cryptography, coding theory, computer security, e-commerce, etc.
Division
Definition: Division
If
All integers divisible by
Example
Let
Solution. We count the numbers of integers s.t.
Properties of Divisibility
Let
- if
and , then - if
then for all integers - if
and , then
Corollary
If
Proof. By part (ii) and part (i) of the properties.
Definition: Divisor, Divident, Quotient, and Remainder
If
Congruence Relation
Definition: Congruence Relation
If
Tip
Let
is a relation on the set of integers. - In
, the notation denotes a function.
Theorem
Let
Proof. “If” direction: Since
“Only if” direction: We have
Theorem
Let
Algebraic Manipulation of Congruences
If
, if
Corollary
Let
Arithmetic Modulo
Let
Example
We can prove the following properties of the set and the two operations:
- Closure: if
, then - Associativity: if
, then and - Identity elements:
and - Additive inverses: if
and , then is an additive inverse of modulo - Commutativity: if
, then - Distributivity: if
, then and
All of these properties made the set
Group, Ring, Domain
Group
Definition: Group
A set
- Closure: If
, then also belongs to - Associativity:
- Identity element: There is a unique element
, s.t. for every , we have - Inverse: For every
, there exists an element, denoted by , s.t.
We use the notation
Definition: Permutation Group
Let
Define a binary operation
Then
We can easily verify the properties of group on
Definition: Abelian Group
Let
Ring
Definition: Ring
If
- Closure:
must be closed w.r.t. - Associativity:
- Distributivity:
,
Definition: Commutative Ring
A ring is commutative if the multiplication operation is
commutative for all elements in the ring, i.e.
Definition: Integral Domain
An integral domain
- Identity element: there exists
, s.t. - Nonzero product: for any two nonzero elements, if
, then either or must be .
Field
Definition: Field
A field, denoted by
- Multiplicative inverse: for every
, there exists an elements , denoted by . s.t. .
Representations of Integers
We may use decimal or binary or octal or hexadecimal or other notations to represent integers.
Definition: Representation of Integers
Let
- Divide
by to obtain , with . - The remainder
is the rightmost digit in the base- expansion of . Then divide by to get with . is the second digit from the right. Continue by successively dividing the quotients by until the quotient is . 
Binary Addition of Integers
The time complexity is obviously
Binary Multiplication of Integers
This algorithm takes
Computing and
This algorithm takes
This algorithm takes
Binary Modular Exponentiation
This
will require
Primes and Composites
Definition: Prime
A positive integer
Definition: Composite
A positive integer
Fundamental Theorem of Arithmetic
Every integer greater than
Theorem
If
Proof. If
Assume that
Thus
By the Fundamental Theorem of Arithmetic, this divisor is either
prime, or is a product of primes. In either case,
Theorem: Infinite Primes
There are infinitely many primes.
Greatest Common Divisor
Definition: Greatest Common Divisor
Let
Definition: Relatively Prime
The integers
A systematic way to find the gcd is factorization. Let
Least Common Multiple
Definition: Least Common Multiple
Let
We can also use the factorization to find the lcm. Let
Euclidean Algorithm
Factorization can be cumbersome and time-consuming. But luckily we
know a very efficient algorithm to compute the gcd. The Euclidean
algorithm:
The number of divisions required to
find
Correctness
Lemma
Let
Proof. Suppose that
Suppose that
Therefore
Then we can use this lemma to prove the correctness of Euclidean algorithm:
Suppose that
GCD as Linear Combinations
Theorem: Bezout’s Theorem
If
We may use extended Euclidean algorithm to find Bezout’s identity.
Example
Corollary of Bezout’s Theorem (1)
If
Proof. Since
Corollary of Bezout’s Theorem (2)
If
Uniqueness of Prime Factorization
We prove that a prime factorization of a positive integer where the primes are in nondecreasing order is unique.
Proof. Suppose that the positive integer
Dividing Congruences by an Integer
Theorem
Let
Proof. Since
Some Fun Facts About Primes
Definition: Mersenne Primes
Prime numbers of the form
Goldbach’s Conjecture
Every even integer
Twin-prime Conjecture
There are infinitely many twin primes, i.e., prime numbers that
differ by
Linear Congruences
Definition: Linear Congruence
A congruence of the form
The solutions to a linear congruence are all integers
Definition: Modular Inverse
An integer
One method of solving linear congruences makes use of an inverse
Theorem
If
Proof. Since
To find inverses by hand, we can use the extended Euclidean algorithm:
Example
Find an inverse of
After finding the inverse, we can solve the congruence
Theorem
Let
Proof.
- “only if” direction: If
is a solution, then . Thus, . Since divides , we must have . - “if” direction: Suppose that
. Let . There exist integers s.t. . Multiply both sides by . Then . Let . Then . , imply that and . This implies further that , where .
The Chinese Remainder Theorem
Theorem: The Chinese Remainder Theorem
Let
Proof. Let
Example
Solution. Let
Example
Compute
Solution. Since
Thus, for
We have:
Since
Back Substitution
We may also solve systems of linear congruences with pairwise relatively prime moduli by back substitution.
Example
Solution. We first express
Fermat’s Little Theorem and Euler’s Theorem
Theorem: Fermat’s Little Theorem
Let
Example
Find
Solution.
Definition: Euler’s Totient Function
The Euler’s totient function
Theorem: Euler’s Theorem
Let
Example
Find
Solution. Given
Primitive Roots
Definition: Primitive Root
A primitive root modulo a prime
Theorem
There is a primitive root modulo
- Title: Discrete Mathematics (H) Lecture 7-9 Notes
- Author: Zhige Chen
- Created at : 2025-10-27 20:43:30
- Updated at : 2025-12-15 13:21:34
- Link: https://nofe1248.github.io/2025/10/27/discrete-math-lec-7/
- License: This work is licensed under CC BY-NC-SA 4.0.
