4

Hello smart mathematicians,

I am new to advanced maths so please do not judge.

I basically learnt some cool new math equation algorithm: Euclidean Algortihm.

Basically, I used it for the following example...

11a = 1 mod 60

Using Euclidean Algorithm:
60 = 5(11)+5
11 = 2(5)+1

But then what do I do after 11 = 2(5)+1? The answer to a is 11 but then I am stuck as to why or where I am going wrong

Any help, greatly appreciated!!!!!

Jyrki Lahtonen
  • 133,153
  • But the value of $a$ can also be 71, which is 781 mod 60. There are infinite values for $a$ the way I read the equation – imranfat Aug 10 '19 at 00:56
  • See here for a convenient way to use the extended Euclidean algorithm to compute modular inverses (simpler than back substitution) – Bill Dubuque Aug 10 '19 at 01:01

3 Answers3

4

Using your equations $$ 60 = 5(11)+5\implies 5= 60 - 5(11) $$ $$ 11 = 2(5)+1\implies 1 = 11 - 2(5) $$

we can unwind everything to write the gcd 1 in terms of 11 and 60, so we have

$$ 1 = 11 - 2(5) = 11 - 2(60 - 5(11)) = 11(11) - 2(60). $$

do you see what the answer is from here?

Alex J Best
  • 4,578
  • 1
  • 18
  • 35
  • ever so sorry but now Im super confused. i dont suppose you can do it for me in Euclidean Algorithm please sir. i was so so close and i am self learning it all by myself. please sir – Tim Deasinerd Aug 10 '19 at 01:14
  • I used your euclidean algorithm steps in the equations on the left seeing as your steps for the euclidean algorithm are correct, then I rearranged them to get the equations on the right and combined them to get the last equation, this process is known as the extended euclidean algorithm, you can read about it at https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm for example – Alex J Best Aug 10 '19 at 01:20
  • Im still super confused sorry im not very smart person – Tim Deasinerd Aug 10 '19 at 01:32
  • If $1 = 1111 - 260$ then $1 \equiv 1111 \pmod {60}$ and $1111\equiv 1 \pmod{60}$. So if $a\equiv 11 \pmod {60}$ we have a solution to $11a\equiv 1\pmod {60}$. – fleablood Aug 10 '19 at 01:58
2

You have:

60 = 5(11)+5

11 = 2(5)+1

Use that to solve $11a + 60b = 1$.

Start with $1= 11 -2*5$.

Replace the $5$ from the line above $5 = 60-5*11$

So $1 = 11 - 2*5=$

$11 -2 (60-5*11) =$

$11 - 2*60 + 10*11 =$

$11*11 - 2*60$.

So $1 = 11*11 -2*60$.

And that's it!

To solve $11a + 60b =1$ we have $a=11$ and $b=-2$ are solutions.

So that means $11a = 1+2*60 \equiv 1 \pmod{60}$.

If have $11*a \equiv 1 \pmod {60}$ we have figured $11*11$ so if $a=11\pmod{60}$ that is a solution.

... Okay, I haven't explained how we knew that $11a\equiv 1\pmod{60}$ had any solutions at all in the first place, nor how we knew that it had only one solution[1].... but.... you didn't ask about that.

[1] Only one solution modulo $60$, that is. $11$ is a solution but so are $11 + 60k$. But all $11 + 60k\equiv 11\pmod {60}$ and are considered, for all intents and purposes, to be the same single thing.

fleablood
  • 124,253
0

Rem:This post has been modified in order to give an appropriate answer to the threads topic.

Ok here is my version of an answer after i initially missed a bit the topic you were asking for in the first version of this post(sorry)

Basicly the poster fleablood already answered everything important about the topic.

So question was about how to solve 11a=1 mod 60 using the Euclidean Algorithm.

The connection with the Euclidean Algorithm is due to the fact that $gcd(60,11)=1$ and in general for numbers $n,m\ n>m$ we can always find integers a,b such that $gcd(n,m)=na+mb$ (known as Bezout's lemma) in order to find a and b we execute the Euclidean Algorithm and write it down and then do the backward substitution as explained by fleablood and a is then a particular solution of $11a=1\ mod\ 60$ all the rest of solutions will be congruent then.

By the way this method can be generalized to solve any conguence of the type $mx=d\ mod\ n$ if $d=gcd(m,n)$

Wassilis
  • 177
  • 2
    Yes, but the OP is asking how do you use that to conclude that if $11a \equiv 1\pmod{60}$ then $a \equiv 11\pmod{60}$? Indeed, you haven't actually explain why we are doing all this in the first place. $5= 5\cdot 1 + 0$ surely isn't a very interesting conclusion. – fleablood Aug 10 '19 at 01:56
  • Ah yes you are right,thanks i missed that. But then i have trouble understanding the question . What exactly is he asking for? I assume he wants to solve the linear congruence $11a=1 mod 60$ for unknown a(right ?) – Wassilis Aug 10 '19 at 02:15
  • The OP does but he doesn't see how $60 = 511 + 5$ and $11=25 + 1$ and $5=5*1 + 0$ will help him solve that. And from you answer I don't see how it would either. – fleablood Aug 10 '19 at 06:16
  • Yes i know of course i didn't answer his question till now i will think about it again and modify my post accordingly. I think you gave him very good and detailed answer to his question. – Wassilis Aug 10 '19 at 10:03