Euclid's Algorithm Explained: Modulo n & Remainders

  • Thread starter Thread starter skook
  • Start date Start date
  • Tags Tags
    Algorithm
AI Thread Summary
Euclid's algorithm is a method for finding the greatest common divisor (GCD) of two positive integers, m and n, expressed as a linear combination of those integers. The algorithm involves successive divisions to determine the GCD, with examples demonstrating how to find integers a and b such that am + bn = p, where p is the GCD. The discussion highlights that while explaining the algorithm in terms of the set of remainders in modulo n (denoted as \mathbb{Z}_{n}) may seem complex, the fundamental process remains straightforward. Specific examples illustrate the calculations involved, showing how to derive the GCD and the coefficients a and b. Understanding these steps clarifies the workings of Euclid's algorithm without needing to delve into 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
<br /> \ \mathbb{Z}_{n} <br />
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
<br /> \ \mathbb{Z}_{n} <br />
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.
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top