variable contraction and null edge elimination