10 likes | 142 Vues
This article explains the computation of modular inverses using the Extended Euclidean Algorithm (EE). It shows how to find the modular inverse of 3 modulo 13. By applying the algorithm, we derive that the inverse of 3 under modulo 13 results in 9, satisfying the condition (9 times 3 equiv 1 mod 13). The process includes recursion, handling base cases, and using properties of modular arithmetic, making it a fundamental technique in number theory and cryptography.
E N D
EE(3, 13) (-4, 1, 1) EE(13, 3) (1, -4, 1) EE(3, 1) (0, 1, 1) EE(1,0) (1, 0, 1) Compute: 3^-1 mod 13 Result: -4 * 3 + 1*13 = 1 Or: -4 * 3 = 1 (mod 13) Note: -4 = 9 (mod 13) So: 9 * 3 = 27 = 1 (mod 13) EE(a, b) if (b == 0) return (1, 0, a) (x’, y’, d) = EE(b, a mod b) return (y’, x’ – (a/b)y’, d)