1 / 25

SAT

SAT. SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true? SAT: Given a CNF, is it true that it does not represent the constant-0 function? Input: ( : x 1 Ç : x 2 ) Æ (x 1 Ç x 2 )

ifama
Télécharger la présentation

SAT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAT • SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true? • SAT: Given a CNF, is it true that it does not represent the constant-0 function? • Input: (: x1Ç: x2) Æ (x1Ç x2) • Output: Yes. • Input: (: x1Ç: x2) Æ (x1Ç x2) Æ (x1Ç: x2 ) Æ (: x1Ç x2) • Output: No.

  2. SAT • SAT is in NP. • Cook’s theorem (1972): SAT is NP-hard. • Hence, SAT is NP-complete. It is a universal search problem and we do not think it has a polynomial time algorithm. If we find one, we get $1.000.000.

  3. Circuits • A circuit C is a directed acyclic graph. • Nodes in C are called gates. Types of gates: • Variable (or input) gates of indegree 0, labeled X1, X2, …Xn • Constant gates of indegree 0, labeled 0,1 • AND-, OR-gates of indegree 2, • NOT-, COPY-gates of indegree 1. • m distinguished gates are output gates. • The circuit C computes a Boolean function C:{0,1}n! {0,1}m

  4. CIRCUIT SAT • CIRCUIT SAT: Given a Boolean circuit, is there a way to assign truth values to the input gates variables, so that the output gate evaluates to true? • Generalizes SAT, as CNFs are formulas and formulas are circuits.

  5. Example ⋁ Input: ⋀ Output: Yes ⋀ ⌐ X3 X2 X1

  6. Example ⋀ Input: ⋀ Output: No ⋀ ⌐ X3 X2 X1

  7. CIRCUIT SAT • CIRCUIT SAT is in NP. • Proof of Cook’s theorem: • CIRCUIT SAT reduces to SAT. • CIRCUIT SAT is NP-hard. • Hence, SAT is NP-hard.

  8. CIRCUIT SAT SAT

  9. Cooks’ theorem: SAT is NP-hard Proof of Cook’s theorem: CIRCUIT SAT is NP-hard. CIRCUIT SAT reduces to SAT. Hence, SAT is NP-hard.

  10. Circuits vs. Turing Machines • Circuits can be given as inputs to algorithms but they can also be seen as computational devices themselves! • Like Turing Machines, circuits C: {0,1}n! {0,1} solve decision problems on {0,1}n. • Unlike Turing machines, circuits takes inputs of afixedinput length n only.

  11. Theorem • Given Turing Machine M running in time at most p(n) on inputs of length n, where p is a polynomial. • For every n, there is a circuit Cn with at most O(p(n)2) gates so that 8x2 {0,1}n: Cn(x)=1 iffM accepts x. • The map 1n!Cn is polynomial time computable.

  12. Intuition behind proof

  13. Problem: Cycles! Flip-Flop, stores one bit.

  14. The Tableau Method Time t … Time 1 Can be replaced by acyclic Boolean circuit of size ≈ s Time 0

  15. Multi-output circuits • Any function f: {0,1}n! {0,1}m is represented by some circuit. Proof: • Any function f: {0,1}n! {0,1} can be described by a Boolean formula. • A formula can also be viewed as a circuit. • Combine m such circuits.

  16. Theorem • Given Turing Machine M running in time at most p(n) on inputs of length n, where p is a polynomial. • For every n, there is a circuit Cn of size at most O(p(n)2) so that 8x2 {0,1}n: Cn(x)=1 iff M accepts x. • The map 1n!Cn is polynomial time computable.

  17. The Tableau Method Time t … Time 1 Can be replaced by acyclic Boolean circuit of size ≈ s Time 0

  18. Cell state vectors Given a Turing Machine computation, an integer t and an integer i let cti {0,1}s be a Boolean representation of the following information, a cell state vector: The symbol in cell i at time t Whether or not the head is pointing to cell i at time t If the head is pointing to cell i, what is the state of the finite control of the Turing machine at time t? The integer s depends only on the Turing machine (not the input to the computation, nor t,i). To make cti defined for all t, we let c(t+1)i = cti if the computation has already terminated at time t.

  19. Crucial Observation If we know the Turing machine and ct-1,i-1, ct-1,i, ct-1, i+1, we also can determine ct,i. In other words, there is a Boolean function h depending only on the Turing machine so that ct,i = h(ct-1,i-1, ct-1,i, ct-1,i+1). A circuit D for h is the central building block in a circuit computing all cell state vectors for all times for a given input.

  20. t(n) x1 xn 2 t(n)

  21. CIRCUIT SAT is NP-hard • Given an arbitrary language L in NP we must show that L reduces to CIRCUIT SAT. • This means: We must construct a polynomial time computable map r mapping instances of L to circuits, so that 8 x: x 2 L , r(x) 2 CIRCUIT SAT • The only thing we know about L is that there is a language L’ in P and a polynomial p, so that:

  22. Cooks’ theorem: SAT is NP-hard Proof of Cook’s theorem: CIRCUIT SAT is NP-hard. CIRCUIT SAT reduces to SAT. Hence, SAT is NP-hard.

  23. TSP HAMILTONIAN CYCLE MIN VERTEX COLORING SAT MAX INDEPENDENT SET SET COVER ILP MILP KNAPSACK TRIPARTITE MATCHING BINPACKING

  24. Remarks on Papadimitriou’s terminology When Papadimitriou writes “log space reduction”, just substitute “polynomial time reduction”. When Papadimitriou writes NL, just substitute P. Papadimtriou’s concepts are more restrictive, but the more restrictive definitions will play no role in this course.

More Related