To defend our planet, we have constructed 30 deep space missile platforms, with a total supply of 400,000 missiles. The platforms are designed such that all of the missiles on a given platform must be launched simultaneously.
Enemy ships can be detected with plenty of time for each missile to select and lock onto a different target and destroy it. The missiles are perfectly accurate, and each missile will destroy its target with absolute certainty. Any missile without an assigned target will harmlessly self-destruct. Missiles are expensive, so we want to expend as few as possible.
When N1 attacking ships are detected, the number of missiles launched will be determined by the "greedy" algorithm. First the platform with the most missiles ≤N1 will be chosen. If N2 more missiles are needed, the platform with the most missiles ≤N2 will be chosen, and so forth. However, if this would not yield enough missiles, then the platform with the fewest missiles ≥N1 will be chosen instead.
We know that the enemy will send their ships in 1, 2 or 3 equal-sized waves. We need to be certain that the Earth will survive. We also want to waste as few missiles as possible. That is, the maximum number of missiles which self-destruct should be as low as possible.
How many missiles should be on each platform?