This pattern appears whenever you have constraints like "cannot pick adjacent nodes" or "cannot select parent and child." The core idea: track both possibilities (include and exclude) for each node. Combine child values based on the constraint. You will see this in maximum independent set, vertex cover, tree matching, and many other tree improvement problems.
The structure is always the same: two states, different transitions.