Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: maximizing value from a set of objects

by BrowserUk (Patriarch)
on Nov 05, 2015 at 20:36 UTC ( [id://1147039]=note: print w/replies, xml ) Need Help??


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

  1. From the OP:

    (JFYI, I'm actually trying to write a salary cap script but I thought I'd give a simpler example).

    I don't think its unreasonable to consider the possibility that the OPs real problem could have substantially more items to be considered.

  2. Highest value?

    And you've never seen a case of a sloppy description here.

  3. Can we buy more than one? Legitimate question. A quick analysis of the data ...

    Is meaningless given the quote in 1. above. Please read my final paragraph.

Or maybe I am just lacking in imagination.

Or maybe you just didn't real the full question.


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.
  • Comment on Re^3: maximizing value from a set of objects

Replies are listed 'Best First'.
Re^4: maximizing value from a set of objects
by GotToBTru (Prior) on Nov 05, 2015 at 20:57 UTC

    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
      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1147039]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found