  We introduce the greatest common divisor version of the ultradiscrete Toda
lattice and show that the dependent variables converge to invariant factors of
a certain bidiagonal matrix. Using this fact, we present an algorithm for
computing the Smith normal form of a given bidiagonal matrix.
