最小点权覆盖集的总权值 + 最大点权独立集的总权值 = 图的总权值所以最大点权独立集的题目都可以转换成最小点权覆盖集的题目注意:图必须是二分图 否则是NP问题两道典型的题目最大点权独立集hdu 1565 http://acm.hdu.edu.cn/showproblem.php?pid=1565将方格黑白染色(类似于国际象棋的棋盘),然后出现二分图了,怎么建边?代码已经很详细了View Code #include<stdio.h>#include<string.h>const int MAX=1010;const int INF=1000000000;struct{ i Read More
posted @ 2012-07-16 19:46 Because Of You Views(1034) Comments(0) Diggs(0) Edit