Therefore, the process of forming a matching by finding and removing pairs " vw " that are maximally far from " u " may be performed by a single postorder traversal of a breadth first search tree of the graph, rooted at " u ", in linear time . provide an alternative linear-time algorithm based on depth-first search, as well as efficient parallel algorithms for the same problem.