A Collapsing Method for Efficient Recovery of Optimal Edges