English 中文(简体)
独立顶顶层覆盖的算法值
原标题:Algorithm for independent vertex cover

Skiena的《算术》书中的问题:

图形 G = (V, E) 的顶部盖面是顶部 V + + + V 的子集,因此E 的每个边缘至少含有 V 的顶部。独立的一组图 G = (V, E) 的顶部盖面是 vertics V + + V 的子集,因此 E 的边缘没有包含 V 的两个顶部。

An independent vertex cover is a subset of vertices that is both an independent set and a vertex cover of G. Give an efficient algorithm for testing whether G contains an independent vertex cover. What classical graph problem does this reduce to?

有人知道这个问题的答案吗?

谢谢

<强> UPDATE

(关于这一想法的所需建议)

到目前为止,我认为这与检查图表是否使用两个颜色来颜色,即是否是双方颜色有关。如果使用BFS变量来颜色一个图形,比如白色和黑色,那么带有其中一种颜色的顶点,比如白色,在某些情况下也构成顶点覆盖。

最佳回答

您的想法是正确的。 问题在于检查一个特定图表是否 < a href=> "http:// en.wikipedia. org/wiki/Bipartite_ graph" rel=" no follown noreferrer" >bpartite 。

双部分图形没有奇长的周期,因此,如果使用 BFS 来颜色图形,同一颜色的顶点将是独立的套件。

维基百科:

If a bipartite graph is connected, its bipartition can be defined by the parity of the distances from any arbitrarily chosen vertex v: one subset consists of the vertices at even distance to v and the other subset consists of the vertices at odd distance to v.

Thus, one may efficiently test whether a graph is bipartite by using this parity technique to assign vertices to the two subsets U and V, separately within each connected component of the graph, and then examine each edge to verify that it has endpoints assigned to different subsets.

有趣的事实是,独立集也是Np的完整和顶部覆盖,但是如果一个图表是双边的,那么它就是阴蒂。

未来,对于这样的问题, 也

问题回答

@ em> 独立的顶部覆盖 = 双边图形 + 最小顶部覆盖?





相关问题
How to add/merge several Big O s into one

If I have an algorithm which is comprised of (let s say) three sub-algorithms, all with different O() characteristics, e.g.: algorithm A: O(n) algorithm B: O(log(n)) algorithm C: O(n log(n)) How do ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Enumerating All Minimal Directed Cycles Of A Directed Graph

I have a directed graph and my problem is to enumerate all the minimal (cycles that cannot be constructed as the union of other cycles) directed cycles of this graph. This is different from what the ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...