High School Generalized Continued Denominators
90 likes | 163 Vues
Understand and apply the HGCD definition and procedure, illustrated with an example and steps for calculating GCD. Explore the concept through equations and explanations.
High School Generalized Continued Denominators
E N D
Presentation Transcript
An example of HGCD Defintion If j > I, then Lemma • for i < j < k • for 0 ≦ j < k
An example of HGCD Example a0=57 a1=33 57 * (-4) + 33 * 7 = 3
An example of HGCD Procedure GCD(a1,a0) if a1 divides a0 then return a1 else R ← HGCD(a1,a0) ; ← R * ; if b1 divides b0 then return b1 else c ← b0 mod b1 ; return GCD (b1,c)
An example of HGCD • HGCD(a0,a1) a0=139 a1=53 deg(a0) = a0=b02m+c0 , m = ,deg(c0) < m a1=b12m+c1 , deg(c1) < m Note: deg(a1)≦ deg(a0), return
An example of HGCD 139 = 17*23+3 , m= 53 = 6*23+5
An example of HGCD f = d mod e = 53 mod 33 = 20 e=g02 +h0 →33 = 17*21 + 1 f=g12 +h1 → 20 = 10*21 + 0 Note: e, f 是連續的餘數項目且deg最大 為 ,也就是3/4的deg(a0) Note: g0與g1的deg最大為m+1
An example of HGCD Procedure GCD(a1,a0) if a1 divides a0 then return a1 else R ← HGCD(a1,a0) ; ← R * ; if b1 divides b0 then return b1 else c ← b0 mod b1 ; return GCD (b1,c)