Questions tagged [euclidean-algorithm]
For questions about the uses of the Euclidean algorithm, Extended Euclidean algorithm, and related algorithms in integers, polynomials, or general Euclidean domains. This is **not** about Euclidean geometry.
802 questions
-3
votes
0
answers
59
views
Euclid's Labour [closed]
edit: projecteuler.net discourages sharing direct solutions for problems after 1-100, i just need some hints, then i can work up from there
problem 958 (Euclid's Labour) from projecteuler.net (...
8
votes
3
answers
310
views
Why is there no Euclidean Algorithm for the least common multiple (lcm)?
The greatest common divisor (gcd) of two integers $a$ and $b$ can be computed with the Euclidean Algorithm.
With the gcd known, one can compute the least common multiple (lcm) via the formula $\mathrm{...
1
vote
1
answer
76
views
Does Euclidean division extend ordinary division?
Let $A$ be a Euclidean domain, i.e. an integral domain together with a Euclidean degree function $\delta \colon A \setminus \{0\} \to \mathbb{N}$ such that for every $a, b \in A$, $b \neq 0$ there ...
1
vote
1
answer
135
views
Resultants on two polynomials on two variables
Assume everything known about resultant of two polynomials on one variable. Now suppose we are given polynomials $P(x,y)$ and $Q(x,y)$, aiming to find whether they have a non-constant common factor.
...
1
vote
0
answers
70
views
How do I check if I found all generators of the solution module of a linear homogeneous diophantine equation?
I have a linear diophtantine equation
$$28x + 30y + 31z=365$$
and want to find all its solutions. Using the Gauss-Euclid algorithm, I start with the matrix
$$\pmatrix{28 & 1 & 0 & 0 \\ 30 &...
1
vote
0
answers
81
views
Euclid algorithm proof (Undergraduate algebra - Lang)
I have a question about the proof Lang provided in "Undergraduate Algebra". First, he proves that given two integers $m,n, \ m > 0$, there exists other two integers $q,r, \ 0\le r < m$ ...
0
votes
1
answer
201
views
Generating Numbers with Euclidean Algorithm [closed]
I recently looked at the question Sequences with Difference Occurring and the answer. The accepted answer suggests that
Repeatedly take the absolute value of the difference of consecutive terms, and ...
0
votes
1
answer
133
views
Euclidean Algorithm Problem with non-match coefficient [duplicate]
If $a,b$ natural numbers and $\gcd(a,b)=1$, determine all value of $\gcd(2a+b,b^5-a^5)$
Can anyone help me, I'm trying to use Euclidean algorithm but its just stuck.
First,you can split $b^5-a^5=(b-a)(...
0
votes
0
answers
28
views
Let $w = \frac{1+\sqrt{-11}}{2}$ and let $R = \mathbb{Z}[w] = \{a + b w \mid a, b \in \mathbb{Z}\}$. Show that $R$ is a Euclidean domain. [duplicate]
Let $w = \frac{1+\sqrt{-11}}{2}$ and let $R = \mathbb{Z}[w] = \{a + b w \mid a, b \in \mathbb{Z}\}$. Show that $R$ is a Euclidean domain.
I used the norm function $\phi(a+bw)=a^2 + ab + 3b^2$ as my ...
1
vote
0
answers
48
views
Why can the resolvent be determined using the euclidian algorithm?
It is fairly common to define the resultant and the $i$-th subresultant as determinant of some matrix involving the sylvester matrix. I would like to avoid the sylvester matrix.
I wonder if it is not ...
1
vote
2
answers
112
views
Invariance of the resultant under change of polynomials
Wikipedia states that the resultant of two monic polynomials $a,b\in K[x]$ remains the same, if one replaces $b$ with $(b-qa)$, where $q\in K[x]$ is another polynomial:
$$\mathrm{res}(a,b) = \mathrm{...
10
votes
2
answers
310
views
Avoid unnecessary calculations when multiplying matrices if only need one element of resulting matrix
The Problem:
I need only the bottom left element of a product of matrices $(\bf{M_1}+\bf{I})(\bf{M_2}+\bf{I})\cdots(\bf{M_N}+\bf{I})$,
where $\bf{I}=\begin{pmatrix}
1 & 0\\
0 & 1\end{pmatrix}$,...
1
vote
0
answers
35
views
Is the expected length of a random VRP known? [closed]
I have some regular area (e.g. a rectangle or a square), and I have $N$ random points there. Further, I have $k$ agents to visit the random points. The aim is to minimise total costs. Is there any ...
0
votes
0
answers
52
views
Question about the proof of Euclidean algorithm.
Theorem
If $a = bq+r, \text{then gcd}(a,b)=\text{gcd}(b,r) ... \text{gcd}(r_{i-1},r_i) = \text{gcd}(r_i,0)=r_i$.
Proof:
Let $d$ be a common divisor of $a$ and $b: d|a, d|b \implies d|(a-bq)\implies d|...
0
votes
1
answer
86
views
What exactly does the extended Euclidean algorithm compute for polynomials over a commutative ring?
Let $f,g\in A[x]$ with $A$ a commutative ring. IIUC, the extended Euclidean algorithm computes a minimal degree element in the ideal $\langle f,g\rangle\vartriangleleft A[x]$ (alongside the Bézout ...
0
votes
0
answers
44
views
If exists $k\in Z$ where $f(a) - f(b)k = f(a-b)$, prove that $gcd(f(a), f(b)) = f(gcd(a,b))$ [duplicate]
Problem
Let $f:Z \to Z$ that for all $a\geq b\in Z$ exists at least one $k\in Z$ where $f(a) - kf(b) = f(a-b)$. Prove that $gcd(f(a), f(b)) = f(gcd(a,b))$.
Where did it come from?
I was working with $...
0
votes
3
answers
177
views
How do we know that the euclidean algorithm produces the greatest common factor and not just one of the common factors?
I'm trying to develop an intuitive sense for why the euclidean algorithm is true, and I'm stuck on how to prove that it's the greatest common factor vs just A common factor. So far I can understand ...
0
votes
1
answer
104
views
An estimation of Bezout Coefficients(produced by Extended Euclidean Algorithm) on Gaussian integers
Problem: Suppose that for two given Gaussian integers $a$ and $b\ (|a|>|b|>0)$, there exists $a_0$ such that the remainder of the Euclidean division of $a_0$ by $a$ is exactly $b$. If it takes $...
0
votes
1
answer
189
views
Extended euclidian algorithm
I'm trying to understand how the matrix form of the extended euclidian algorithm for polynomials works for a BCH code with coefficients from $GF(2^4)$ in https://en.wikipedia.org/wiki/BCH_code
for ...
0
votes
1
answer
60
views
Clarification on the forward extended Euclidean algorithm for finding gcd and linear solution [duplicate]
I have been reviewing Bill Dubuque's explanation of a forward version of the extended Euclidean algorithm in another question. I have seen other explanations of this method on the internet, but Bill's ...
0
votes
1
answer
59
views
Euclidean algorithm in commutative rings with unity [duplicate]
Let R be a commutative ring with identity, and J an ideal generated by the members $a^n-1$ and $a^m-1$ for some $a \in R$ and $n, m$ positive integers.
I want to establish that the principal ideal ...
0
votes
1
answer
140
views
The state machine for "Extended Euclidean Gcd Algorithm" terminates after at most the same number of transitions as that of the Euclidean algorithm
This is one following question based on one question I asked before
In spring18 mcs.pdf, it has Problem 9.13:
Define the Pulverizer State machine to have:
$$
\begin{align*}
\text{states} ::=&...
0
votes
1
answer
191
views
Why is the Pulverizer machine partially correct?
From Eric Lehman et al.'s Mathematics for Computer Science [PDF]:
Problem 9.13. $\,$ Define the Pulverizer state machine to have:
$$ \begin{align*}
\text{states} ::=& \mathbb{N}^6&\\
\...
-1
votes
1
answer
63
views
What have I missed here in this Euclidean algorithm trying to find D of RSA
Given the RSA public key find the decryption key d and decrypt the ciphertext c=8.
Known information:
n=119, p=17, q=7, e=13
$\phi(n) = (p-1)(q-1) = 16\times 6=96$
Equation for finding d:
$$ed\...
1
vote
1
answer
125
views
RSA finding D key
Given the RSA public key find the decryption key d and decrypt the ciphertext c=5.
Known information:
n=221, p=17, q=13, e=11
$\phi(n) = (p-1)(q-1) = 16\times 12=192$
Equation for finding d:
$$ed\...
0
votes
4
answers
239
views
Use the Euclidean algorithm steps to find ALL the integer solutions of the equation [duplicate]
Use the Euclidean algorithm to find ALL the integer solutions of the equation:
$$5x+72y=1$$
My attempt:
$5x + 72y =1$
$72 = 14 \times 5 + 2 \quad (14~obtained~by~72/5 = 14.4)$
$5 = 2 \times 2 + 1$
...
4
votes
1
answer
140
views
Minimal size of $a^2+b^2$ such that $ad-bc=1$
If $c,d$ are two relatively prime positive integers, then we can find integers $a,b$ such that $ad-bc=1$. But $a$ and $b$ are not unique: we can replace $a$ with $a+kc$ and $b$ with $b+kd$ for any ...
4
votes
0
answers
139
views
Minimum $k$ for which every positive integer of the interval $(kn, (k+1)n)$ is divisible by at least one prime number less than $n$
As a continuation of this question relating the Minimum $k$ for which every positive integer of the interval $(kn, (k+1)n)$ is composite and this other one on the divisibility of numbers in intervals ...
1
vote
3
answers
366
views
About reversing the Euclidean Algorithm, Lemma of Bézout [duplicate]
From the book Discrete Mathematics for Computing 2nd Edition in eBook:
I know how to perform the Euclidean Algorithm and GCM(a,b). I am however, deeply confused by this:
$$1 = 415 - 69(421 - 1 \times ...
0
votes
0
answers
51
views
Find integral values of x , y and z : $6x +10y + 15z= -1$ [duplicate]
I have done similar type of questions before by using the Euclidean Division Lemma/Algorithm to rewrite the equation and then find the solution, but those were problems with only two variables.
In the ...
1
vote
1
answer
133
views
What is the probability a random integer $x$ when divided by $3$ has a remainder smaller than when $x$ is divided by $9$? without monte-carlo.
I noticed the quantity of numbers from 1-100 with remainder zero modulo nine = quantity of numbers from 1-100 with remainder one modulo nine > quantity of numbers from 1-100 with remainder 2 modulo ...
1
vote
1
answer
186
views
An intuitive, geometric and informal proof of the Euclidean algorithm
The version of the Euclidean algorithm that I'm trying to prove is as follows:
$$\text{For natural numbers $a$ and $b$ such that $a \geq 1,$ $b \geq 0$ and $a \geq b,$ gcd($a,b$) =}
\begin{cases}
a, &...
0
votes
0
answers
34
views
If we have the Bezout coefficient, how to find the smallest possible coefficient that can take its place? [duplicate]
The question is the following:
"Determine the pair of numbers m,n such that gcd(1234,5678)=1234⋅m+5678⋅n for which n is the smallest positive integer".
I found that m=704 and n=-153. But n ...
2
votes
1
answer
263
views
Definition of "division with remainder" for rings?
Turns out that I cannot find such thing as "the definition of division with remainder" for rings. It is all good if we specify integers, polynomials, etc, were one division with remainder is ...
0
votes
0
answers
66
views
Logic behind the Extended Euclidean Algorithm
Thank you beforehand for reading my question.
In the terms that I want to understand the Extended version of the Euclidean Algorithm, I understand the Euclidean Algorithm as follows:
You find the ...
0
votes
0
answers
61
views
Extended Euclidian algorithm for polynomials [duplicate]
this question follows one from yesterday that got deleted because it was a duplicate.
The problem was about solving this equation (in $ℚ[x]$) :
$$f(x)(2x^3 + 3x^2 + 7x + 1) + g(x)(5x^4 + x + 1) = x + ...
0
votes
1
answer
147
views
Algebra: find polynomials $M(x)$ and $N(x)$ such that $x^{m}M(x)+(1-x)^{n}N(x)=1$.
Find polynomials $M(x)$ and $N(x)$ such that
$$
x^{m}M(x)+(1-x)^{n}N(x)=1.
$$
Here are my thoughts about the problem.
If I substitute $0$ in the left side of equation I get $f(0)=N(0)=1$, so I have ...
2
votes
1
answer
155
views
Calculating the gcd of two polynomials in integers using a prime field
Let $f, g \in \mathbb{Z}[x]$. Let also $h \in \mathbb{Q}[x]$ be the $\gcd(f,g)$ found by the Euclidean algorithm. Now, for $p$ an odd prime, let $h^* \in \mathbb{Z}/p\mathbb{Z}[x]$ be the $\gcd(f,g)$ ...
0
votes
0
answers
73
views
How to compute inverses in $\mathbb{Q}[x] / \langle x^3 + 3x + 3 \rangle$ [duplicate]
When working in the field $\mathbb{Q}[X] / \langle X^3 + 3X + 3 \rangle$, let $a$ represent the image of $X$ under the natural quotient mapping.
I am trying to understand the range of strategies that ...
1
vote
0
answers
627
views
What is the correct formula for Within Cluster Sum of Squares
I am studying clustering with K-Means algorithm and I got stumbled in the "inertia", or "within cluster sum of squares" part. First I would appreciate if anyone could explain me ...
0
votes
2
answers
295
views
Prove there is a polynomial $d(x) \in \mathbb Q[x]$ that is a gcd of $f(x)$ and $g(x)$ and whose term of minimal degree is $d_rx^r.$ (D&F #9.3.5(a)).
Here is the question I am trying to understand its solution:
Let $R = \mathbb Z + x \mathbb Q[x] \subset \mathbb Q[x]$ be the set of polynomials in $x$ with rational coefficients whose constant is an ...
1
vote
0
answers
114
views
Exended Euclidean algorithm, row reduction of Sylvester matrix, and gcd
Let $f,g\in A[x]$ with $A$ a commutative ring. Suppose $f$ is monic (for convenience), so that $A[x]/\langle f\rangle $ is a free $A$-module.
If I understand correctly, the extended Euclidean ...
0
votes
2
answers
275
views
Determine an angle in two overlapping triangles
A triangle $ABC$ is given as shown below. We know that $i = i_1$ and $k = k_1 = k_2$. Determine angle $\gamma$ $geometrically$. Note: Through variations in 'geogebra' I think that $\gamma = \frac{3}{4}...
0
votes
0
answers
18
views
How does the reduction work in backwards substitution in Bézout's identity? [duplicate]
I'm a bit stuck on one part of Bézout's identity when used with Euclid's algorithm.
The specific part of the equation I can't see is;
...
1
vote
0
answers
124
views
Lang's proof of Euclidean algorithm for power series
I have a question about the use of projections in Lang's proof of the Euclidean division algorithm for power series (Algebra - Serge Lang, Chapter IV, section 9, Theorem 9.1). Specifically, there is a ...
1
vote
0
answers
42
views
If $n, d \in \mathbb{N}$ are such that $d < n$, show that $n = c_0 + c_1d+ \cdots + c_kd^k$ with each $c_i \in \mathbb{Z}$ such that $0 \leq c_i < d$.
I am trying to prove one of the early questions in Serge Lang's Undergraduate Algebra textbook (Question 1 on Section 1.5) and I am not sure if I have proven it correctly.
Let $n, d \in \mathbb{N}$ ...
4
votes
0
answers
90
views
Alternating sum of the length of intervals
Here's the problem
For two odd $m$ and $n$, which are coprime, consider the interval $[0, mn]$ and let
$$
A = \{0, m, 2m, \dots , nm\}
\quad\text{and}\quad
B = \{0, n, 2n, \dots , mn\}.
$$
...
1
vote
1
answer
312
views
Is it possible for integer division in C++ to express a compact mathematical condition, as for Euclidean division?
I am studying integer division in C++. At the same time, I read the wikipedia article 'Euclidean division'. In this article there is such a lemma:
...
1
vote
1
answer
187
views
Number of steps in subtractive Euclidean algorithm
Given 2 non-negative integers $a$, $b$ that range between (1 and 1e9), let $c = |a - b|$ and after calculating $c$ let $a = b$, $b = c$ then recalculate $c$. what is the number of operations needed ...
1
vote
0
answers
563
views
In a Euclidean domain $R$, every element with minimum norm is a unit.
I'm having trouble with the
Claim: In a Euclidean domain $R$, every element with minimum norm is a unit.
The proofs I have seen say, e.g., $1 = q a + r$, where $a$ has minimum norm $N(a) = m$. Then, $...