0% found this document useful (0 votes)
12 views3 pages

Notes On Modulo Arithmetic

Uploaded by

marsights7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Notes On Modulo Arithmetic

Uploaded by

marsights7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction

Modulo arithmetic, also known as "clock arithmetic," deals with integers and their
remainders upon division.
Notation: amod na \mod namodn represents the remainder when aaa is divided by
nnn.

Basic Concepts
1. Definition: For integers aaa and nnn, amod na \mod namodn is the remainder rrr when
aaa is divided by nnn.
Mathematically: a=nq+ra = nq + ra=nq+r where 0≤r<n0 \leq r < n0≤r<n.
Example: 17mod 5=217 \mod 5 = 217mod5=2 because 17=5×3+217 = 5 \times 3
+ 217=5×3+2.
2. Equivalence Classes:
Two integers aaa and bbb are said to be congruent modulo nnn if they have the
same remainder when divided by nnn.
Notation: a≡b(modn)a \equiv b \pmod{n}a≡b(modn).
Example: 17≡2(mod5)17 \equiv 2 \pmod{5}17≡2(mod5) because both leave a
remainder of 2 when divided by 5.

Properties
1. Addition:
(a+b)mod n=[(amod n)+(bmod n)]mod n(a + b) \mod n = [(a \mod n) + (b \mod n)]
\mod n(a+b)modn=[(amodn)+(bmodn)]modn.
Example: (7+9)mod 5=16mod 5=1(7 + 9) \mod 5 = 16 \mod 5 =
1(7+9)mod5=16mod5=1.
2. Subtraction:
(a−b)mod n=[(amod n)−(bmod n)]mod n(a - b) \mod n = [(a \mod n) - (b \mod n)]
\mod n(a−b)modn=[(amodn)−(bmodn)]modn.
Example: (7−9)mod 5=−2mod 5=3(7 - 9) \mod 5 = -2 \mod 5 =
3(7−9)mod5=−2mod5=3 (because −2+5=3-2 + 5 = 3−2+5=3).
3. Multiplication:
(a⋅b)mod n=[(amod n)⋅(bmod n)]mod n(a \cdot b) \mod n = [(a \mod n) \cdot (b
\mod n)] \mod n(a⋅b)modn=[(amodn)⋅(bmodn)]modn.
Example: (7⋅3)mod 5=21mod 5=1(7 \cdot 3) \mod 5 = 21 \mod 5 =
1(7⋅3)mod5=21mod5=1.
4. Exponentiation:
akmod n=[(amod n)k]mod na^k \mod n = [(a \mod n)^k] \mod nakmodn=
[(amodn)k]modn.
Example: 34mod 5=81mod 5=13^4 \mod 5 = 81 \mod 5 = 134mod5=81mod5=1.

Applications
1. Cryptography:
Modulo arithmetic is fundamental in many encryption algorithms like RSA.
Public-key cryptography relies heavily on properties of modular exponentiation.
2. Computer Science:
Hash functions use modulo arithmetic to map data to fixed-size values.
Useful in cyclic data structures (e.g., circular buffers).
3. Number Theory:
Solving Diophantine equations and understanding the distribution of prime
numbers.
Modular inverses and solving congruences.

Important Concepts
1. Modular Inverse:
An integer aaa has an inverse modulo nnn if there exists an integer bbb such that
a⋅b≡1(modn)a \cdot b \equiv 1 \pmod{n}a⋅b≡1(modn).
The inverse exists if and only if aaa and nnn are coprime (i.e., gcd⁡(a,n)=1\gcd(a,
n) = 1gcd(a,n)=1).
2. Chinese Remainder Theorem:
Provides a way to solve systems of simultaneous congruences with different
moduli.
If n1,n2,...,nkn_1, n_2, ..., n_kn1​,n2​,...,nk​are pairwise coprime, then the system:
{x≡a1(modn1)x≡a2(modn2)x≡ak(modnk)\begin{cases} x \equiv a_1 \pmod{n_1} \ x
\equiv a_2 \pmod{n_2} \ \vdots \ x \equiv a_k \pmod{n_k} \end{cases} ⎩⎨⎧
​x≡a1​
(modn1​)x≡a2​(modn2​)⋮x≡ak​(modnk​)​has a unique solution modulo N=n1n2⋯nkN =
n_1 n_2 \cdots n_kN=n1​n2​⋯nk​.
3. Fermat's Little Theorem:
If ppp is a prime number and aaa is an integer not divisible by ppp, then
ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}ap−1≡1(modp).

Practice Problems
1. Compute 45mod 745 \mod 745mod7.
2. Solve x≡3(mod4)x \equiv 3 \pmod{4}x≡3(mod4) and x≡5(mod6)x \equiv 5
\pmod{6}x≡5(mod6) using the Chinese Remainder Theorem.
3. Find the modular inverse of 3 modulo 7.
Conclusion
Modulo arithmetic is a powerful and versatile tool in mathematics and computer science,
offering elegant solutions to problems involving integers and their remainders.
Understanding its properties and applications is essential for advanced studies in these
fields.

You might also like