I'm looking to understand how this problem shows optimal substructure:
Problem: Given any binary tree with only positive integers as nodes, how can you find a disjoint subset (made from nodes that have no edges between them) to achieve the biggest possible product.
So far, I've determined that since the nodes can only be positive, the largest product would either be a result of multiplying as many nodes together as possible, selecting nodes with the higher values to multiply, or some sort of combination between the two. If I were to go about the first solution, I can start from the lowest level and take the nodes from every other level. However, this doesn't show optimal substructure. Any pointers would be appreciated!