MatchEdges function

Match nodes and edges between trees