@yong.cao.7731 Yours was a great question. Here is how I understood this part.
Take the example
A-3, B-3,C-3,D-2 (counts for each task)
and n=2 (cooling period).
Now the arrangement for A,B,C is:
A B C A B C A B C
they can be tightly arranged with no gaps using the cooling period effectively to schedule other tasks.
What @beetlecamera is trying to explain is, n=2 is the minimum cooling period for two same tasks to execute. We can always insert more than 2 tasks also. So, then we could do this:
A B C D A B C D A B C
As you can see now, we have three tasks between two successive executions of A making the total slots needed equal to array size. (Instead of A B C A B C A B C D _ _ D which would need 13 slots).
I am also confused about the proof.
Why it's a better solution?
It only shows it is another valid solution.
If it shows that if we schedule A first, we could use smaller time to schedule all tasks, that makes sense. Otherwise it didn't.