Discrete Math Congruences
Congruences refer to the relationship between two integers, a and b, that have the same remainder after division by a positive integer, m (which is greater than 1).
a divides b
If a and b are integers where a ≠ 0, then a divides b if an integer c exists given that b = ac.
Explanation:
- When a divides b, it is denoted as a | b.
- a is termed as a factor or divisor of b, while b is termed as multiple of a.
- If a | b then b / a is an integer (According to a divides b).
- If a does not divide b, it is denoted with a ⋮ b
a is congruent to b mod m
If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m|(a − b). It is termed as Congruence Relation.
Explanation:
In the notation:
- a is congruent to b modulo m.
- m stands for modulus.
Two integers are congruent
mod _m_if and only if they have the same remainder on being divided by_m_.If a is not congruent to b modulo m then it is denoted by:
Example
Suppose a is 17 and b is 5. To check if a is congruent to b modulo m:
Solution:
Congruence Properties
Congruence properties pertain to the equivalence relation between integers where two numbers share the same remainder when divided by a fixed positive integer.
Linear Congruences
Linear congruence is a special form of congruence denoted by:
Where x denotes an integer variable. Similar to previous cases of congruence, a and b are integers and m is modulo.
Here, m is a positive integer. Solution of congruence stands for all the values of integer x which are satisfied.
Reflexive Property
A congruence relation is reflexive if for any integers:
Symmetric Property
A congruence relation is symmetric if for any integers:
Transitive Property
A congruence relation is transitive if for any integers:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Discrete Math on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours