ArticleslgStudy

computer science

Circuit satisfiability problem

Circuit satisfiability problem is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Circuit satisfiability problem rather than just read about it. In short: In theoretical computer science, the circuit satisfiability problem (also known as CIRCUIT-SAT, CircuitSAT, CSAT, etc.) is the decision problem of determining whether a given Boolean circuit has an assignment of its inputs that makes the output true. In other words, it asks whether the inputs to a given Boolean circuit can be consistently set to 1 or 0 such that the circuit outputs 1.

Circuit satisfiability problem — main illustration
Circuit satisfiability problem — illustration

Key takeaways

  • Circuit satisfiability problem belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Circuit satisfiability problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Circuit satisfiability problem from memory before moving on to harder problems.

Reference excerpt

In theoretical computer science, the circuit satisfiability problem (also known as CIRCUIT-SAT, CircuitSAT, CSAT, etc.) is the decision problem of determining whether a given Boolean circuit has an assignment of its inputs that makes the output true. In other words, it asks whether the inputs to a given Boolean circuit can be consistently set to 1 or 0 such that the circuit outputs 1. If that is the case, the circuit is called satisfiable. Otherwise, the circuit is called unsatisfiable. In the figure to the right, the left circuit can be satisfied by setting both inputs to be 1, but the right circuit is unsatisfiable. 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.

Restricted variants and related problems

Planar circuit SAT Assume that we are given a planar Boolean circuit (i.e. a Boolean circuit whose underlying graph is planar) containing only NAND gates with exactly two inputs. Planar Circuit SAT is the decision problem of determining whether this circuit has an assignment of its inputs that makes the output true. This problem is NP-complete. Moreover, if the restrictions are changed so that any gate in the circuit is a NOR gate, the resulting problem remains NP-complete.

Circuit UNSAT Circuit UNSAT is the decision problem of determining whether a given Boolean circuit outputs false for all possible assignments of its inputs. This is the complement of the Circuit SAT problem, and is therefore co-NP-complete.

Reduction from CircuitSAT Reduction from CircuitSAT or its variants can be used to show NP-hardness of certain problems, and provides us with an alternative to dual-rail and binary logic reductions. The gadgets that such a reduction needs to construct are:

A wire gadget. This gadget simulates the wires in the circuit. A split gadget. This gadget guarantees that all the output wires have the same value as the input wire. Gadgets simulating the gates of the circuit. A true terminator gadget. This gadget is used to force the output of the entire circuit to be true. A turn gadget. This gadget allows us to redirect wires in the right direction as needed. A crossover gadget. This gadget allows us to have two wires cross each other without interacting.

Minesweeper inference problem This problem asks whether it is possible to locate all the bombs given a Minesweeper board. It has been proven to be co-NP-complete via a reduction from circuit UNSAT problem. The gadgets constructed for this reduction are: wire, split, AND and NOT gates and terminator. There are three crucial observations regarding these gadgets. First, the split gadget can also be used as the NOT gadget and the turn gadget. Second, constructing AND and NOT gadgets is sufficient, because together they can simulate the universal NAND gate. Finally, since three NANDs can be composed intersection-free to implement an XOR, and since XOR is enough to build a crossover, this gives us the needed crossover gadget.

The Tseytin transformation

The Tseytin transformation is a straightforward reduction from Circuit-SAT to SAT. The transformation is easy to describe if the circuit is wholly constructed out of 2-input NAND gates (a functionally-complete set of Boolean operators): assign every net in the circuit a variable, then for each NAND gate, construct the conjunctive normal form clauses (v1 ∨ v3) ∧ (v2 ∨ v3) ∧ (¬v1 ∨ ¬v2 ∨ ¬v3), where v1 and v2 are the inputs to the NAND gate and v3 is the output. These clauses completely describe the relationship between the three variables. Conjoining the clauses from all the gates with an additional clause constraining the circuit's output variable to be true completes the reduction; an assignment of the variables satisfying all of the constraints exists if and only if the original circuit is satisfiable, and any solution is a solution to the original problem of finding inputs that make the circuit output 1. The converse—that SAT is reducible to circuit-SAT—follows trivially by rewriting the Boolean formula as a circuit and solving it.

See also Circuit value problem Satisfiability problem

References

Worked examples

Example 1 — a first encounter with Circuit satisfiability problem

Start with the simplest possible case. Write down what Circuit satisfiability problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Circuit satisfiability problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Circuit satisfiability problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Circuit satisfiability problem

In research
Circuit satisfiability problem appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Circuit satisfiability problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Circuit satisfiability problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computability theory, Computational problems, NP-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for Circuit satisfiability problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Circuit satisfiability problem” →

How to study Circuit satisfiability problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Circuit satisfiability problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Circuit satisfiability problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Circuit satisfiability problem in simple terms?

In theoretical computer science, the circuit satisfiability problem (also known as CIRCUIT-SAT, CircuitSAT, CSAT, etc.) is the decision problem of determining whether a given Boolean circuit has an assignment of its inputs that makes the output true. In other words, it asks whether the inputs to a…

Why does Circuit satisfiability problem matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Circuit satisfiability problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Circuit satisfiability problem.

Tags

  • Computability theory
  • Computational problems
  • NP-complete problems

Keep exploring