minimum connected subgraph containing a given set of nodes

后端 未结 4 2141
悲哀的现实
悲哀的现实 2020-12-29 05:11

I have an unweighted, connected graph. I want to find a connected subgraph that definitely includes a certain set of nodes, and as few extras as possible. How could this b

4条回答
  •  余生分开走
    2020-12-29 06:02

    This is exactly the well-known NP-hard Steiner Tree problem. Without more details on what your instances look like, it's hard to give advice on an appropriate algorithm.

提交回复
热议问题