Say that there are $n$ days and there is $x_1, x_2, ...,x_n$ amount of data to process on each day. Your computer can process $s_1$ amount of work on the first day since rebooting your computer, $s_2$ work on the second day since a reboot, up to $s_n$. On each consecutive the day the amount of work your computer can perform without being rebooted decreases. In other words, $s_1 >s_2>...>s_n>0$. Any day you reboot your system you cannot do any work.
The problem is to find an algorithm using dynamic programming to figure out the maximum amount of work possible given $x_1...x_n$ and $s_1...s_n$. This means we must determine which day(s), if any, we should reboot on.
For example:
n| 1 | 2 | 3 | 4
x| 8 | 3 | 11| 5
s| 9 | 4 | 2 | 1
The most optimal solution here would be to reboot on day 2, so that we can perform 8 work on day 1, 9 work on day 3, and 4 work on day 4 for a total of 21.
This seems somewhat similar to the partition problem but I am having trouble coming up with a recurrence relation I can convert to dynamic programming.
If we say that our final reboot occurs on day $i$, then our maximum work should be the amount of work done from days $i$ to $n$ plus the maximum work we can do on days $1$ to $i-1$.
So if we say $M[x_1...x_m,s_1...s_n]$ represents the maximum amount of work we can do on days $1$ to $m$, I write the following recurrence relationship:
$$M[x_1...x_m,s_1...s_n] = \max_{i=1}^m\{M[x_1...x_{i-1},s_1...s_n]+R[i]\}$$
Where $R[i]$ is simply the max amount of work you can do from days $i$ to $n$ without rebooting, which is simple to calculate.
Does this seem like it is a valid recurrence relation? Also, I am not quite sure what my base cases would be. Perhaps that $M[x,s] = \{x$ if $s \geq x$ else $s\}$? I am not sure if this covers all possibilities though.