My own accounting python euler problem

Jack Diederich jackdied at gmail.com
Sat Nov 7 22:45:15 CET 2009


On Sat, Nov 7, 2009 at 4:39 PM, vsoler <vicente.soler at gmail.com> wrote:
> In the accounting department I am working for we are from time to time
> confronted to the following problem:
[snip]
> For example, say that the customer has the following outstanding
> invoices:  $300, $200, $50; and say that the check is for $250. This
> time it is clear, the customer is paying bills $200 and $50.
[big snip]

http://en.wikipedia.org/wiki/Knapsack_problem

Unless your customers are giant defense contractors you should be able
to brute force a solution.  If they are so big that it doesn't take
micro seconds to brute force a solution then you probably have more
problems than just matching checks to invoices...

-Jack



More information about the Python-list mailing list