Problem 1750. Modular multiplicative inverse
Modular multiplicative inverse is used for The Chinese Remainder Theorem and RSA algorithm. You can visit Wikipedia.
Normal Modulus
X = M (mod Y)
You can solve that with M = mod(X,Y)
Inverse Modulus
X.B = M (mod Y)
given X,M,Y calculate B
B = inverse_modulus(X,M,Y)
Solution Stats
Problem Comments
-
1 Comment
The inverse modulus would be to find X such that mod(X,Y) = M where M and Y are known (or X === M (mod Y)); this is the chinese remainder theorem which is generalized for any number of Y's and M's when all have the same X and the GCD of all Y = 1 (greatest common divisor). The author is actually requesting Y*Z + M = X*B, which is not the same thing, or the inverse modulus.
Solution Comments
Show commentsProblem Recent Solvers21
Suggested Problems
-
Find the alphabetic word product
3376 Solvers
-
The Goldbach Conjecture, Part 2
2370 Solvers
-
Least common multiple of many numbers
242 Solvers
-
Find the sum of the elements in the "second" diagonal
1161 Solvers
-
Remove white space from the string
196 Solvers
More from this Author92
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!