Euclid's Algorithm Explained: Modulo n & Remainders

  • Thread starter Thread starter skook
  • Start date Start date
  • Tags Tags
    Algorithm
Click For Summary
SUMMARY

This discussion focuses on Euclid's Algorithm and its application in finding the greatest common divisor (GCD) of two integers using modulo operations. The algorithm asserts that for two positive integers, m and n, with GCD p, there exist integers a and b such that am + bn = p. Examples provided include calculating the GCD of 18 and 8, resulting in a GCD of 2, and the GCD of 31 and 7, yielding a GCD of 1. The discussion emphasizes the method of successive divisions to derive the coefficients a and b.

PREREQUISITES
  • Understanding of Euclid's Algorithm
  • Familiarity with greatest common divisor (GCD)
  • Basic knowledge of modulo operations
  • Concept of integer linear combinations
NEXT STEPS
  • Study the implementation of Euclid's Algorithm in Python
  • Learn about the Extended Euclidean Algorithm for finding coefficients a and b
  • Explore applications of GCD in cryptography, particularly in RSA encryption
  • Investigate the properties of modular arithmetic in number theory
USEFUL FOR

Mathematicians, computer scientists, and students studying number theory or algorithms, particularly those interested in GCD calculations and modular arithmetic.

skook
Messages
14
Reaction score
0
I can do it, but can't understand how it works. Is there a straightforward expalnation in terms of
[tex] \ \mathbb{Z}_{n} [/tex]
the set of remainers in modulo n? Could someone try to explain, pls.
 
Physics news on Phys.org
skook said:
I can do it, but can't understand how it works. Is there a straightforward expalnation in terms of
[tex] \ \mathbb{Z}_{n} [/tex]
the set of remainers in modulo n? Could someone try to explain, pls.

It's not clear to me what you want. "Explaining" Euclid's algorithm in terms of Zn seem much to complicated to me. Euclid certainly didn't know anything about Zn! Euclids algorithm asserts that if m and n are two positive integers, with greatest common divisor p, there exist two integers, a and b, such that am+ bn= p. The "algorithm" itself is a way of finding a and b by successive divisions. For example, if m= 18 and b= 8, then the greatest common divisor is 2. 8 divides into 18 twice, with remainder 2, 2 divides into 8 4 times with remainder 0, showing that 18- 2(8)= 2: a= 1, b= -2.
Second example, the greatest common divisor of 31 and 7 is 1: 7 divides into 31 4 times with remainder 3: 31= (4)(7)+ 3 or 31- 4(7)= 3. 3 divides into 7 twice with remainder 1: 1= 7- 2(3)= 7- 2(31- 4(7))= 8(7)- 2(31).
a= 8, b= -31.
 

Similar threads

Replies
14
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 96 ·
4
Replies
96
Views
12K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K