简体   繁体   English

在有向图中要删除所有循环的最小边数是多少?

[英]What is the minimum number of edges to be deleted in a directed graph to just remove all the cycles?

We have to find out the minimum number of edges to be deleted in a directed graph to just remove the all cycles. 我们必须找出有向图中要删除的最小边数,才能删除所有循环。 enter image description here 在此处输入图片说明

For example:- in this graph, there are 3 cycles: 例如:-在此图中,有3个周期:

1) 0-1-2-0 1)0-1-2-0

2) 0-2-0 2)0-2-0

3) 3-3 3)3-3

There are two possible combinations to remove all the cycles: 有两种可能的组合来消除所有循环:

1) Delete edges 2-0 and 3-3. 1)删除边缘2-0和3-3。

2) Delete edges 0-2, 1-2 and 3-3. 2)删除边缘0-2、1-2和3-3。

In first case we have to delete 2 edges and in second case, we have to delete 3 edges. 在第一种情况下,我们必须删除2条边,在第二种情况下,我们必须删除3条边。

First combination is the solution. 第一种组合是解决方案。

This problem is well-known under the name minimum feedback arc set problem . 这个问题以最小反馈弧集 问题为名是众所周知的。 The decision version of the problem says: given a graph G and a parameter k , can we break all cycles in G by deleting some set of at most k arcs from it? 问题的决策版本说:给定一个图形G和一个参数k ,是否可以通过从G删除一些最多k弧来破坏G的所有循环? Note that, as usual, the decision version is no harder than the computational one of finding the minimum feedback arc set. 注意,像往常一样,决策版本并不比找到最小反馈弧集的计算难。

The above decision version of this problem is NP-complete. 上述问题的决策版本是NP完整的。 In fact, it is one of Richard Karp's 21 NP-completeness problems. 实际上,这是Richard Karp的21个NP完整性问题之一。 That is, unless NP collapses to P--widely believed to be unlikely--this problem will not admit a polynomial time algorithm. 也就是说,除非NP崩溃为P(普遍认为不太可能),否则此问题将不允许采用多项式时间算法。 You can look up the details from the wikipedia page. 您可以从Wikipedia页面查找详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM