I was proving a function to be onto but got stuck at point
(7 mod 15) * (? mod 15) = 1 mod 15
I need some value at ? .So that I can get 1 mod 15.
Thank you very much . Every help is appreciated
Asked
Active
Viewed 39 times
0
Randhawa
- 143
-
1You are looking for the modular inverse of $7 \bmod 15$. – Joffan Nov 17 '17 at 02:30
-
What is your function? How about ?=13? $7\cdot 13=91=6\cdot 15+1$ – Cornman Nov 17 '17 at 02:30
-
You could use the extended Euclidean algorithm to solve $7 x + 15 y = 1$, but a brute-force search won't take very long. – Robert Israel Nov 17 '17 at 02:33
-
@Cornman Yes it really solved my problem , Thank you very much. I totally skipped this. – Randhawa Nov 17 '17 at 02:33
1 Answers
2
In order for the modular inverse of $7\bmod 15$ to exist at all, you need $\gcd(7,15)=1$, which is true here.
Since $\color{red}{2}\cdot 7\equiv 14\equiv \color{red}{-1} \bmod 15$, you will have $\color{red}{-2}\cdot 7\equiv 1 \bmod 15$. And $-2\equiv 13\bmod 15$.
Joffan
- 39,627