Finding the Inverse of 2 (mod 17): Euclidean Extended Algorithm

In summary, the conversation discusses finding the inverse of 2 (mod 17) in the context of solving congruences. The process involves using Euclid's algorithm and writing out the linear equation 2x + 17y = 1. The correct answer is 9.
  • #1
FritoTaco
132
23

Homework Statement


Hi, I'm doing a problem by solving congruences but my question is simply trying to find the inverse of [itex]2 \enspace (mod\enspace 17)[/itex] from [itex] 2x \equiv 7(mod \enspace 17)[/itex].

Homework Equations



It's hard to find a definition that makes sense but if you check my upload images you can see exactly what I'm trying to do.
Source:


The Attempt at a Solution


[/B]
Going forwards
1.) [itex]2 = 17(0) + 2[/itex]

2.) [itex]17 = 2(8) + 1[/itex]

3.) [itex]2 = 1(2) + 0[/itex]

Our gcd = 1 which means we can find the inverse starting with step 2.

Going backwards
4.) [itex]1 = 17 - 2(8)[/itex]

5.) [itex]2 = 2 - 17(0)[/itex] we wrote this from step 1 by setting the remainder equal to everything else.

6.) [itex]1 = 17 - (2 - 17(0))(8)[/itex] plug in the equation from step 5 into [itex]2[/itex] from step 4.

7.) [itex]1 = 17 - 2(8)[/itex]

So our answer says the inverse is 8, but the answer is 9. Where am I messing up?
 

Attachments

  • Capture3.PNG
    Capture3.PNG
    102.2 KB · Views: 297
Physics news on Phys.org
  • #2
Your answer says 1 = 17 - 2(8) = 17 + 2(-8).
Does that help?
 
  • Like
Likes FritoTaco
  • #3
tnich said:
Your answer says 1 = 17 - 2(8) = 17 + 2(-8).
Does that help?

Oh, I remember my teacher wrote it like this. So, I'm kinda guessing. But the answer should be between 0 and 17? And just by looking at it 17 - 8 = 9. Is this the reason?
 
  • #4
That's the reason. You could also say -8 ≡ 9 mod 17.
 
  • Like
Likes FritoTaco
  • #5
Awesome! Thanks for helping me. There were a few other problems I had the same issue with and couldn't remember what else I was supposed to do, but now it all works.
 
  • #6
One other thing that I think would help you would be to first write out the linear equation you are trying to solve. In this case, 2x = 1 mod 17 (I think was what you meant to say in the problem statement) implies that 2x + 17y = 1 for some integers x and y. That makes it clear what you are applying Euclid's algorithm to.
 
  • Like
Likes FritoTaco
  • #7
My teacher never used this method so I don't know if I will actually use it but maybe we will. Thanks!
 

What is the Euclidean Extended Algorithm?

The Euclidean Extended Algorithm is a mathematical method used to find the greatest common divisor (GCD) of two numbers. It is an extension of the Euclidean Algorithm, which is used to find the GCD of two numbers without explicitly finding the prime factors of the numbers.

How does the Euclidean Extended Algorithm work?

The algorithm works by using a series of division and subtraction operations to reduce the two given numbers to their GCD. This is achieved by repeatedly dividing the larger number by the smaller number until a remainder of 0 is obtained. The last non-zero remainder is then the GCD of the two numbers.

What is the time complexity of the Euclidean Extended Algorithm?

The time complexity of the Euclidean Extended Algorithm is O(log n), where n is the larger of the two numbers. This makes it a highly efficient algorithm for finding the GCD of two numbers.

What are the applications of the Euclidean Extended Algorithm?

The Euclidean Extended Algorithm is commonly used in cryptography to find the multiplicative inverse of a number modulo another number. It is also used in computer science for various operations involving modular arithmetic.

Can the Euclidean Extended Algorithm be used for more than two numbers?

Yes, the Euclidean Extended Algorithm can be extended to find the GCD of more than two numbers. This is achieved by repeatedly finding the GCD of two numbers and using the result as one of the numbers in the next iteration until the GCD of all numbers is obtained.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
5K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
518
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Nuclear Engineering
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
4K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
Back
Top