Corrected algorithms from list 2.