Split Factorial of n

416 Views Asked by At

How can I split integers up to n into two groups such that the difference of the product of each group is as low as possible? Is there a way to optimize the selection for each group in order to ensure a lower gap between them?

1

There are 1 best solutions below

1
On BEST ANSWER

Ross Millikan is right. Take logs of the numbers and look for a partition of the logs into two nearly sums. This problem is NP-hard. See the Wikipedia page for the partition problem.