What's this business of a horizontal or vertical line dividing the area, by the way? That's just confusing the issue. Can I solve the problem for you by saying "put that line one millimetre from the edge and then solve the knapsack thing with your MaxX x MaxY area one millimetre smaller than before?"
The practical side of this knapsack business, by the way, is that you can spend enormous amounts of time finding better and better solutions, but they'll only be slightly better. If you find a solution that's about 80% better than random, then stop looking and go with it. People who really understand math, please correct me if I'm wrong, but there's no point continuing trying to find a slightly-more-perfect solution, unless you're chopping up solid gold, I guess.
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print
In reply to Re: (3) Knapsack problem
by Cody Pendant
in thread Knapsack problem
by stu96art
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |