John joined a meetup where organize day long fishing trip once a month. The organizers are vary poor at planning, so will organize fishing on a random day of the month without any advance notice. Sadly, John needs to inform his boss in order to get time off from work at least a day in advance. With this situation, John is forced to schedule vacation days and hopping that the fishing will take place on them. At the same time, he can be strategic about it. For instance, he can wait until the end of the month at which point the fishing would have already happened or will guarantee to occur the next day. John can use a total of v day of vacation for the next m months. What is the greatest expected number of fishing meetup that he can arrange to attend? For simplification, we can assume that a month is only 30 days longs.
It can be approached as: Defining the sub-problems as Maximum Expected Fishing Days MEFD: for every situation MEFD(m,d,v), where m is the number of months left including the current month, d is the numbers of days left in the current one, and v is the number of vacation days john left with the assumption that the fishing has not took place in the current month.
Base case: for any (m,d,v) such that i, j or l equals to 0, MEFD(m,d,v) =0
Recurrence Relation: MEFD(m,d,v) = max(MEFD$_{1}$(m,d,v), MEFD$_{2}$(m,d,v))
MEFD$_{1}$(m,d,v)=$\frac{1}{d}$(1+MEFD(m-1,30,v-1))+ $\frac{d-1}{d}$MEFD(m-1,d-1,v),
MEFD$_{2}$(m,d,v)=$\frac{1}{d}$(1+MEFD(m,30,v-1))+ $\frac{d-1}{d}$MEFD(m,d-1,v).
What does $\frac{1}{d}$ or $\frac{d-1}{d}$ means? Why do we need to multiply them ? Let's MEFD$_{1}$ means that the Maximum Expected Fishing Day that John takes a vacation day off in the next day. then it would fall into two cases: 1, fishing meetup take place, 2, it didn't take place. As we can tell from MEFD$_{1}$, 1 + ing means fishing meetup take place, then we - 1 from the months left and - 1 from vacations left.
What do we also need to -1 from months and vacations of the second part of the equation, + $\frac{d-1}{d}$MEFD(m-1,d-1,v)?
Or am i am reading this recurrence relation completely wrong? any points are really appreciated.