算法设计与分析研究生.docVIP

  • 11
  • 0
  • 约6.65千字
  • 约 8页
  • 2017-03-09 发布于江苏
  • 举报
算法设计与分析研究生

NPC The tractable problems can be solved by efficient algorithms which are bounded by some polynomial in size of the input. Its running time is O(P(n)), where P(n) is a polynomial in the size of the input n.. The class of all problems that can be solved by efficient algorithms is denoted by P (for polynomial time). A problem X is called an NP-HARD if every problem in NP is reducible to X A problem X is called NP-complete problem if (1) X belongs to NP, and (2) X is NP-hard. A problem X is an NP-complete problem if (1) X belong to NP , and (2) Y is polynomially reducible to X, for some problem Y that is NP-complete. (Y已知為NPC) COOK’s thorem: The SAT problem is NP-complete. Cook 證明SAT(satifiability) to be NP-complete: Let S be a Boolean expression in conjunctive normal form (CNF). 3SAT A Boolean expression is satisfiable if there exists an assignment of 0s and 1s to its variable such that the value of the expression is 1. The SAT (satisfiability) problem is to determine whether a given expression is satisfiable (without necessarily finding a satifying assignment). We call an assignment of 0s and 1s to the variables of Boolean expression a truth assignment. 證明:3SAT is NP-complete. ?3SAT pNP 猜一組true assignment,並可在polynomial time()檢測(verify) 3SAT expression (clause)是否satisfiable ?SAT3SAT:設E為任意SAT的例子  設c=x1+ x2+ x3+…+ xk,c是任意的clause of E,其中以正向形式(無補數)表示只是為方便起見,接著將SAT較換為3SAT,亦即須將C轉換為C’,我們將加入新的變數y1、 y2、…、 yk-3, =()()…().() 將由轉換為,之時間為polynomial time (ii)證明is satisfiable ,then is satisfiable: 若為satisfiable,表示其中一變數必為1,在此情形我們可設之值使得也是satisfiable。 若=1,接著設=1,=0,其他皆為0,則為satisfiable 一般而言,若=1,則設,其他皆為0,則必為satisfiable (ii)if is satisfiable ,then is satisfiable:如果為satisfiable,則中至少有一變數為1,若全為0,則變成,且此expression必無法satisfiahle。(此express可簡化,且必為false) 上述轉換未說雙變數及單變數之轉換為,轉換方式如下: (若,則= (若,則= vertex cover 概念:何謂vertex cover?Let G=(V,E) be an undirected graph. A vertex cover of G is a set of vertices such that every edge in (of) G is incident to at least one of these vertices (touches one of those

文档评论(0)

1亿VIP精品文档

相关文档