GPU clusters: capacity left per day and the best K-switch plan
You run a few GPU clusters with fixed daily capacities, for example [10, 20]. Each day a list of usage records takes GPUs from clusters (a record names the day, the cluster and how many GPUs), and every cluster is back to full capacity the next morning.
- Return, for each day, how many GPUs are left in every cluster (a list of lists, one row per day).
- A new workload may sit on any cluster each day and switch freely between days. What is the most GPU-days it can collect?
- Now it may switch clusters at most K times over the whole period. What is the most it can collect? Give the recurrence, then the time and space of your solution.
Parts 1 and 2 are warm-ups; most of the time belongs to part 3.
No answer yet. Write the first one; the best answer gets endorsed.
