Search code examples
algorithmmathmathematical-optimizationnumerical-methodsnumerical-analysis

Algorithm for multidimensional optimization / root-finding / something


I have five values, A, B, C, D and E.

Given the constraint A + B + C + D + E = 1, and five functions F(A), F(B), F(C), F(D), F(E), I need to solve for A through E such that F(A) = F(B) = F(C) = F(D) = F(E).

What's the best algorithm/approach to use for this? I don't care if I have to write it myself, I would just like to know where to look.

EDIT: These are nonlinear functions. Beyond that, they can't be characterized. Some of them may eventually be interpolated from a table of data.


Solution

  • There is no general answer to this question. A solver finding the solution to any equation does not exist. As Lance Roberts already says, you have to know more about the functions. Just a few examples

    • If the functions are twice differentiable, and you can compute the first derivative, you might try a variant of Newton-Raphson
    • Have a look at the Lagrange Multiplier Method for implementing the constraint.
    • If the function F is continuous (which it probably is, if it is an interpolant), you could also try the Bisection Method, which is a lot like binary search.

    Before you can solve the problem, you really need to know more about the function you're studying.