Chapter8算法概论概要1.pptVIP

  • 6
  • 0
  • 约1.06万字
  • 约 38页
  • 2017-07-02 发布于湖北
  • 举报
Chapter8算法概论概要1

8.3 The reductions * * SAT ? 3SAT Reduction: any clause Right satisfied ? left satisfied (One of a1,…, ak must be true) Otherwise (All of a1,…, ak are false) y1 must be true, y2 must be true, …, yk-3 must be true False the last clause (Right unsatisfied ) Left satisfied Some ai must be true Set y1,…, yi-2 to true and the rest to false Right satisfied 8.3 The reductions * * INDEPENDENT SET ? VERTEX COVER Reduction: a set of nodes S is a vertex cover of graph G = (V, E) (S touches every edge in E) if and only if the remaining nodes, V-S, are an independent set of G An instance (G, g) of INDEPENDENT SET reduces to a vertex cover of G with |V|-g nodes INDEPENDENT SET ? CLIQUE Reduction: a set of nodes S is an independent set of G if and only if S is a clique of ,where contains those unordered pairs of vertices that are not in E 8.3 The reductions * * ANY PROBLEM IN NP?SAT (1) NP problem reduce to CIRCUIT SAT A dag whose vertices are gates of five different types AND gates and OR gates have indegree 2 NOT gates have indegree 1 Known input gates have no incoming edges and are labeled false or true Unknown input gates have no incoming edges and labeled “?” CIRCUIT SAT is a search problem Given a circuit, find a truth assignment for the unknown inputs such that the output gate evaluates to true, or not exist (2) CIRCUIT SAT reduce to SAT 8.3 The reductions * * 8.3 The reductions * * (1) NP problem reduce to CIRCUIT SAT CIRCUIT SAT is a generalization of SAT AND gates at the top – clauses – the OR of literals Literal – unknown input gate or NOT gate Given an instance I of NP problem A, construct a circuit in polynomial time Known inputs are the bits of I Unknown inputs are the bits of S The output is true if and only if the unknown inputs spell a solution S of I The satisfying truth assignments to the unknown inputs of the circuit are in one-to-one correspondence with the solutions of I. 8.3 The reductions * * (2) CIRCUIT SAT r

文档评论(0)

1亿VIP精品文档

相关文档