Introduction - If you have any usage issues, please Google them yourself
The water fill algorithm for power allocation, basic principle:
When the SNR is a constant, the system will reach to the maximum demand of the aggregate channel capacity.
When the SNR is very big, the transmission power will be allocated equally and the water fill will loss efficiency.
In the power allocation problem, the capacity will be the maximum value only with the water fill is fulfilled.