有向无环图中的最大权连通子图
我正在研究一个涉及逻辑电路(可以表示为 DAG)的研究问题。 DAG 中的每个节点都有一个给定的权重,该权重可以为负数。我的目标是找到一个连通子图,使得节点权重之和最大。
给定边权重的最大权重连通子图问题显然是 NP 困难的,但我希望的是有向无环性质以及我处理节点权重而不是边权重的事实使问题变得更容易。有人能指出我如何开始解决这个问题的正确方向吗?
谢谢
I am working on a research problem involving logic circuits (which can be represented as DAGs). Each node in the DAG has a given weight, which can be negative. My objective is to find a connected subgraph such that the sum of the node weights is maximal.
The maximum weight connected subgraph problem given edge weights is NP-hard apparently, but what I am hoping is that the directed-acyclic nature and the fact that I am dealing with node weights rather than edge weights makes the problem somewhat easier. Can someone point me in the right direction of how to start attacking this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你提到的问题是NP-hard问题,请参阅:
“发现分子相互作用网络中的调节和信号传导电路”
作者:Trey Ideker、Owen Ozier、Benno Schwikowski 和 Andrew F. Siegel,
Bioinformatics,第 18 卷,第 233-240 页,2002 年
以及本文的补充信息:
http://prosecco.ucsd.edu/ISMB2002/nph.pdf
the problem you mentioned is NP-hard, see:
“Discovering regulatory and signaling circuits in molecular interaction networks”
by Trey Ideker, Owen Ozier, Benno Schwikowski, and Andrew F. Siegel,
Bioinformatics, Vol 18, p.233-240, 2002
and the supplementary information to this paper:
http://prosecco.ucsd.edu/ISMB2002/nph.pdf
第一种方法,为每条边分配起始节点权重的倒数,并应用最短路径算法,例如 贝尔曼-福特。 Dijkstra 算法不起作用,因为某些边缘可能为负。
第二种方法,从每个叶节点开始,向每条边添加“标签”,以跟踪所有涉及的节点的 ID 和总权重。无需标记节点,因为对于从叶子开始的每个链,保证每个节点仅被访问一次。例如,给定以下非循环有向图(从上到下有向),其中每个节点权重为 1:
A 和 B 之间的边将标记为 {{D,B,A},3},A 和 C 之间的边将具有两个标签 {{H,E,C,A},4} 和 {{H,F,C,A},4}。
经过此预处理后,找到每个根节点的最大权重路径。该信息位于其出站边缘的标签中。
First approach, Assign to each edge the inverse of the weight of the starting node, and apply a shortest path algorithm like Bellman-Ford. The Dijkstra's algorithm won't work as some edges can be negative.
Second approach, starting on each leaf node, add "tags" to each edge that keeps track of the ids of all the nodes involved, and the total weight. There is no need to mark the node, as each node is guaranteed to be visited only once for each chain starting on the leafs. For example, given the following Acyclic Directed graph (directed top to bottom) where each node weights 1:
The edge between A and B will be tagged {{D,B,A},3}, the edge between A and C will have two tags {{H,E,C,A},4} and {{H,F,C,A},4}.
After this pre-procesing, find the greatest weight path for each root node. The information is in the tags of their outbound edges.
您提到连接的连接子图应该是“最大”。为此,贪婪地选择一个顶点并使其增长,直到无法增长为止。这保证了最大化。但是,如果您的意思是“最大”,那么问题可能是 NP_Complete。另外让我提醒您,节点加权图比边加权图更通用。为前者构建的每个算法都适用于后者,但反之亦然。这很容易看出。自己尝试一下。
我对这个问题的理解是,我觉得它在 P 中。如果这是正确的,那么提示就是使用 DAG 的一些特殊属性(自从你研究以来你应该知道这一点,这似乎是一个讲义问题)。对于一般图,这可以简化为斯坦纳树,因此它是 NP-Cmplete(事实上也适用于平面图)。
You mentioned that connected that connected subgraph should be "maximal". For this greedily choose a vertex and grow it until you cannot grow. this assures maximality. However if you mean "maximum" then the problem might be NP_Complete. Also let me remind you that node weighted graphs are more general than edge weighted graphs. Every algorithm built for the former is applicable to later but vice-versa is not always true. This is very easy to see. Try out yourself.
What i understand the problem, i feel it is in P. If that is correct then the Hint for that is to use some special property for DAGs (which u shud know since u r researching and this seems a lecture notes problem). For general graphs, this is reducible to steiner trees so it is NP-Cmplete(infact also for planar graphs).
如果给定边权重的最大权重连通子图问题是 NP 难的,我认为你的问题是 NP 难的。您可以将节点权重问题简化为边权重问题。
我希望这有帮助。
I think your problem is NP hard if the maximum weight connected subgraph problem given edge weights is NP hard. You can reduce the node weight problem to the edge weight problem.
I hope this helps.