Debug congruence algorithm