  We consider the problem of computing the nearest matrix polynomial with a
non-trivial Smith Normal Form. We show that computing the Smith form of a
matrix polynomial is amenable to numeric computation as an optimization
problem. Furthermore, we describe an effective optimization technique to find a
nearby matrix polynomial with a non-trivial Smith form. The results are then
generalized to include the computation of a matrix polynomial having a maximum
specified number of ones in the Smith Form (i.e., with a maximum specified
McCoy rank). We discuss the geometry and existence of solutions and how our
results can be used for an error analysis. We develop an optimization-based
approach and demonstrate an iterative numerical method for computing a nearby
matrix polynomial with the desired spectral properties. We also describe an
implementation of our algorithms and demonstrate the robustness with examples
in Maple.
