I have a problem which I've reduced down to the following requirements:
- undirected graph $G$ that may contain cycles, with positive weighted nodes and edges of length $1$,
- a subset of nodes $M$,
- a length $L$,
return the path of maximum weight (calculated by summing up the weights of its nodes) that contains all nodes in $M$ and is exactly length $L$.
(A more complex requirement that I'm omitting is that including certain nodes in the path may increase the values of other nodes.)
I'm just looking for a nod in the right direction - are there any algorithms or terms that might be relevant to this situation?