Take this node weighted graph for example :
- The maximum subgraph containing exactly 1 node (and the 'entry point') would be 14.
- The maximum subgraph containing exactly 2 nodes (and the 'entry point') would be 14 / 9.
- The maximum subgraph containing exactly 3 nodes (and the 'entry point') would be 3 / 19 / 15.
- The maximum subgraph containing exactly 4 nodes (and the 'entry point') would be 14 / 1 / 7 / 240.
I can't manage to think of a better method than a bruteforce to get the maximum subgraph.
And if there is no known efficient algorithm, would a genetic algorithm be find in that case (the crossovers seem tricky) ?