Untitled Document

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Your Name- Asmi

Professor Name- Dr. Inderpreet kaur

Subject Name- SIT192 (Discrete Mathematics)

19 october 2022

SIT192

Advance Number Theory


Module Learning Objectives
For completing this module, you should be able to:
1.Apply the extended Euclidean algorithm for
computing the modular inverse
2. Apply Fermat’s and Euler’s theorems to compute
high powers in modular arithmetic
3. Solve Linear equations in modular arithmetic

1) SUMMARY OF THE CONTENT

Preliminaries and Reminders


Congruence-Two numbers a and b are congruent modulo p if (b-a)
is a multiple of p.
For example- 3 ≡ 52 mod 7
Remark . If a is positive and r is the remainder of the division of a by p,
then
a ≡ r mod a.

Fundamental Theorem of Arithmetic


(Fundamental Theorem of Arithmetic). Every positive integer n greater than
1 can be written uniquely as a product of primes.We call this product the
prime factorisation of n.

GCD and LCM


(GCD and LCM). • The gcd of two numbers a and b is the greatest common
divisor.
– The lcm of two numbers a and b is the lowest common multiple.

Euclidean Algorithm
We can compute the gcd between two numbers a and b using the Euclidean algorithm. If b > a,
then the algorithm is rem(b ÷ a) = r1
rem(a ÷ r1) = r2
rem(r1 ÷ r2) = r3
⋮⋮
until we reach ri+1 = 0. Then ri is the gcd.
Theorem- If a ≡ c (mod p) and b ≡ d (mod p), then:
a + b ≡ c + d (mod p)
a ⋅ b ≡ c ⋅ d (mod p).

Bézout’s lemma
The Euclidean algorithm and Bézout’s lemma are the building blocks of our
theory. For any integers a and b, if gcd(a,b) = c, there exist numbers m and
n such that m ⋅ a + n ⋅ b = c.
In particular, a and b are relatively prime if (and only if) there are numbers
m and n such that m ⋅ a + n ⋅ b = 1.
Extended Euclidean Algorithm
The extended Euclidean algorithm is a version of the Euclidean algorithm,
which can be used to find Bézout’s coefficients. We do that by keeping
track of the substitution as we progress.

The extended Euclidean algorithm is a version of the Euclidean algorithm,


which can be used to find Bézout’s coefficients. We do that by keeping
track of the substitution as we progress. In the classical algorithm, we only
need to keep track of the remainder of the division (as we keep dividing
every remainder by the previous one). Eventually that remainder gives us
the gcd. In the extended algorithm, we add two more parameters, the
Bézout coefficients

Modular Inverse

Inverse-In algebra, dividing by x is the same thing as multiplying by 1 by x.


The modular inverse of a number x mod p is a number y such
that xy ≡ 1 (mod p).

Theorem- A number m has an inverse mod p if and only if m and p are


relatively prime (gcd(m,p) = 1).

Fermat’s little Theorem- For a prime number p, and a number a not divisible by
p, a^p ≡ a (mod p)

Example 9 (Fermat’s little theorem). Take the prime number p = 13 and a = 3.


Verify the prime number theorem
• Let us first compute ap: 3 13 = 1594323

• Now compute a p (mod p):– 3


13 = 1594323 = 13 × 122640 + 3– 3
13 ≡ 3 (mod 13)
For a prime number p, and a number a not divisible by p, we are having a result of
a^p ≡ a (mod p)

For example-

1. 3 = -------- (mod 13)


2. 3 = ------ (mod 13)

ANS.

1. 3 = 3 (mod 13)

2. 3 = 6 (mod 13)

PROOF:-
1. rk cannot be 0. Otherwise, k ⋅ a is a multiple of p. Since p is prime, either k
or a is a multiple of p. But a was chosen to not be one, and k is too small!
2. If k ≠ j, rk − rj cannot be 0. Otherwise, (k− j)⋅ a is a multiple of p. For the
same reason as before, this is not possible.
3. So, we have p − 1 numbers, all different, and all between 1 and p − 1. So,
each number appears once.
4. In other words, the sets are equal: {rk ∶ k = 1...p−1} = {k ∶ k = 1...p−1}.
Then, a^p = a (mod p)

Euler’s theorem (Euler’s totient function).


Euler’s theorem is a generalization of Fermat’s theorem for when p is not Prime.
In Euler’s theorem, we do the same thing when p is not prime, except that we only count
the numbers that are relatively prime to p (since we need to be able to solve the
equations).
That count, the number of integers between 1 and p − 1 which are relatively prime to p,
is called Euler’s totient function, and is denoted φ.

a^m ≡ a^r mod p.

φ(p) = |{m ≤ p − 1 ∶ m and p are relatively prime.}}|

Theorem- (Euler’s totient theorem). For any a such that gcd(a,p) = 1,


aφ(p) ≡ 1 mod p.’

. For any a such that gcd(a,p) = 1, a^φ(p) ≡ 1 mod p.


PROOF. Define rk= k . a(modp), where k belongs to S.

1. rk must be in S. That’s because gcd(k,p) = gcd(a,p) = 1, and so gcd(k⋅a,p) = 1.

2. Take any rk ∈ S: the equation rk = k ⋅ a (mod p) has a solution.

3. So, we have all φ(p) numbers from S, each number appearing once.

4. Then, a^φ(p) ≡ 1 (mod p)

Ex. Find 15^4042 mod 41.

rem(4042 ÷ 40) = 2.

15^4042 mod 41 ≡ 15^2 mod 41 ≡ 225 mod 41

≡ 20 mod 41

Using Euler’s and Fermat’s theorem:


Euler’s and Fermat’s theorem can be used to:

1. Quickly compute powers of a mod p.

2. Compute the inverse of a mod p.

Calculating powers.
Suppose that gcd(a,p) = 1. Then, to calculate a^m mod p (typically when m

is very large), we can follow the following procedure:

1. Divide m by p m = φ(p) × k + r.

2. Euler’s theorem tells us that a^m ≡ a^r mod p.


Reflecting on the Content:
1.What is the most important thing you learnt in this module?

The most significant lesson I took away from this module. (Euler's
theorem, Fermat's theorem) Theorems. Additionally, the modular
inverse and Bezout's lemma caught my attention .

2.How does this relate to what you already know?

The Euclidean algorithm, gcd, and lcm are topics that we are
acquainted with; nevertheless, one new concept to me is the modular
inverse.

3. Why do you think your course team wants you to learn the
content of this module?

Our course staff wants us to learn the material in this module


because they want to make sure that our foundation is solid and that
our understanding of new ideas is crystal clear.

4. How is this module useful?

It is useful for cyber security and network security

REFERENCES-

1. Class notes
2. Discrete Mathematics by Oscar Levin.
3. Notes on Discrete Mathematics by
James Aspnes.
2) learning evidences as follows-

You might also like