  We consider the minimum distance projection in the $L_2$-norm from an
arbitrary point in an $n$-dimensional, Euclidian space onto the canonical
simplex. It is shown that this problem reduces to a univariate problem that can
be solved by a simple algorithm. This optimization problem occurs in the
setting of credit risk, where one has stochastic matrices that describe
transition probabilities between different credit ratings, and one wants to
determine the roots of these matrices, or close approximations to them.
