linear equivalence algorithm pre-alfa