I\'m looking for an algorithm to solve the follwoing problem (I will explain it with an example):
Let say I have 10.000 $ available amount and following costs I can
Your problem is a NP problem; there is no known solution to this problem that will guarantee to find an optimal solution within an acceptable time frame. The only way to really find an optimal solution would be to try all possible solutions and then check which one is optimal. If you have thousands of costs, though, this would be awfully slow, of course.
All other solutions that are faster than the naive approach mentioned above, are not guaranteed to find an optimal solution. They may find a good solution, yet you can never say for sure if a better solution was possible or not.
It is the same problem as the following: You have a truck that can transport X pounds of goods and you have goods of different weights. Your goal is to make optimal use of the available capacity. This one is also known as the "knapsack problem". There are no better solutions known other than those listed on this page. None of them can guarantee an optimal result, though.