max product of 5 distinct-digit numbers I ran into the following problem my computer solved, but I can't seem
to rigorously prove it is correct:
What two 5 distinct digit numbers give the maximal product?
I know the solution is 96420 * 87531, but how can I prove it is indeed maximal?
 A: Greedy theorem, assign the highest power of $10$ to Your highest digits.
$9$ and $8$ are going to be the first digit
$7$ and $6$ are going to be the second digit
.
.
.
$1$ and $0$ are going to be the fifth digit.
Now, notice that no matter how You arrange the digits between the two numbers, their sum is always the same.
Product of two numbers with constant sum is maximized if their difference is minimized.
The difference is minimized if the numbers are $96420$ and $87531$.
A: To get trivialities out of the way:


*

*Both five digit-numbers have descending order

*$9$ and $8$ are the only valid choices for the first digits of the first and second number, because $9 \cdot 8 \geq n \cdot m$ for any $n, m \in 1 \ldots 9, n\neq m$.


Now again, we can fairly easily deduce that $7$ and $6$ are the second digits, as $97\cdot 86$ and $96 \cdot 87$ are larger than what any other choice for second digits yields. The question is whether we should pick $(97 \ldots, 86 \ldots)$ or $(96 \ldots, 87 \ldots)$. It is the latter, as $96 \cdot 87 > 97 \cdot 86$. 
Continue onwards ($964 \cdot 875 > 965 \cdot 874$ and so forth) to deduce the entire five-digit numbers.
