Clean transition implementation based on LCA algorithm