I have accounts with positive and negative balance and interdependence between some. The pledge gives accounts with a negative balance the right to withdraw money from the pledge account to cover their losses.
I want to find the optimal procedure for invoking this right to receive money.
1 2 3 A 1000 | -1000 -500 -500 B 1000 | -1000
In this example, account A and B have a positive balance of 1000, and accounts 1,2,3 are covered by priority (1> 2> 3). I want to cover as many accounts as possible, distributing money A and B to 1,2,3, observing priority.
In this particular example, choosing A1 as my first pair will only result in coverage of 1000, but if I choose B1, A2, A3, I will have the optimal coverage solution of 2000.
What is the name of this optimization problem and what are the algorithms for solving it?
source share