-5

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.

Bill Dubuque
  • 282,220
JoseA132
  • 522
  • 6
    Hint: at each step $\min A$ decreases or stays the same, and $\max A$ increases or stays the same. At some point $\min A$ will be the $\gcd$ of all integers in $A$, and $\max A$ will be their $\operatorname{lcm}$. – dxiv Jan 07 '17 at 04:36
  • 1
    @dxiv: that is a great hint and I think it should be an answer – Ross Millikan Jan 07 '17 at 04:44
  • I know that, at some point the list would have just 2 different numbers, the gcd and the lcm of all numbers in the initial list. But I don't know how prove that. – JoseA132 Jan 07 '17 at 05:00
  • @JoseA132: If you know that, you should say it so people can know what sort of answer is useful. How do you know it? That is also helpful – Ross Millikan Jan 07 '17 at 05:06
  • 2
    Its not necessary that the list will have only two different numbers. There can be many different number but for each $a_i<a_j$, $a_i|a_j$ i.e. $a_i$ divides $a_j$. – 8hantanu Jan 07 '17 at 05:08
  • 1
    @RossMillikan Thanks, but it was just that, a hint. There is enough work left to do proving that the stationary point is where ${a,b}={\gcd(a,b),\operatorname{lcm}(a,b)}$ for $\forall a,b \in A$ that my hint doesn't qualify as an answer. – dxiv Jan 07 '17 at 07:21
  • $\DeclareMathOperator{\lcm}{lcm}$Note that at each stage the product $P$ of all the numbers stays the same, as $a b = \gcd(a, b) \lcm(a, b)$. The sum of the numbers stays the same if the chosen pair is $a, b$ with $a \le b$, say, and $a \mid b$, so that $a = \gcd(a, b)$ and $b = \lcm(a, b)$. The sum increases if $a \le b$, say, and $a \nmid b$, as then $\lcm(a, b) \ge 2 b \ge a + b$. Now the sum cannot exceed $n P$, therefore the process must stop (with probability $1$). – Andreas Caranti Jan 07 '17 at 11:35
  • Just to clarify, the last inequality is $\operatorname{lcm}(a, b) \ge 2 b > a + b$. – Andreas Caranti Jan 07 '17 at 12:09
  • This also shows that in the final, stationary state, you have a sequence that can be reordered to $a_1, \dots, a_n$, such that $a_i$ divides $a_{i+1}$ for each $I. $ – Andreas Caranti Jan 07 '17 at 12:32

1 Answers1

1

$\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$.