find the maximum possible product of two positive integers whose digits form a permutation of $\{1,\cdots, 8\}$

274 Views Asked by At

What is the maximum possible value of a product of two numbers that use the digits $1,\cdots, 8$ exactly once and no other digits?

I know how to obtain the minimum possible product. Similar to above, we must have that both numbers have digits in ascending order. Let $10b + c$ and $a$ be the two numbers, where $c$ is a digit. Then if $10b+c < a, $ since $(10b+c)a > (10a+c)b,$ moving the last digit from the smaller number results in a smaller number. Hence the smallest product is obtained when one number has one digit, which implies the other has 7 (otherwise we could decrease the product with the above method).

First note that for the largest possible product, the two numbers must have their digits in descending order. We have 256 * 2519 > 2569 * 251, so it is not generally true that removing the last digit from the larger factor and appending it to the smaller one yields a larger product. Or if we want to satisfy the conditions of the problem we also have the example 253 * 1468 > 2538 * 146.

For simplicity, consider the case where the two numbers have four digits. Then one number must have 8 as the first digit. The other number can't have 5 as the first digit (the largest digit) as then the maximum product would be $8761\cdot 5432 < 8321 \cdot 7654 = 63688934.$ So the second number must have $6$ or $7$ as the first digit. Then note that $\overline{87pq} \cdot \overline{6mcd} < \overline{8mrs}\cdot \overline{67pq} < \overline{8mrs}\cdot \overline{76pq},$ where the variables are digits. For instance, $\overline{87pq} \cdot \overline{6mcd} - \overline{8mrs}\cdot \overline{67pq} =(8700+10p+q)(6000+100m+10c+d)-(8000+100m+10r+s)(6700+10p+q),$ and a tedious calculation yields the desired inequality.

1

There are 1 best solutions below

1
On

One number, we'll call it $A,$ must start with the $8.$ Call the other $B.$

Now, if the $100$s digit of $A$ is greater than the $100$s digit of $B,$ we can swap them and get a bigger product. This is because swapping them does not change the sum of the two numbers, and we increase the product if the two numbers are closer together, if their sums remain the same. [*]

This means the $7$ digit must be the first digit of $B,$ because if it is in $A,$ then the digit can be swapped, and then we can increase the product by moving $7$ to the front of $B.$

The same is true for the $10$s digit and the $1$s digits.

We thus get the last digit of $A$ must be $1.$

Likewise, $6$ must be the second digit of $B.$

So we have numbers $A=8000+100a+10b+1, B=7600+c+d.$ And we know that $b<c.$ Leading to the options:

$$(a,b)=(5,3),(5,2),(4,3),(4,2).$$

That gives you four values to check. You might be able to narrow it down further - my guess is the answer is $8531\cdot 7642.$


[*] The key is that for any $S,$ the function $x(S-x)$ increases when $0\leq x\leq S/2$ and decreases after that.