NP-完全问题证明题

NP-完全问题证明题:

8.16 We are feeling experimental and want to create a new dish. There are various ingredients we can choose from and we'd like to use as many of them as possible, but some ingredients don't go well with others. If there are n possible ingredients(numbered 1 to n), we write down an n x n matrix giving the discord between any pair of ingredients. This discord is a real number between 0.0 and 1.0, where 0.0 means "they go together perfectly" and 1.0 means "they really don't go together." Here's an example matrix when there are five possible ingredients.


In this case, ingredients 2 and 3 go together pretty well whereas 1 and 5 clash badly. Notice that this matrix is necessarily symmetric; and that the diagonal entries are always 0.0. Any set of ingredients incurs a penalty which is the sum of all discord values between pairs of ingredients. For instance, the set of ingredients { 1, 3, 5} incurs a penalty of 0.2+1.0+0.5=1.7. We want this penalty to be small.


Experimental Cuisine

Input: n, the number of ingredients tochoose from; D, the n x n "discord" matrix; some number p≥0

Output: The maximum number of ingredientswe can choose with penalty≤p.

 

Show that if Experimental Cuisine issolvable in polynomial time, then so is 3 SAT.


解题思路:

本题的目标是将3SAT问题归约到该实验问题(以下简称实验A)。教材中给出了3SAT归约于独立集问题的过程,根据归约的可传递性,只需证明独立集问题可归约于实验A即可。

独立集问题:给定一个包含g个顶点的图G,求两两互不相邻的顶点构成的最大集合。可将实验A中的材料转换为该图中的顶点,顶点临接则表示完全不和谐,那么因为图G的独立集是求两两互不相邻的顶点构成的最大集合,所以它即是实验A中问题的解。

证明过程:

给定的包含n个材料的实验A,负面影响不超过0的最大材料数集合S,可以将其高效地恢复成实例(G, g)的一个独立集。对于任意的节点i,集合S不会选择与节点i相连的那些节点,因为它们与节点i的不和谐度都是1,只要选择了就会超过p值(p值为0)。因此,如果S选了某节点,则与该节点连接的其他节点就不会包含在S中,但可以选择不相邻的节点;如果再选择一个节点,同理也不能选择与它相邻的节点,以此类推,最后得到一个集合。因为实验A中包含n个材料,每个材料代表了一个顶点,所以选出来的最大材料集合可以直接作为图G的独立集。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值