0

A bank has an ATM machine. For a particular week, the usage of cash in millions as below.

  • 5- Monday
  • 4- Tuesday
  • 1- Wednesday
  • 15- Thursday
  • 6- Friday
  • 2- Saturday
  • 4- Sunday

The bank hires a depositing company to deposit money in 5, 3, or 1 rounds per week.

The depositing company provides following packages to the bank when charging for depositing money,

  • Cost for depositing in 4 rounds per month- 21135

  • Cost for depositing in 12 rounds per month- 32000

  • Cost for depositing in 20 rounds per month- 41975

Ordering remains as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. This order shouldn’t be violated when categorizing values.

Example

  • 5 rounds

[(5+4),1, 15, 6, (2+4)]

[(5+4), 1, (15+6)=20+1, 2, 4]

can have many other combinations which don't break order.

  • 3 rounds

[(5+4+1), 15, (6+2+4)]

[(5+4), (1+15), (6+2+4)]

can have many other combinations which don't break order.

  • 1 round

[(5+4+1+15+6+2+4)]

Also the bank has to bear a holding cost of 0.019% of the remaining amount at the end of the day.

Example

Consider 1st week usage of cash as follows.( in millions)

Mon- 13

Tue- 5

Wed- 4

Thu- 4

Fri- 2

Sat- 11

Sun- 1

5 - rounds

1st week Cash depositing order - 13, (5+4), 4, (2+11), 1

Assuming depositing is done in 5 rounds for all 4 weeks of the month, (5*4 = 20)

Total depositing cost = 41975

1- 13 deposited, 13 withdrawn, 0 remaining, 0 holding cost

2- (5+4) deposited, 5 withdrawn, 4 remaining, 4*0.00019 holding cost

3- 0 deposited, 4 withdrawn, 0 remaining, 0 holding cost

4- 4 deposited, 4 withdrawn, 0 remaining, 0 holding cost

5- (2+11) deposited, 2 withdrawn, 11 remaining, 11*0.00019 holding cost

6- 0 deposited, 11 withdrawn, 0 remaining, 0 holding cost

7- 1 deposited, 1 withdrawn, 0 remaining, 0 holding cost

Total holding cost for 1st week = 4*0.00019 + 11*0.00019 = 0.00285 millions= 2850

Likewise I need to find the total holding cost for the month considering each particular week.

3- rounds

Cash depositing order for 1st week - 13, (5+4+4), (2+11+1)=(1+1+12)

Edit- Assuming 12 rounds per month package is choosen, therefore 3 rounds per week( 3*4 =12)

Total depositing cost = 32000

1 - 13 deposited, 13 withdrawn, 0 remaining, 0 holding cost

2- (5+4+4) deposited, 5 withdrawn, (4+4) remaining, (4+4)*0.00019 holding cost

3- 0 deposited, 4 withdrawn, 4 remaining, 4*0.00019 holding cost

4- 0 deposited, 4 withdrawn, 0 remaining, 0 holding cost

5- (2+11+1) deposited, 2 withdrawn, (11+1) remaining, (11+1)*0.00019 holding cost

6- 0 deposited, 11 withdrawn, 1 remaining, 1*0.00019 holding cost

7- 0 deposited, 1 withdrawn, 0 remaining, 0 holding cost

Total holding cost for 1st week = (4+4)*0.00019 + 4*0.00019 + (11+1)*0.00019 + 1*0.00019 = 0.00475 millions = 4750

Likewise I need to find the total holding cost for the month considering each week.

Edit - suppose the 41975 package is picked. Then it means cash deposited in 20 rounds per month. That means 5 rounds per week. If the 32000 package is picked, then 12 rounds per month. That means 3 rounds per week. If the 21135 package is picked, then it means for 4 rounds per month, that means 1 round per week. There are no mixed combinations of 5,3,1 for the four weeks of a particular month. Only all four weeks are done in 1, 3 or 5 rounds. We have to select the best package considering holding cost and package cost.

A good combination of 5 rounds which doesn't violate order, can be better than all the 3 rounds solutions and the 1 round solution. Same applies for 3 rounds solution aswell. Or else 1 round solution can be better than all 5 rounds and 3 rounds solutions.

When depositing rounds increase, holding cost reduces but depositing cost increases. When rounds decrease, depositing cost reduces but holding cost increases. So I need to find the order of depositing money for each week of the month and the monthly depositing package which can make a good tradeoff between total holding cost and total depositing cost, consuming the least time.

Any insight to the approach will be really helpful.

HMD
  • 9
  • 6

1 Answers1

0

In your case you have a fixed monthly cost (FMC) and a variable monthly cost (VMC) for each choice of package. FMC is in {x, x+10000, x+20000}, while VMC is the sum of the variable weekly costs VWC for the 4 weeks. VWC is determined by the partition of the interval of the set of days D = (M,T,W,T,F,S,S) into k disjoint sub-intervals, with k in {1,3,5}.

Therefore you have to choose min{FMC1+VMC1*, FMC3+VMC3*, FMC5+VMC5*}, where VMCk* denotes the minimum variable monthly cost for partitioning D into k intervals (Note that for the case of k=1 the answer is trivial since there exists a single partition for each week). Since the variable weekly cost is VWC= 0.7*(r1+r2+r3+r4+r5+r6+r7), ri being the remaining amount of day i, it all boils down to minimizing the remaining quantity of each week. In calculating the VMCk* you can use DP-algorithm described in this paper, with the objective of minimizing the remaining amount of each week.

So in high level:

  1. Obtain the minimum variable weekly cost -> minimum remaining amount of each week using DP, for each package of deposits {1,3,5}. And then the variable monthly cost as the sum of the 4 weeks.
  2. Choose the minimum total cost from considering the fixed cost of each package and the variable one obtained at 1.
ichantz
  • 298
  • 3
  • 11
  • ichantz thank you very much. Can you please check the new edits that I have mentioned in the problem under "Edit". Also I added the actual values for packages. So {x, x+10000, x+20000} is changed to {21135, 32000, 41975}. And the holding cost percentage is changed to 0.00019. It was because 7% was for annual holding cost. I had to divide it by 365 to get the percentage per day. So VWC = 0.00019*(r1+r2+r3+r4+r5+r6+r7) – HMD Jul 13 '18 at 05:15
  • can I solve this using Mixed Integer Programming and is there a way to use some kind of heuristics, so that I don't need to try each combination which saves the computation time – HMD Jul 13 '18 at 05:28
  • The solution I propose is based on branch and bound, and at each branch you use DP to calculate the optimal. Greedy algs might give you a good approximation, but not the optimal. Notice that you do not try every possible combination, you have a total ordering imposed by the days of the week, so you restrict to interval combinations, i.e. you cannot have a single deposit for the days (M,W,F). Also in bottom up DP you store the optimal values (remainings) for the previous days in an array and you do not have to recalculate them. – ichantz Jul 13 '18 at 07:53
  • In DP to find the optimal solution, you have to find optimal solutions for each part. In order to find the optimal for the whole week, you have to build on optimal solutions for the previous days. Think that when you have the optimal remainder up to day j, the optimal for day j+1 is the minimum of either a) not making a new deposit (while satisfying the demand constraint), or b) choosing the deposit which minimizes the remaining amount held. In case of b) you have to choose the length of the deposit (how many days to cover) while respecting the number of weekly deposits of each package. – ichantz Jul 13 '18 at 07:58
  • Thank you very much. I'm trying to understand it. Is the method you suggested faster than implementing a genetic algorithm (crossover probability of chromosomes) – HMD Jul 13 '18 at 09:08
  • I think that the algorithm in the paper ultimately chooses to partition the 7 data points into 7 categories because it always returns the maximum fitness value solution. Fitness value is maximized when cash is deposited and withdrawn one by one. `opt(0) =0` `opt(1)=max{(0+end(1,1))}=end(1,1)` `opt(2)=max{(opt(0)+end(1,2)),(opt(1)+end(2,2))}= opt(1)+end(2,2)` `opt(3)=max{(opt(0)+end(1,3)), (opt(1)+end(2,3)), (opt(2)+end(3,3))}= opt(2)+end(3,3)` etc. How can I constrain to 5,3 or 1 – HMD Jul 13 '18 at 11:07
  • Even when the order is preserved, for each grouping of 7 into 3 and 7 into 5, there are 15 combinations. So totally 30 combinations for each week. Will I have to try them all? Isn't there a way to avoid obvious costly combinations? – HMD Jul 16 '18 at 08:45