I read in a book that there is a more efficient algorithm (which uses less storage in computers) than the extended euclidean algorithm in the case of relative primes.
As it appears in the attached photo, I could prove that if P_t = a and Q_t = b, then it would be a valid algorithm. But, unfortunately, I can't prove that this recursion will eventually yield "a" and "b". So, anyone can tell me why it works??

2026-03-29 22:27:04.1774823224
Proving the validity of a more efficient algorithm than the extended euclidean algorithm for relative primes
74 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in ELEMENTARY-NUMBER-THEORY
- Maximum number of guaranteed coins to get in a "30 coins in 3 boxes" puzzle
- Interesting number theoretical game
- How do I show that if $\boldsymbol{a_1 a_2 a_3\cdots a_n \mid k}$ then each variable divides $\boldsymbol k $?
- Using only the digits 2,3,9, how many six-digit numbers can be formed which are divisible by 6?
- Algebra Proof including relative primes.
- How do I show that any natural number of this expression is a natural linear combination?
- Counting the number of solutions of the congruence $x^k\equiv h$ (mod q)
- algebraic integers of $x^4 -10x^2 +1$
- What exactly is the definition of Carmichael numbers?
- Number of divisors 888,888.
Related Questions in GCD-AND-LCM
- How do I show that if $\boldsymbol{a_1 a_2 a_3\cdots a_n \mid k}$ then each variable divides $\boldsymbol k $?
- GCD of common divisors in integral domain
- How do I solve this difficult gcd question?
- Fractions of the form $\frac{a}{k}\cdot\frac{b}{k}\cdot\frac{c}{k}\cdots=\frac{n}{k}$
- Why can't be a number the gcd of two numbers?
- Prove that if $\gcd(m, n) > 1$, then there do not exist integers $x, y$ so that $mx + ny = 1$.
- Least number of cuts to share sausages equally
- For $f \in \mathbb{Z}[x]$ , $\deg(\gcd_{\mathbb{Z}_q}(f, x^p - 1)) \geq \deg(\gcd_{\mathbb{Q}}(f, x^p - 1))$
- GCD as linear combination of two numbers
- A question regarding greatest common divisor
Related Questions in EUCLIDEAN-ALGORITHM
- Euclidean algorithm matrix proof
- Find the coefficients in Euclid's algorithm
- Uniqueness of integers satisfying the Extended Euclidian algorithm
- A small theatre has a student rate of 3 per ticket and a regular rate of 10 per ticket
- derive the eculidean algorithm for calculating gcd(a,b)
- Prove that the following set is a field
- Euclidean Case of the TSP for a given problem.
- If $5x \equiv 15 \pmod{25}$, then definitely $x \equiv 3 \pmod{25}$. Is this true or false?
- Why does the method for division work?
- Finding $2^{-1}\pmod{53}$ via Euclidean algorithm
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
This is what you get by applying continued fractions to finding $\gcd(a,b) $ and producing a Bezout identity $ax+by = \gcd(a,b) .$ Consecutive convergents in a continued fraction have the little 2 by 2 cross product equal to $\pm 1 $
On page 18 they find the gcd of 73 and 25:
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
$$ \gcd( 73, 25 ) = ??? $$
$$ \frac{ 73 }{ 25 } = 2 + \frac{ 23 }{ 25 } $$ $$ \frac{ 25 }{ 23 } = 1 + \frac{ 2 }{ 23 } $$ $$ \frac{ 23 }{ 2 } = 11 + \frac{ 1 }{ 2 } $$ $$ \frac{ 2 }{ 1 } = 2 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccc} & & 2 & & 1 & & 11 & & 2 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 2 }{ 1 } & & \frac{ 3 }{ 1 } & & \frac{ 35 }{ 12 } & & \frac{ 73 }{ 25 } \end{array} $$ $$ $$ $$ 73 \cdot 12 - 25 \cdot 35 = 1 $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
$$ \gcd( 100, 67 ) = ??? $$
$$ \frac{ 100 }{ 67 } = 1 + \frac{ 33 }{ 67 } $$ $$ \frac{ 67 }{ 33 } = 2 + \frac{ 1 }{ 33 } $$ $$ \frac{ 33 }{ 1 } = 33 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccc} & & 1 & & 2 & & 33 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 1 }{ 1 } & & \frac{ 3 }{ 2 } & & \frac{ 100 }{ 67 } \end{array} $$ $$ $$ $$ 100 \cdot 2 - 67 \cdot 3 = -1 $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
$$ \gcd( 1001, 43 ) = ??? $$
$$ \frac{ 1001 }{ 43 } = 23 + \frac{ 12 }{ 43 } $$ $$ \frac{ 43 }{ 12 } = 3 + \frac{ 7 }{ 12 } $$ $$ \frac{ 12 }{ 7 } = 1 + \frac{ 5 }{ 7 } $$ $$ \frac{ 7 }{ 5 } = 1 + \frac{ 2 }{ 5 } $$ $$ \frac{ 5 }{ 2 } = 2 + \frac{ 1 }{ 2 } $$ $$ \frac{ 2 }{ 1 } = 2 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccccccc} & & 23 & & 3 & & 1 & & 1 & & 2 & & 2 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 23 }{ 1 } & & \frac{ 70 }{ 3 } & & \frac{ 93 }{ 4 } & & \frac{ 163 }{ 7 } & & \frac{ 419 }{ 18 } & & \frac{ 1001 }{ 43 } \end{array} $$ $$ $$ $$ 1001 \cdot 18 - 43 \cdot 419 = 1 $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
The most steps for $a,b$ of a given size happens with consecutive Fibonacci numbers
$$ \gcd( 144, 89 ) = ??? $$
$$ \frac{ 144 }{ 89 } = 1 + \frac{ 55 }{ 89 } $$ $$ \frac{ 89 }{ 55 } = 1 + \frac{ 34 }{ 55 } $$ $$ \frac{ 55 }{ 34 } = 1 + \frac{ 21 }{ 34 } $$ $$ \frac{ 34 }{ 21 } = 1 + \frac{ 13 }{ 21 } $$ $$ \frac{ 21 }{ 13 } = 1 + \frac{ 8 }{ 13 } $$ $$ \frac{ 13 }{ 8 } = 1 + \frac{ 5 }{ 8 } $$ $$ \frac{ 8 }{ 5 } = 1 + \frac{ 3 }{ 5 } $$ $$ \frac{ 5 }{ 3 } = 1 + \frac{ 2 }{ 3 } $$ $$ \frac{ 3 }{ 2 } = 1 + \frac{ 1 }{ 2 } $$ $$ \frac{ 2 }{ 1 } = 2 + \frac{ 0 }{ 1 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccccccccccccccc} & & 1 & & 1 & & 1 & & 1 & & 1 & & 1 & & 1 & & 1 & & 1 & & 2 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 1 }{ 1 } & & \frac{ 2 }{ 1 } & & \frac{ 3 }{ 2 } & & \frac{ 5 }{ 3 } & & \frac{ 8 }{ 5 } & & \frac{ 13 }{ 8 } & & \frac{ 21 }{ 13 } & & \frac{ 34 }{ 21 } & & \frac{ 55 }{ 34 } & & \frac{ 144 }{ 89 } \end{array} $$ $$ $$ $$ 144 \cdot 34 - 89 \cdot 55 = 1 $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$
If there was a common factor, this is divided out in a specific way:
$$ \gcd( 1043, 1001 ) = ??? $$
$$ \frac{ 1043 }{ 1001 } = 1 + \frac{ 42 }{ 1001 } $$ $$ \frac{ 1001 }{ 42 } = 23 + \frac{ 35 }{ 42 } $$ $$ \frac{ 42 }{ 35 } = 1 + \frac{ 7 }{ 35 } $$ $$ \frac{ 35 }{ 7 } = 5 + \frac{ 0 }{ 7 } $$ Simple continued fraction tableau:
$$ \begin{array}{cccccccccc} & & 1 & & 23 & & 1 & & 5 & \\ \frac{ 0 }{ 1 } & \frac{ 1 }{ 0 } & & \frac{ 1 }{ 1 } & & \frac{ 24 }{ 23 } & & \frac{ 25 }{ 24 } & & \frac{ 149 }{ 143 } \end{array} $$ $$ $$ $$ 149 \cdot 24 - 143 \cdot 25 = 1 $$
$$ \gcd( 1043, 1001 ) = 7 $$
$$ 1043 \cdot 24 - 1001 \cdot 25 = 7 $$
$$ \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc \bigcirc $$