Common aggregation operations:
1. Sum: dp[v] = Σ_c in children(v) dp[c]
2. Max: dp[v] = max_c in children(v) dp[c]
3. Count: dp[v] = |\{c : dp[c] > 0\}|
Pick the operation that matches your problem. Subtree size uses sum. Maximum path uses max. The aggregation function determines how you combine child answers into the parent answer.