Slight notation changes in max_extra_noise code to match notation in paper.