COMP 2711 - Discrete Mathematical Tools for Computer Science
This is the review notes for key concepts and theorems in discrete mathematics, particularly focusing on modular arithmetic, divisibility, and the properties of integers.
Modular Notation
Divisibility Notation
(3 divides 12) (3 does not divide 11)
Euclid’s Division Theorem
For integers
Note | Name | Note | Name | Note | Name | Note | Name |
---|---|---|---|---|---|---|---|
divisor | dividend | quotient | remainder |
Quotient Ring
The set of integers modulo
Definition
For any
Properties
- Closure:
- Associativity
- Commutativity:
- Distributivity
- Inverse:
Congruences
If
then:
Greatest Common Divisor
The greatest common divisor is defined as:
Euclidean Algorithm
The process is as follows:
Then:
Bézout’s Theorem
For all
Extended Euclidean Algorithm
Example: express
as a linear combination of and Step 1: find
gcd()
Step 2: Rewrite
Step 3: Substitute
Multiplicative Inverses
For all
Example:
Step 1: Linear Combination
Step 2:
Linear Congruences
For
If
Chinese Remainder Theorem
For
Let
If
Finally, compute:
Repeated Squaring Method
Example: evaluate
Fermat Little Theorem
For any prime