[Math] Ladder method for lcm and gcd

gcd-and-lcmleast-common-multiple

I think the easiest method for finding lcm and gcd is the ladder method, which can even be extended to more than two integers. For example,

enter image description here
$$
\text{lcm}(48,72,108)=2*2*3*3*2*2*1*3=432\\\text{gcd}(48,72,108)=2*2*3=12
$$
Till $3^\text{rd}$ step there are prime factors for all three numbers. But, from step $4$ only two have common prime factors. Thus while finding gcd we only take prime factors till $3^\text{rd}$ step.

What really is happening in this method, particularly when we ignore $9$ in $4^\text{th}$ step and $3$ in $5^\text{th}$ step while dividing by common factors?. What property is used in this method ?

Best Answer

What is going on at the top is finding factors common to all the numbers. The black $2,2,3$ are those. The product of them is the greatest common divisor of all the numbers. Once we get to $4,6,9$ there are no longer any common factors, so the greatest common divisor has been determined. Now we are using the fact that the least common multiple of $an, bn$ is $n\operatorname{lcm}(\frac an, \frac bn)$. We use that until there are no pairs of numbers with a common factor, here $2,1,3$. Finally we use the fact that $\operatorname{lcm}(a,b)=ab$ whenever $a$ and $b$ are coprime.

Related Question