题目:
EXPERIMENTAL CUISINE
Input: n, the number of ingredients to choose from: D,the n*n "discord" matrix; some number p >= 0
Output: The maximum number of ingredients we can choose with penalty <= p.
Show that if EXPERIMENTAL CUISINE is solvable in polynomial time, then so is 3SAT.
题解:
考虑将3SAT问题转化成一个EXPERIMENTAL CUISINE问题。对于任意3SAT问题,若其中某一个句子 :A or B or C;
我们可以得出7种ingredients,分别为ABC, AB'C, AB'C', ABC', A'BC, A'B'C, A'BC',这7种情况皆可使上述的句子成立。
比如A'BC代表A为假,B和C为真时;它们之间是不能成立的,则将D[A',B] = 1,D[A',C] = 1,D[B,C] = 1(两两ingredients间的discord值置为1)。若成立,则可将两两ingredients间的discord值置为0.
在3SAT任意两个句子之间,任意两个相矛盾的子句的ingredients之间的discord值置为1。最后得到子句总数就是EXPERIMENTAL CUISINE中最大材料的数量。
因此EXPERIMENTAL CUISINE多项式时间内可解,那么3SAT也能。
end!