5

Let $a=p_1^{x_1}p_2^{x_2}\cdots\cdot p_q^{x_q}$ and $b=p_1^{y_1}p_2^{y_2}\cdots p_r^{x_r}$ http://www.cut-the-knot.org/blue/gcd_fta.shtml, https://math.stackexchange.com/a/349867/85100 say —
Since gcd(a,b) is the largest common divisor of a and b and is divisible by any other common divisor of the two,

GCD$(a,b)=p_1^{\min(x_1,y_1)}p_2^{\min (x_2,y_2)} \cdots p_q^{\min (x_q,y_q)}$

LCM$(a,b)= p_1^{\max(x_1,y_1)}p_2^{\max(x_2,y_2)}\cdots p_r^{\max (x_r,y_r)}$

I understand GCD(a,b) has to divide both $a,b$. Therefore the exponent of any prime factor $p_i$ in GCD has to be in both $a,b$ — therefore $p_i^{\min(x_i, y_i)}$. But I'm muddled and anxious. Why does $\min$ appear in GREATEST common divisor? Why does $\max$ appear in LOWEST common multiple?

3 Answers3

11

If we are several persons, the GREATEST height that we can all reach is the MINIMUM of our heights (the smallest person amongst us is the problem), the lowest door that we can all pass through is the MAXIMUM of our heights (the tallest person is the problem).

Phira
  • 20,860
  • 4
    Thanks. Upvote. Let me know if you want to change your answer — so height doesn't show up in two places for GREATEST and MINIMUM — and I can accept yours instead. – Dwayne E. Pouiller Jan 06 '14 at 05:36
  • @DwayneE.Pouiller Are you serious? You copy my answer and accept your own copy because I do not replace my answer with your wording? – Phira Jan 06 '14 at 10:06
  • 2
    I don't think they are identical — but like I wrote — my answer is based on yours. I tried to make an edit because I wanted to rewrite 'GREATEST height ... MINIMUM of our heights.' Should I've accepted your answer? Please let me know – Dwayne E. Pouiller Jan 06 '14 at 10:26
  • @DwayneE.Pouiller It is really up to you whether you accept my answer, because accepting an answer is about which answer helped you. If you really think that your own rewording of my answer that was rejected as an edit by several people is the answer that helped you most, then so be it. – Phira Jan 06 '14 at 10:34
4

Hint $ $ Assume $\rm\,p\nmid a,b,\,$ and write $\ \rm(x,y) := \gcd(x,y),\ \ [x,y] := {\rm lcm}(x,y)$. By FTA (existence and uniqueness of prime factorizations) we can recursively compute gcd and lcm by "peeling off" one-prime-power at at time as follows

$\rm\ (ap^j,bp^k) = (a,b)(p^j,p^k) = (a,b)\,p^{\large \min(j,k)}\,$ by $\,\rm p^i\mid p^j,p^k\!\!\iff i\le j,k \!\iff\! i\le \min(j,k)$

$\rm\ \, [ap^j,bp^k] =\, [a,b]\,[p^j,p^k]\, =\, [a,b]\,p^{\large \max(j,k)}$ by $\,\rm p^j,p^k\mid p^i\!\! \iff j,k\le i\! \iff\! \max(j,k)\le i$

Bill Dubuque
  • 272,048
2

Although the GCD is the greatest common divisor of $a$ and $b$, it still has to divide both of them! If the exponent of $p_i$ was greater than $\min(x_i,y_i)$ then the GCD wouldn't divide both $a$ and $b$.

Take for instance $40 = 2^3 \cdot 5$ and $100 = 2^2 \cdot 5^2$. Then their GCD is $20 = 2^2 \cdot 5 = 2^{\min(3,2)} \cdot 5^{\min(1,2)}$.

Ulrik
  • 2,557