0

Having trouble with understanding this.

$$d \equiv 7^{-1} \pmod {360}$$

So far i have got

$$360 = 7 \cdot 51 + 3$$

$$7 = 3 \cdot 2 + 1$$

$$3 = 3 \cdot 1 + 0$$

Now i am stuck on the next step have looked at a few videos but have had no luck

  • I highly recommend instead using this form of the Extended Euclidean Algorithm. Not only is it easier, but it is far less error-prone than the back-substitution method. – Bill Dubuque Aug 14 '14 at 12:58

1 Answers1

0

From your first two equations,

$\begin{array}{rcl} 3&=&360-7\cdot51\\ 1&=&7-3\cdot 2\end{array}$

Now substitute: $$1 = 7-3\cdot 2=7-(360-7\cdot 51)\cdot 2 = 7\cdot 103-360\cdot 2$$ Considering this last equation $\mod{360}$, we get $1\equiv 7\cdot 103 \pmod{360}$. So $7^{-1}\equiv 103\pmod{360}$


Another format for doing this problem is $$\begin{array}{c|r|r} &x&7x\pmod{360} \\ \hline &0&360 \\ &1 & 7\\ \text{Row 3}=\text{Row 1}-51\cdot\text{Row 2}& -51&3\\ \text{Row 4} =\text{Row 2} - 2\cdot\text{Row 3} & 103 & 1 \end{array}$$

paw88789
  • 40,402
  • thanks for this...just wondering how you got to 103? 7 * 103? – luke1892 Aug 15 '14 at 02:12
  • @luke1892 Basically you are doing row operations on the table. The first two rows are 0, modulus; and 1, number you want the inverse of. To get Row n (from rows n-1 and n-2) you subtract the largest multiple of row n-2 that you can from row n-1 while keeping the rightmost column value positive. If you can't get to 1 in the right most column, your number isn't invertible with respect to the given modulus. (This is a variant of a gcd algorithm that gives the gcd as a linear (integer) combination of the inputs. – paw88789 Aug 15 '14 at 03:02