Problems from The Euclides algorithm

Calculate the highest common factor between 252 and 198 by the Euclides algorithm, and write it as the sum hcf(252,198)=sn252+tn198.

See development and solution

Development:

  • In this case we have that: a=252 and b=198.

  • We define: r0=252, r1=198 s0=1, s1=0 t0=0, t1=1

  • Now the integer division is calculated between r0 and r1.The result is 1, and the remainder 45. Therefore: q1=1, r2=54 On the other hand: s2=s0s1q1=101=1 t2=t0t1q1=011=1

As r20, it is necessary to continue. We do the integer division between 198 (that is to say r1) and 54 (that is to say r2), and we get q2=3 and remainder r3=36. Then: s3=s1s2q2=013=3 t3=t1t2q2=1(1)3=4 As r30, we do one more step. Now the integer division between 54 (that is r2) and 36 (r3) and the result is: q3=1 and the remainder is r4=18. Now: s4=s2s3q3=1(3)1=4 t4=t3t2q2=141=5 As r40, we repeat the procedure. The integer division of r3=36 and r4=18 gives as a result q4=2, and the remainder is r5=0. And so, it is not necessary to continue any more!

  • Then we have hcf(252,198)=r4=18 (because it is the one of the penultimate step). On the other hand: hcf(252,198)=s4252+t4198=42525198

Solution:

hcf(252,198)=18=42525198

Hide solution and development
View theory