An algorithm for computing the Hilbert–Samuel multiplicities and reductions of zero-dimensional ideals of Cohen–Macaulay local rings. (January 2020)