Iterations in the Euclidean algorithm

In summary, to prove that the Euclidean Algorithm needs at most 2k iterations to calculate the gcd of m and n, we need to show that for any pair of natural numbers m and n where ##2^k \leq \min(m,n) < 2^{k+1}##, the remainder ##r_{k+2}## is always less than or equal to half of the previous remainder ##r_k##. This can be proven using cases as a hint suggests.
  • #1
Panphobia
435
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
  • #2
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.)
 
  • #3
It should be changed to ## min(m, n) \leq 2^k ##
 
  • #4
To show that ## r_{k+2} \leq \frac{r_k}{2} ## how would I do that? Contradiction? Cases?
 
  • #5
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?
 
  • #6
Yeah it was supplied as a hint. According to the hint it's supposed be proven using cases. But I can't see it.
 

Related to Iterations in the Euclidean algorithm

1. What is the Euclidean algorithm?

The Euclidean algorithm is a mathematical method for finding the greatest common divisor (GCD) of two numbers. It is based on the principle that the GCD of two numbers is equal to the GCD of the smaller number and the remainder of the larger number divided by the smaller number.

2. How do iterations work in the Euclidean algorithm?

In the Euclidean algorithm, iterations refer to the repeated steps of dividing the larger number by the smaller number and using the remainder as the new smaller number. This process is continued until the remainder becomes 0, at which point the GCD is found.

3. What is the significance of iterations in the Euclidean algorithm?

The number of iterations required in the Euclidean algorithm is directly related to the size of the numbers being evaluated. The algorithm is considered to be highly efficient as the number of iterations is relatively small when compared to other methods of finding the GCD.

4. Can the Euclidean algorithm handle negative numbers?

Yes, the Euclidean algorithm can handle negative numbers. The algorithm follows the same steps regardless of the sign of the numbers being evaluated. However, the GCD will always be a positive number.

5. What are some applications of the Euclidean algorithm?

The Euclidean algorithm has a variety of applications in mathematics and computer science, including simplifying fractions, finding modular inverses, and generating random numbers. It is also used in cryptography for encryption and decryption processes.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
845
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • General Math
Replies
4
Views
3K
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
175
  • Precalculus Mathematics Homework Help
Replies
1
Views
3K
Replies
2
Views
195
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top