Maximize :: $A = B \times C$

Solution 1:

If you have a cord and you want to encircle the biggest area possible with it, I'm sure you're well-aware of the fact that making a circle is the way to go to optimize that space. However, if we are under the same constraints as here, it has to be a rectangle, in which case the most optimal solution would be a square.

It doesn't take long to convince yourself that $n*n$ always will be bigger than $(n-1)*(n+1)$.

Therefore, the most optimal solution would be having the two numbers be as close to each other as possible.

This is done by repeatedly taking the biggest digit and assigning it as a suffix to the smallest of your 2 new numbers $B$ and $C$.

E.g.: $\{0, 0\} \rightarrow \{9, 8\} \rightarrow \{9, 87\} \rightarrow \{96, 87\} \rightarrow \{96, 875\} \rightarrow \space ... \space\rightarrow \{9642, 87531\} $

Solution 2:

By brute force (Mathematica): 843,973,902 = 87,531 • 9,642.

Probably not the most elegant way to do it, but here's my code:

In[21]:= Sort[
 Table[Sort[
    Module[{a = FromDigits[#[[1 ;; 9 - d]]], 
        b = FromDigits[#[[10 - d ;; 9]]]}, {a b, {a, b}}] & /@ 
     Permutations[{1, 2, 3, 4, 5, 6, 7, 8, 
       9}], #1[[1]] > #2[[1]] &][[1]], {d, 1, 4}], #1[[1]] > #2[[1]] &]

Out[21]= {{843973902, {87531, 9642}}, {843809444, {875321, 
   964}}, {840414816, {8754321, 96}}, {788888889, {87654321, 9}}}