How to calculate the ways to paint a tree's nodes with m colors so that the ends of each edge have different colors?
Any polynomial solution is welcome.
Use only white latex paint, preferably interior grades. While exterior latex may be used, it may present a greater chance of tree damage. Oil base paints should never be used, as they are toxic to the trunk. 3.
You have m choices for the root. If you paint going down from the root, you have m-1 choices for each additional node. If the number of nodes is n, then the number of ways to paint the tree is m * (m-1)^(n-1).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With