In a single channel communication system the deamplification and loss present on them can be simplistically taken as attenuation by a percentage g, then amplifiers restore the signal power level to the same value at transmission setup by operating at a gain of 1/ (1 − g). E.g. if we experience 6 dB attenuation in transmission, i.e. 75% loss, then we have to amplify the signal by a factor of 4x to restore the signal to the transmitter levels.
Same ideas can be carried out in presence impairments and a multiple channel system. Amplifier nonlinearity, crosstalk and power budgets prevent the use of these waterfilling algorithms to restore all channels, and only a subset can benefit from them.