proving euclid's algorithm stops after 2k iterations

77 Views Asked by At

Apparently, when initialized on $k$-bit integers $A$, $B$, Euclid's algorithm terminates after at most $2k$ iterations. This result is not immediately intuitive to me. I would appreciate help in showing this result. Thanks.