Iterations in the Euclidean algorithm

AI Thread Summary
The discussion revolves around proving that the Euclidean Algorithm requires at most 2k iterations to compute the gcd of two natural numbers m and n, given that min(m, n) is at least 2^k. Participants express confusion about the necessary steps to demonstrate that the remainders satisfy the condition r_{k+2} ≤ r_k/2. There is a suggestion to clarify the initial statement to ensure it accurately reflects the conditions for k. The conversation highlights the need for a structured approach, possibly using cases, to prove the relationship between the remainders. The thread emphasizes the importance of understanding the implications of the hint provided in the problem.
Panphobia
Messages
435
Reaction score
13

Homework Statement


Let m and n be natural numbers. Suppose ## min(m, n) \geq 2^k ## for some natural number k. Show that the Euclidean Algorithm needs at most ## 2k ## iterations to calculate the gcd of m and n.

The Attempt at a Solution


[/B]
So far I think I need to show that for all the remainders ## r_{k} ## ## r_{k+2} \leq \frac{r_{k}}{2} ##. But I have no idea what else to do or how to prove that.
 
Physics news on Phys.org
Panphobia said:

Homework Statement


Let m and n be natural numbers. Suppose ## min(m, n) \geq 2^k ## for some natural number k. Show that the Euclidean Algorithm needs at most ## 2k ## iterations to calculate the gcd of m and n.

The Attempt at a Solution


[/B]
So far I think I need to show that for all the remainders ## r_{k} ## ## r_{k+2} \leq \frac{r_{k}}{2} ##. But I have no idea what else to do or how to prove that.

The statement is incomplete: I think you had better say ##2^k \leq \min(m,n) < 2^{k+1}##. (Otherwise, ##k = 1## would satisfy your hypothesis, and your claim would be that for any pair ##m,n \geq 2## we can find their gcd in at most 2 steps.)
 
It should be changed to ## min(m, n) \leq 2^k ##
 
To show that ## r_{k+2} \leq \frac{r_k}{2} ## how would I do that? Contradiction? Cases?
 
Panphobia said:
To show that ## r_{k+2} \leq \frac{r_k}{2} ## how would I do that? Contradiction? Cases?

What makes you think you need to show that? Was it supplied as a hint by the person setting the question?
 
Yeah it was supplied as a hint. According to the hint it's supposed be proven using cases. But I can't see it.
 
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...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...

Similar threads

Replies
11
Views
3K
Replies
5
Views
2K
Replies
1
Views
1K
Replies
4
Views
4K
Replies
8
Views
2K
Replies
4
Views
2K
Back
Top