I need some help with a GCD and LCM's Problem

162 Views Asked by At

Given a list $A$ of $n$ positive integer numbers. We're gonna play this game:

$1 -$ Take randomly $2$ numbers of $A$.

$2 -$ Delete this $2$ elements of $A$.

$3 -$ Insert in $A$ their gcd and lcm.

$4 -$ Go to step $1.$

Prove that after some quantity of steps, $A$ doesn't change its elements.

1

There are 1 best solutions below

5
On BEST ANSWER

$\DeclareMathOperator{\lcm}{lcm}$I will concoct my comments into an answer.

Note that at each step, when dealing with the terms $a, b$ of the list, the product $P$ of all the terms of the list remains constant, as $$ a b = \gcd(a, b) \cdot \lcm(a, b). $$

As to the sum of the terms of the list, if $a \le b$, say, and $a \mid b$, then it does not change, as $$ a = \gcd(a, b), \quad b = \lcm(a, b). $$ However, if $a \le b$ and $a \nmid b$ (so that $a < b$) then $$ \gcd(a, b) + \lcm(a, b) > \lcm(a, b) \ge 2b > a + b, $$ so the sum of the terms of the list has increased (by at least $2$).

Since the sum of the terms of the list can be at most $n P$, the process must terminate (with probability $1$, say).

In the final state, we will have that if $a \le b$ are two terms in the list, then $a \mid b$. That is, once the list is reordered in non-decreasing order as $$ a_1 \le a_2 \le \dots \le a_n, $$ we will have that $a_i$ divides $a_{i+1}$ for each $i$.