L05_CalculatingInverses

L05_CalculatingInver - 1-1Alternative Methods for -1In class we saw how to use build a formal inverses.2-2We will now see two alternative ways

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

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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

View Full Document

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.

Unformatted text preview: 1-1Alternative Methods for CalculatingInverses2-1In class, we saw how to use theextendedgcdalgorithmto build a formal algorithmforcalculating inverses.2-2We will now see two alternative ways ofcalculating inverses; they also start fromtheextendedgcdalgorithmIn class, we saw how to use theextendedgcdalgorithmto build a formal algorithmforcalculating inverses.2-3We will now see two alternative ways ofcalculating inverses; they also start fromtheextendedgcdalgorithmThe first notes that it is not necessaryto use a formal algorithmic approach, wecan justunwindthe equations to find theinverse.In class, we saw how to use theextendedgcdalgorithmto build a formal algorithmforcalculating inverses.3-1Idea: “Iterate backwards”:3-2Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.3-3Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.3-4Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.•After carrying out stepiof Euclidean algorithm,transform it intori=mi-niqi.3-5Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.•After carrying out stepiof Euclidean algorithm,transform it intori=mi-niqi.•Letrk(stepk) be last non-zero remainder.Recall that ifrk= 1,⇒nhas an inversemodm3-6Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.•After carrying out stepiof Euclidean algorithm,transform it intori=mi-niqi.•Letrk(stepk) be last non-zero remainder.Recall that ifrk= 1,⇒nhas an inversemodm(Ifrk6= 1, thennhasnoinversemodm)3-7Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.•After carrying out stepiof Euclidean algorithm,transform it intori=mi-niqi.•Letrk(stepk) be last non-zero remainder.Recall that ifrk= 1,⇒nhas an inversemodm(Ifrk6= 1, thennhasnoinversemodm)•Recall thatmi=ni-1andni=ri-1.3-8Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm.•The equation at stepi, will be denoted bymi=niqi+ri.•After carrying out stepiof Euclidean algorithm,transform it intori=mi-niqi.•Letrk(stepk) be last non-zero remainder.Recall that ifrk= 1,⇒nhas an inversemodm(Ifrk6= 1, thennhasnoinversemodm)•Recall thatmi=ni-1andni=ri-1.•Iterate backwards starting with3-9Idea: “Iterate backwards”:•Starting with step, number steps of Euclidean algorithm....
View Full Document

This note was uploaded on 08/25/2010 for the course COMP COMP170 taught by Professor M.j.golin during the Spring '10 term at HKUST.

Page1 / 54

L05_CalculatingInver - 1-1Alternative Methods for -1In class we saw how to use build a formal inverses.2-2We will now see two alternative ways

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online