# [SOLVED] Z18 Calculation

• Mar 2nd 2009, 07:26 PM
ronaldo_07
[SOLVED] Z18 Calculation
http://img91.imageshack.us/img91/7874/61804661.jpg

$\frac{2}{7}+\frac{7}{13}=\frac{[2]X[13]+[7]X[7]}{[7]X[13]}$

Im not sure how to multiply this out please show steps on how to do this. Thanks
• Mar 2nd 2009, 07:56 PM
TheEmptySet
Quote:

Originally Posted by ronaldo_07
http://img91.imageshack.us/img91/7874/61804661.jpg

$\frac{2}{7}+\frac{7}{13}=\frac{[2]X[13]+[7]X[7]}{[7]X[13]}$

Im not sure how to multiply this out please show steps on how to do this. Thanks

From the Euclidean algorithm (or trial and error)

$7^{-1}=13 \mod(18)$ and

$13^{-1}=7 \mod(18)$

so we end up with
$13 \cdot 2 +7\cdot 7 =26+49=75 \equiv 3 \mod(18)$
• Mar 3rd 2009, 04:22 AM
ronaldo_07
How did you get from 75 to 3mod(17)?
• Mar 3rd 2009, 08:01 AM
rajr
Hi as you mentioned it's not 3 mod 17, actually it is 3 mod 18.

take 75 and when you try to divide 75 by 18, you will get 3 as a remainder and hence 3 mod 18. is it helpful...? :)
• Mar 3rd 2009, 10:32 AM
ThePerfectHacker
Here is another way. To find inverse of 7 you need to solve $7x\equiv 1(\bmod 18)$.
This is equivalent to $7x\equiv 1 - 2\cdot 18(\bmod 18)\implies 7x\equiv -35(\bmod 18) \implies$ $x\equiv -5(\bmod 18)\implies x\equiv 13(\bmod 18)$.