in reply to Numeric limits in perl

Your problem seems to be NP-Complete. If you are trying to find the best set by enumerating every possible one it would be exactly the Traveller salesman problem. To this set of problems there isn't a reasonable(polinomial) solution in this nowadays machines. The best solution is try to find good heuristic to search for suboptimal solutions. Perhaps you can think in another way to achieve the results.

Replies are listed 'Best First'.
Re: Numeric limits in perl
by Abigail-II (Bishop) on Mar 26, 2003 at 15:22 UTC
    The tell-tale sign for NP, but not P problems is that they need a lot of running time, but not a lot of memory (for some value of "a lot"). NP problems, including the NP-complete problems are still solvable in polynomial space. That is, they are in P-SPACE.

    So, I'm very curious what makes you think hardly defined problem seems to be NP-Complete.

    Abigail