Redian新闻
>
问个关于二分图的算法
avatar
问个关于二分图的算法# JobHunting - 待字闺中
u*g
1
问个算法。。
这样的:一个二分图,顶点上有权,删除一些顶点,使得二分图的所有边被删光,(如
果一条边(A,B)那删除A或者B都会导致这条边被删除)
问删除哪些顶点可以让累计的权最小
只想的出brute force。。求大牛指导
avatar
B*t
2
就是找一个累计权最小的node cover呗
min cover = max match
如果没记错的话应该这样:先引入一个s(source)和一个t(sink),然后把这两个引入的
结点分别连接bipatite两个node set(A和B)里的每个结点,边的权值就是顶点的weight
。internal node之间的边的权值为无穷大。再用个max flow算法,再用BFS找到min
cut(S)。最后node cover = (A\S)并(B 交 S)

【在 u******g 的大作中提到】
: 问个算法。。
: 这样的:一个二分图,顶点上有权,删除一些顶点,使得二分图的所有边被删光,(如
: 果一条边(A,B)那删除A或者B都会导致这条边被删除)
: 问删除哪些顶点可以让累计的权最小
: 只想的出brute force。。求大牛指导

avatar
f*e
3
这个NP吧?

【在 u******g 的大作中提到】
: 问个算法。。
: 这样的:一个二分图,顶点上有权,删除一些顶点,使得二分图的所有边被删光,(如
: 果一条边(A,B)那删除A或者B都会导致这条边被删除)
: 问删除哪些顶点可以让累计的权最小
: 只想的出brute force。。求大牛指导

avatar
u*g
4
When is a bipartite graph, prove that the constraint matrix of this IP is
totally unimodular. Hence conclude that the natural linear programming
relaxation of this IP is integral, implying that Minimum Weighted vertex
cover is polynomially solvable on bipartite graphs.
http://trueshelf.com/exercise/214/vertex-cover-in-bipartite-gra
给跪了。。这个解释我几乎一般都没听懂。。

【在 f*****e 的大作中提到】
: 这个NP吧?
avatar
u*g
5
仔细想了想好像的确是这样的。。太牛了。。

weight

【在 B********t 的大作中提到】
: 就是找一个累计权最小的node cover呗
: min cover = max match
: 如果没记错的话应该这样:先引入一个s(source)和一个t(sink),然后把这两个引入的
: 结点分别连接bipatite两个node set(A和B)里的每个结点,边的权值就是顶点的weight
: 。internal node之间的边的权值为无穷大。再用个max flow算法,再用BFS找到min
: cut(S)。最后node cover = (A\S)并(B 交 S)

avatar
l*i
6
Babyknight has the right idea. In his/her construction, every vertex cover
maps to a cut of the graph, so min weight vertex cover is min cut.
If the vertex is unweighted, then the answer is simply the size of a maximum
matching (unweighted), see Konig's theorem in wikipedia.
Bipartite vertex cover or independent set, weighted or not, is in P. totally
unimodular implies there is always an optimal solution that is integral,
just like max-flow-min-cut. This was once an MIT algorithm homework problem.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。