Lably
Skip to content

Circuit satisfiability problem

Classic NP-complete problem in computer science

  • 4 min read
  • 4 chapters

Related on Lably

Through If and only if

CircuitSAT is closely related to the Boolean satisfiability problem (SAT), and likewise, has been proven to be NP-complete. It is a prototypical NP-complete problem; the Cook–Levin theorem is sometimes proved on CircuitSAT instead of on the SAT, and then CircuitSAT can be reduced to the other satisfiability problems to prove their NP-completeness. The satisfiability of a circuit containing m arbitrary binary gates can be decided in time O(20.4058m).

Proof of NP-completeness

Given a circuit and a satisfying set of inputs, one can compute the output of each gate in constant time. Hence, the output of the circuit is verifiable in polynomial time. Thus Circuit SAT belongs to complexity class NP. To show NP-hardness, it is possible to construct a reduction from 3SAT to Circuit SAT.

Suppose the original 3SAT formula has variables x1,x2,…,xn, and operators (AND, OR, NOT) y1,y2,…,yk. Design a circuit such that it has an input corresponding to every variable and a gate corresponding to every operator. Connect the gates according to the 3SAT formula. For instance, if the 3SAT formula is (¬x1∧x2)∨x3,the circuit will have 3 inputs, one AND, one OR, and one NOT gate. The input corresponding to x1will be inverted before sending to an AND gate with x2,and the output of the AND gate will be sent to an OR gate with x3.

Notice that the 3SAT formula is equivalent to the circuit designed above, hence their output is same for same input. Hence, If the 3SAT formula has a satisfying assignment, then the corresponding circuit will output 1, and vice versa. So, this is a valid reduction, and Circuit SAT is NP-hard.

This completes the proof that circuit SAT is NP-Complete.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Topics in mathematics