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.
 
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top