题意:给出 n≤40 个点的邻接矩阵,要求给每个点赋值,使得点的权值和为 K ,每条边权值为两端点点权的乘积,最大化边的权值和。
思路:
Lemma : Let G be a simple graph. To every vertex of G we assign a nonnegative real number such that the sum of the numbers assigned to all vertices is 1. For any two connected vertices (by an edge), compute the product of the numbers associated to these vertices. The maximal value of the sum of these products is when assign equal numbers to a maximal clique (a subgraph that all of its vertices are connected to each other) and 0 to the rest of the graph.
简而言之就是直接把K平均分给最大团里的点
转自:点击打开链接
首先假如整个图是一个点数为