Interference versus success probability in quantum algorithms with imperfections