{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

L05_CalculatingInverses_print

# L05_CalculatingInverses_print - Alternative Methods for...

This preview shows pages 1–4. Sign up to view the full content.

1 Alternative Methods for Calculating Inverses

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 We will now see two alternative ways of calculating inverses; they also start from the extended gcd algorithm The first notes that it is not necessary to use a formal algorithmic approach, we can just unwind the equations to find the inverse. In class, we saw how to use the extended gcd algorithm to build a formal algorithm for calculating inverses .
3 Idea: “Iterate backwards”: Starting with step 0 , number steps of Euclidean algorithm. The equation at step i , will be denoted by m i = n i q i + r i . After carrying out step i of Euclidean algorithm, transform it into r i = m i - n i q i . Let r k (step k ) be last non-zero remainder. Recall that if r k = 1 , n 0 has an inverse mod m 0 (If r k = 1 , then n 0 has no inverse mod m 0 ) Recall that m i = n i - 1 and n i = r i - 1 . Iterate backwards starting with = n k - 1 - r k - 1 q k = n k - 1 - ( m k - 1 - n k - 1 q k - 1 ) q k = - m k - 1 q k + n k - 1 (1+ q k - 1 q k ) . . .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}