Minimum Edge Toggles on a Tree
Each toggle flips both endpoints of an edge. Working from the leaves up, an edge is used exactly when the node below it still differs from its target.
Each toggle flips both endpoints of an edge. Working from the leaves up, an edge is used exactly when the node below it still differs from its target.