I have this problem:

"Find all possible combinations, to form $12000 With $10000 $5000 and $1000"

I read a posibble solutions is:

Find all natural solutions to: 10a + 5b + c = 12

Further, already solved this, only testing the combinatios.

But how i can do with more combinations? Imagine the combinations were 50 or more, it would be a waste of time.

so, the best method is find the natural solutions? and how to do that?

  • $\begingroup$ There's a good question somewhere here, but it's awfully hard to understand. I suppose you're really asking, what is a general solution for this type of problem, so you could easily solve (for example) "How many ways are there to form $350 using pennies, nickels, dimes, quarters, dollar bills, fives, tens, twenties, fifties and hundreds?" $\endgroup$ – Wildcard Oct 19 '17 at 0:09
  • $\begingroup$ Yes, those currencies are from my country, but any currency would apply. $\endgroup$ – Eduardo Sebastian Oct 19 '17 at 0:53
  • $\begingroup$ Problems of this type are solved with generating functions. $\endgroup$ – N. F. Taussig Oct 19 '17 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.