








Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The proof of the Extended Euclidean Algorithm and examples of finding integers x and y that satisfy the equation gcd(a, b) = ax + by. The algorithm is explained through theorems and a contradiction proof.
Typology: Lecture notes
1 / 14
This page cannot be seen from the preview
Don't miss anything!









Yan Huang
3 Gallon 8 Gallon
3 Gallon 8 Gallon
Theorem : gcd(๐, ๐) = ๐ if and only if ๐ is the least positive integer that can be expressed as ๐๐ฅ + ๐๐ฆ where ๐ฅ, ๐ฆ โ โค.
Theorem : gcd(๐, ๐) = ๐ if and only if ๐ is the least positive integer that can be expressed as ๐๐ฅ + ๐๐ฆ where ๐ฅ, ๐ฆ โ โค.
Proof (by contradiction ): Consider the set of integers S = ๐๐ฅ + ๐๐ฆ ๐ฅ, ๐ฆ โ โค} and ๐ = min ๐. Assume (for the sake of contradiction) that ๐ โค ๐. Then ๐ = ๐๐ + ๐ where 0 โค ๐ < ๐. Therefore, ๐ = ๐ โ ๐๐ = ๐๐ฅ + ๐๐ฆ โ ๐๐ = ๐ ๐ฅ โ ๐ + ๐๐ฆ โ ๐, which contradicts to the fact that ๐ = min ๐ since ๐ โ ๐ and ๐ < ๐. Thus, the assumption was wrong and ๐|๐. Theorem : gcd(๐, ๐) = ๐ if and only if ๐ is the least positive integer that can be expressed as ๐๐ฅ + ๐๐ฆ where ๐ฅ, ๐ฆ โ โค.
mod b) q = a div b in (y, x-y*q, d)