NP-Hard Problems: 3SAT and CircuitSAT

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

In the context of reductions, what does it mean for a problem A to be reducible to problem B ($A \leq^P B$)?

  • Problem A can be solved in polynomial time if and only if problem B can be solved in exponential time.
  • There exists an algorithm that transforms instances of B into instances of A in polynomial time.
  • There exists an algorithm that transforms instances of A into instances of B in polynomial time. (correct)
  • Problem B is inherently easier to solve than problem A.

What is a key characteristic of NP-hard problems?

  • If any NP-hard problem can be solved in polynomial time, then P = NP. (correct)
  • They are easier than problems in P.
  • They are a subset of P problems.
  • They can be solved in polynomial time.

Given a Conjunctive Normal Form (CNF) formula, what is a 3-clause?

  • A clause with exactly 3 literals. (correct)
  • A clause with any number of literals.
  • A clause with at most 3 literals.
  • A clause with exactly 2 literals.

What does it mean for a 3SAT problem to be NP-hard?

<p>Any problem in NP can be reduced to 3SAT in polynomial time. (D)</p> Signup and view all the answers

In the reduction of CircuitSAT to 3SAT, what is the purpose of transforming a circuit into a 3-CNF Boolean formula?

<p>To convert the problem into a format suitable for solving with a 3SAT solver, proving 3SAT's NP-hardness. (C)</p> Signup and view all the answers

What does it imply if 3SAT has a polynomial-time algorithm?

<p>It implies P = NP. (D)</p> Signup and view all the answers

In the context of graph theory, what defines an independent set S in a graph G = (V, E)?

<p>A set of vertices where no pair of vertices is connected by an edge. (D)</p> Signup and view all the answers

What is the MAX-INDSET problem?

<p>Finding the largest independent set in a graph. (D)</p> Signup and view all the answers

Given a 3SAT formula φ, what is the strategy for reducing it to MAX-INDSET?

<p>Construct a graph such that finding a maximum independent set corresponds to finding a satisfying assignment for φ. (C)</p> Signup and view all the answers

How is a clause $y_i$ represented when reducing 3SAT to MAX-INDSET?

<p>As a complete subgraph (clique) of three vertices, each representing a literal in the clause. (A)</p> Signup and view all the answers

In the reduction from 3SAT to MAX-INDSET, what do edges between vertices representing literals $x_i$ and $\overline{x_i}$ signify?

<p>That only one of the literals can be true in a valid assignment. (B)</p> Signup and view all the answers

If a 3SAT formula φ with k clauses has a solution, what does this correspond to in the reduced MAX-INDSET instance?

<p>An independent set of size equal to k. (D)</p> Signup and view all the answers

What is the overall goal of reducing 3SAT to MAX-INDSET?

<p>To demonstrate that MAX-INDSET is NP-hard. (C)</p> Signup and view all the answers

Consider the reduction $A \leq^p B$. If problem B can be solved efficiently (in polynomial time), what can be inferred about problem A?

<p>Problem A can also be solved efficiently. (B)</p> Signup and view all the answers

Which of the following statements best describes the relationship between NP-complete and NP-hard problems?

<p>NP-complete problems are a subset of NP-hard problems. (A)</p> Signup and view all the answers

Consider a circuit K with n inputs. During the reduction of CircuitSAT to 3SAT, the circuit is transformed such that each gate has at most two inputs. Why is this step necessary?

<p>To ensure that the resulting CNF formula has clauses with at most 3 literals. (A)</p> Signup and view all the answers

Suppose you are given that 3SAT is NP-complete. What is the direct implication of this fact concerning the broader study of NP problems?

<p>Any problem in NP can be reduced to 3SAT in polynomial time. (A)</p> Signup and view all the answers

Given the formula $a = b \land c$, which of the following CNF clause(s) correctly represents this expression for conversion during a reduction?

<p>$(\overline{a} \lor b \lor c) \land (\overline{b} \lor a) \land (\overline{c} \lor a)$ (D)</p> Signup and view all the answers

In the context of reductions, what does it signify if problem A reduces to problem B, and problem B is known to be solvable in polynomial time?

<p>Problem A is also solvable in polynomial time (B)</p> Signup and view all the answers

During the reduction from CircuitSAT to 3SAT, a critical step involves transforming each gate in the circuit into a CNF formula. What is the primary purpose of this transformation?

<p>To convert the circuit into a Boolean formula with a specific structure suitable for 3SAT. (A)</p> Signup and view all the answers

What condition must be met for 3SAT to be considered NP-complete?

<p>3SAT must be in NP, and every problem in NP must be reducible to 3SAT in polynomial time. (C)</p> Signup and view all the answers

What key property does an independent set in a graph possess?

<p>No two vertices in the set are connected by an edge. (D)</p> Signup and view all the answers

Why is the MAX-INDSET problem considered challenging?

<p>Because it is NP-hard. (D)</p> Signup and view all the answers

While reducing 3SAT to MAX-INDSET, an edge is added between any two vertices representing literals $x_i$ and $\overline{x_i}$. What is the purpose of this setup?

<p>To reflect that both literals cannot be true simultaneously. (A)</p> Signup and view all the answers

Consider the situation when reducing a 3SAT instance to MAX-INDSET and you have a satisfying assignment in the 3SAT problem. How does this correlate to the maximum independent set in the produced graph?

<p>The size of the maximum independent set will be equal to the number of clauses. (C)</p> Signup and view all the answers

How is the MAX-INDSET problem formally defined?

<p>As the problem of finding the largest independent set in a graph. (C)</p> Signup and view all the answers

In a reduction from 3SAT to MAX-INDSET what is the purpose of ensuring that for each clause in 3SAT, a triangle (complete graph of three vertices) is formed in MAX-INDSET?

<p>To allow at most one literal from each clause to be included in the independent set. (A)</p> Signup and view all the answers

Given a 3SAT formula φ, what does it mean if MAX-INDSET returns an independent set of size k. Assume k is the number of clauses in φ.

<p>It indicates that there’s a satisfying assignment. (C)</p> Signup and view all the answers

What is the logical explanation for why you add an edge between literal xi and literal ¬xi, in the 3SAT to MAX-INDSET reduction?

<p>To represent the actual logical contradiction that xi and ¬xi cannot simultaneously be true. (D)</p> Signup and view all the answers

During the reduction from 3SAT to MAX-INDSET, what information about each clause in the 3SAT formula does the constructed MAX-INDSET graph directly encode?

<p>The constraint to ensure at least one literal in that clause evaluates to True. (D)</p> Signup and view all the answers

The Cook-Levin theorem’s significance arises from its proof of NP-completeness of the CIRCUIT-SAT problem. How does establishing that CIRCUIT-SAT is NP-complete influence the examination of problems within NP?

<p>It serves as an anchoring point that simplifies showing that other problems can be NP-complete through reduction. (C)</p> Signup and view all the answers

Suppose algorithm σ transforms problem A into problem B. Which of the following is TRUE if this transformation is a polynomial time reduction?

<p>If problem B is easy, problem A is easy, and if problem A is HARD, problem B may still be easy. (C)</p> Signup and view all the answers

Suppose you have an algorithm that finds the solution to CIRCUIT-SAT. Which one of these is something that you would now know?

<p>Due to the result of the Cook-Levin theorem, this means that CIRCUIT-SAT is in P! (A)</p> Signup and view all the answers

During reduction from 3SAT to MAX-INDSET why is it critical that this reduction run in polynomial time?

<p>To ensure the NP proof is sound; an invalid reduction doesn’t give any guarantees. (A)</p> Signup and view all the answers

To verify that we’ve made a correct CNF for $a = b \lor c$, what can we do?

<p>Simulate as much as we can with b and c, and compare the state with what a result would finally be, and compare. (B)</p> Signup and view all the answers

Flashcards

Umbreytingar (Transformations)

A transformation maps instances of type A to instances of type B. If x of type A is 'yes', then the transformation of x, (\sigma(x)), is also 'yes'.

NP-hard

NP-hard problems are problems A such that if A is solvable in polynomial time, then P = NP.

NP-Complete

A problem in NP is also in NP-Complete if every other problem in NP can be reduced to it in polynomial time.

3SAT

A Boolean formula in conjunctive normal form (CNF) with each clause containing exactly three literals.

Signup and view all the flashcards

3SAT difficulty

An NP-hard problem.

Signup and view all the flashcards

MAX-INDSET

Given G = (V, E), a set S is independent if for all u, v ∈ S, (u, v) ∉ E; that is, there are no edges between vertices in S.

Signup and view all the flashcards

Study Notes

  • Umbreytingar (reductions) occur when A and B are decision problems.
  • if there is an algorithm, σ, that maps instances of type A to instances of type B in polynomial time.
  • σ: A → B
  • x is yes ⇔ σ(x) is yes
  • The reduction must work for every instance of A, and it must correctly translate each instance of A to the appropriate instance of B.

NP-hard

  • NP-hard problems are problems A, such that if A is solvable in polynomial time, then P=NP.
  • CircuitSAT is NP-hard (Cook-Levin 1971).

3SAT

  • CNF (Conjunctive Normal Form)
  • (Xi ∨ Xj ∨ Xk)
  • 3-clause
  • 3-SAT Boolean formula: y1 ∧ y2 ∧ ... ∧ ym
  • where yi = li1 ∨ li2 ∨ li3, li = {xi, xi}
  • (x1 ∨ x3 ∨ x5) ∧ (x1 ∨ x2 ∨ x4) ∧ ..., until a value of x1,...,xn is true,
  • 3SAT is NP-hard
  • This is proven by showing that 3SAT is harder than CircuitSAT.
  • To prove that 3SAT is NP-hard, CircuitSAT instances are transformed into 3SAT instances, which provide a ‘yes’ answer.
  • Uppskrift (recipe) takes an example that is (Civiliter)
  • NP-estitt and transforms it into a new task.
  • To transform a K circuit with inputs x1, ..., xn:
    • If and/or has multiple inputs, it is split up
    • the outcome is a k' path where all inputs ≤ 2
    • Convert k' to halen formula
    • 王 = ((...)) ∧ Z
      • circuit nodes translating the circuit
      • Z is the output node Piece by piece (y1 = x2 ∨ x4) ∧ (y2 = y1 ∧ x2)
  • a = b ∧ c → (a ∨ b ∨ c) ∧ (a ∨ b) ∧ (a ∨ c)
  • a = b ∨ c → (a ∨ b ∨ c) ∧ (a ∨ b) ∧ (a ∨ c)
  • a = b → (a ∨ b) ∧ (a ∨ b)
  • a ∨ b → (a ∨ b ∨ x) ∧ (a ∨ b ∨ x)
  • Z → (Z ∨ x ∨ y) ∧ (Z ∨ x ∨ y) ∧ (Z ∨ x ∨ y) ∧ (Z ∨ x ∨ y)
  • where x and y are new variables
  • The K circuit (Circuit SAT context) is transformed into a 3-CNF Boolean formula 王, which is derived from the circuit Z,
  • The formulations both have same values, if some x1,...,xn inputs, i.e if the circuit K yields an input, then formula 王 also yields an input, and vice versa.
  • CircuitSAT ≤ p 3-SAT
  • If 3-SAT had a P-algorithm, it would be a “cheap” P-algorithm for Circuit SAT, but then P=NP (Cook-Levin), which indicates that 3-SAT is NP-estitt.

MAX-INDSET

  • Given a net G = (V, E), set S is independent if (u, v) ∉ E for all u, v ∈ S, that is, there are no legs between elements in S.
  • Is there a set of size > k?
  • The MAX-INDSET task is to find the largest independent set and is NP-hard.
  • Converts for 3-SAT.
  • 3SAT ≤ P MAX-INDSET
  • Let φ = y1 ∧ y2 ∧ ... ∧ yk
    • yi = li1 ∨ li2 ∨ li3
    • lij ∈ alik
  • For each clause yi, a triangle is built
  • Connects all unique elements
  • xi vid xi
  • The net is called G
  • Netid G contains a distinct set K.
  • ppae φ has a solution (y-svar)
  • k fjöldi clause in φ
  • ⇐ If φ has a solution, this leads to a value xi,...xu for all elements in the clauses which are selfsame/equal.
    • Every clause has at least one literal (x, x) that is selfsame, select one of them in S, 1S1=k
    • This means the selection in S is id.
    • Select one so that there will be no existing blue legs between elements in S.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

NP 2
40 questions

NP 2

BrightestHawkSEye avatar
BrightestHawkSEye
P vs NP: Vertex Cover and Subset Sum
36 questions
Use Quizgecko on...
Browser
Browser