Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Average Price Algorithm

by camelcom (Sexton)
on Jan 28, 2009 at 09:13 UTC ( [id://739464]=note: print w/replies, xml ) Need Help??


in reply to Re: Average Price Algorithm
in thread Average Price Algorithm

I stopped doing homework many years ago :)

This kind of problem doesn't have any rules. There will be an optimum solution for each scenario. The trick is being able to search the possible result space in a reasonable timeframe.

The problem I'm having is in generating all the possible combinations, because the optimum solution for each person may involve some fragments from all price levels or fragments from just a few price levels.

I'm thinking that a recursive approach might work, but this algorithm is a bit trickier to devise than factorial, etc.!

Replies are listed 'Best First'.
Re^3: Average Price Algorithm
by GrandFather (Saint) on Jan 28, 2009 at 10:05 UTC

    Do you require the optimum solution? Is this a real world problem (if so, what are the real world constraints)? What constitutes a "reasonable time frame"? Is the number and size of commodity packets representative and is the number of distribution packets representative?


    Perl's payment curve coincides with its learning curve.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-29 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found