Number of Ways to Assign Edge Weights I
A tree is rooted at node 1. Take the path from the root to any deepest node and count the ways to give each of its edges weight 1 or 2 so the total is odd, modulo 1,000,000,007.
A tree is rooted at node 1. Take the path from the root to any deepest node and count the ways to give each of its edges weight 1 or 2 so the total is odd, modulo 1,000,000,007.