### Find minimal weight of a tree

I am trying to find an algorithm, which can find the minimal total weight of a given tree. I am given a tree and a weight of all nodes (each node can have a different weight). For example in this graph, where each node has weight 1: tree with weights Then I am given a…