in reply to Re^3: maximizing value from a set of objects
in thread maximizing value from a set of objects

If you're going to answer the question he should have asked instead of the one he did, you are of course free to include whatever complications your experience and imagination deem appropriate. And probably rightly so. As I said, I fault my own lack of imagination.

Dum Spiro Spero
  • Comment on Re^4: maximizing value from a set of objects

Replies are listed 'Best First'.
Re^5: maximizing value from a set of objects
by BrowserUk (Patriarch) on Nov 05, 2015 at 21:10 UTC
    If you're going to answer the question he should have asked instead of the one he did,

    The code I supplied answered the exact problem as asked.

    The reason the answer isn't your solution of "(E C B adds up nicely to 25)", is because that sums to a value of only $53; when there are other solutions that sum to higher values.

    The problem is not a "lack of imagination"; but ...


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.

      It did answer it. And more. Much more. More than I would have ever imagined needed to be answered.

      ECB is my example of an obvious but wrong solution. The cost is exactly 25 .. but the value is not optimal. It's the sort of data you want to test if solutions take all factors into consideration.

      Dum Spiro Spero