On prescribing the convergence behavior of the conjugate gradient algorithm