I have an undirected grid graph, nxm, where each vertex has a value (positive or negative) and I need to find the tree rooted at vertex (1,1) that maximizes the sum of these values with a minimal number vertices.
The tree do not have to go through all nodes, although the tree can pick a negative vertex so it can pick a positive one.
Edges have no value.
I will appreciate any advice.