Alternate minimization algorithms for scaling problems, and their analysis