Example: dental hygienist

NP-Complete Problems - Virginia Tech

Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems NP-Complete Problems T. M. Murali April 24, 29, 2024. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Review: Definitions of N P- complete and N P-Hard A problem X is N P- complete if A problem X is N P-Hard if (i) X N P and (ii) for every problem Y N P, (i) for every problem Y N P, Y P X . Y P X . NP NP-hard P NPc T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete . T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete .

NP-Complete. Given a new problem X, a general strategy for proving it NP-Complete is 1 Prove that X ∈NP. 2 Select a problem Y known to be NP-Complete. 3 Prove that Y ≤ P X. To prove X …

Tags:

  Complete, Problem, Np complete problems

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of NP-Complete Problems - Virginia Tech

1 Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems NP-Complete Problems T. M. Murali April 24, 29, 2024. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Review: Definitions of N P- complete and N P-Hard A problem X is N P- complete if A problem X is N P-Hard if (i) X N P and (ii) for every problem Y N P, (i) for every problem Y N P, Y P X . Y P X . NP NP-hard P NPc T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete . T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete .

2 Given a new problem X , a general strategy for proving it N P- complete is T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete . Given a new problem X , a general strategy for proving it N P- complete is 1 Prove that X N P. 2 Select a problem Y known to be N P- complete . 3 Prove that Y P X . T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving Other Problems N P- complete co-NP NP NP-hard P NPc Claim: If Y is N P- complete and X N P such that Y P X , then X is N P- complete . Given a new problem X , a general strategy for proving it N P- complete is 1 Prove that X N P. 2 Select a problem Y known to be N P- complete .

3 3 Prove that Y P X . To prove X is N P- complete , reduce a known N P- complete problem Y to X . Do not prove reduction in the opposite direction, , X P Y . T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Proving a problem N P- complete with Karp Reduction 1 Prove that X N P. 2 Select a problem Y known to be N P- complete . 3 Consider an arbitrary input s to problem Y . Show how to construct, in polynomial time, an input t to problem X such that (a) If Y (s) = yes, then X (t) = yes and (b) If X (t) = yes, then Y (s) = yes (equivalently, if Y (s) = no, then X (t) = no). T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems 3-SAT is N P- complete Why is 3-SAT in NP? T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems 3-SAT is N P- complete Why is 3-SAT in NP?

4 Circuit Satisfiability P 3-SAT. 1 Given an input to Circuit Satisfiability, create an input to SAT, in which each clause has at most three variables. 2 Convert this input to SAT into an input to 3-SAT. Skip proof that Circuit Satisfiability P 3-SAT. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses T.

5 M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv.

6 Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv.

7 Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ).

8 Node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). Constants at sources: single-variable clauses. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Transformation Given an arbitrary circuit K , associate each node v with a Boolean variable xv . Encode the requirements of each gate as a clause. node v has and edge entering from node u: guarantee that xv = xu using clauses (xv xu ) and (xv xu ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). node v has and edges entering from nodes u and w : ensure xv = xu xw using clauses (xv xu ), (xv xw ), and (xv xu xw ). Constants at sources: single-variable clauses. Output: if o is the output node, use the clause (xo ).

9 T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Proof Prove that K is equivalent to the input to SAT. K is satisfiable clauses are satisfiable. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Proof Prove that K is equivalent to the input to SAT. K is satisfiable clauses are satisfiable. clauses are satisfiable K is satisfiable. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Proof Prove that K is equivalent to the input to SAT. K is satisfiable clauses are satisfiable. clauses are satisfiable K is satisfiable. Observe that we have constructed clauses so that the value assigned to a node's variable is precisely what the circuit will compute.

10 T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Proof Prove that K is equivalent to the input to SAT. K is satisfiable clauses are satisfiable. clauses are satisfiable K is satisfiable. Observe that we have constructed clauses so that the value assigned to a node's variable is precisely what the circuit will compute. Converting input to SAT to an input to 3-SAT. T. M. Murali April 24, 29, 2024 NP-Complete Problems Strategy 3-SAT Sequencing Problems Partitioning Problems Other Problems Circuit Satisfiability P 3-SAT: Proof Prove that K is equivalent to the input to SAT. K is satisfiable clauses are satisfiable. clauses are satisfiable K is satisfiable. Observe that we have constructed clauses so that the value assigned to a node's variable is precisely what the circuit will compute.


Related search queries