3
$\begingroup$

Given $xy=C$ where $x, y$ are integer variables and $C$ is integer constant.

What is the most efficient algorithm that finds $x,y$ such that $x+y$ is minimum?

Providing references is highly appreciated.

Edit: Input integers are reasonably encoded.

  • 2
    Isn't this just a constrained optimization problem, restricted to integer solutions? Of course, one first needs to figure out what integers x and y multiply to C, which is the same as factoring C...2010-11-09
  • 0
    @Aaron, yes, factorization is a special case. I'm interested in references to geometric approaches.2010-11-09
  • 2
    This is just the question of finding the factors of $C$ nearest the square root of $C$. In general factorizing an is hard. One special case where a "geometric" approach might be useful is when $C$ factors into a lot of small primes which you know. Then the problem reduces to finding integer values of $a_i$ in certain ranges making $\sum_i a_i\log p_i$ as close as possible to $(1/2)\log C$. This is finding which of a bunch of points is closest to a hyperplane. Americo, that's the maximum! Look at say $C=100$. Then $1+100 > 10+10$.2010-11-09
  • 0
    Robin Chapman: That's right! My big mistake.2010-11-09
  • 0
    ... as you wrote above "That is just the question of finding the factors of $C$ nearest the square root of $C$."2010-11-09
  • 0
    @Robin, Could you please convert you comments into an answer?2010-11-10

0 Answers 0