How do I find a integer $y$ here such that $23y = 1 \pmod {63}$ . I got it using hit and trial. But how to approach using the extended Euclidean algorithm?
-
Have you tried searching 'extended euclidean algorithm' on this site? – Toby Mak Nov 24 '19 at 09:47
-
2Possible duplicate of Extended Euclidean Algorithm for Modular Inverse. Also, see this, and this, and this. And possibly many more. – Arthur Nov 24 '19 at 09:48
-
yes, but didn't find anything helpful for this problem. – Rishit Saiya Nov 24 '19 at 09:49
-
1Even if this question has been asked many times before, you can still add your own efforts. If you try using the extended Euclidean algorithm, and you get stuck, you can write down your steps. This allows us to better help you. See how to ask a good question for more details. – Toby Mak Nov 24 '19 at 09:53
1 Answers
The extended Euclidean algorithm is based on the observation that at each step of the basic Euclidean algorithm, the remainder is a linear combination of the two given numbers.
Namely , setting $a=r_0$, $b=r_1$ ($a>b$), the $i$-th division is $$r_{i-1}=q_ir_i+r_{i+1}\iff r_{i+1}=r_{i-1}-q_ir_i\qquad(i\ge 1),$$ so we have a linear recurrence relation of order $2$ between the remainders, hence between the Bézout relation expressing each remainder in function of $a$ and $b$: $r_i=u_ia+v_ib$.
This can be displayed in the following layout: \begin{array}{crrrrrl} n&r_i &&v_i&u_i&&q_i \\\hline &63&&0&1\\ 1&23&&1&0&&2 \\\hline 2&17&&-2&1&&1\\3&6&&3&-1&&2\\ 4&5&&-8&3&&1 \\ \color{red}5&\color{red}1&&\color{red}{11}&\color{red}{-4}\\ \hline \end{array} Therefore $\; y\equiv 11\mod 63$.

- 175,478