LearnViz CompSci
Home / Learn / Theory & Discrete Math / SAT Problem

Advanced Topic 40 of 51 Theory & Discrete Math

SAT Problem

Deciding whether a Boolean formula can be satisfied.

How it works

The Boolean satisfiability problem asks whether there is an assignment of true and false values to variables that makes a propositional formula true. Formulas are usually given in conjunctive normal form, a conjunction of clauses of literals; 2-SAT is solvable in linear time, while 3-SAT is NP-complete. Modern CDCL solvers use unit propagation, clause learning, restarts and heuristics, solving industrial instances with millions of variables despite worst-case hardness.

Step-by-step walkthrough

  1. A formula such as (x or y) and (not x or z) has Boolean variables.
  2. Try an assignment, say x true y false z true.
  3. Check that every clause is true.
  4. If so the formula is satisfiable.
  5. SAT is NP-complete, yet modern SAT solvers handle huge instances.

Where it is used

SAT solvers verify hardware and software, plan, schedule, configure products, solve puzzles and cryptanalysis problems and power SMT solvers and package dependency resolution.

Common pitfall

Encoding problems into SAT can blow up in size, and a poor encoding makes solving slow. Random hard instances near the phase transition are difficult. A solver can say satisfiable with a model, but proving unsatisfiability may need huge proofs; request proof certificates. Use incremental solving, symmetry breaking and good variable choices.

Where it fits in the course

SAT Problem is topic 40 of 51 in Theory & Discrete Math, rated Advanced. It follows P vs NP. The next topic is Space Complexity Classes.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Theory & Discrete Math quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is SAT Problem?
Deciding whether a Boolean formula can be satisfied. It belongs to Theory & Discrete Math and is an advanced-level topic.
Where do people use SAT Problem?
SAT solvers verify hardware and software, plan, schedule, configure products, solve puzzles and cryptanalysis problems and power SMT solvers and package dependency resolution.
What is the most common mistake with SAT Problem?
Encoding problems into SAT can blow up in size, and a poor encoding makes solving slow.
What should I learn before this topic?
Start with P vs NP, the topic just before it in Theory & Discrete Math.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Theory & Discrete Math quiz.
Is SAT Problem hard to learn?
It is an Advanced topic. Expect to read the explanation more than once and to connect it with earlier topics. Working through a small example by hand helps most.
How long does it take to learn SAT Problem?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to SAT Problem?
P vs NP, Space Complexity Classes, Cook-Levin Theorem are closely connected. The full list is in the related topics section of this page.
What should I study after SAT Problem?
Continue with Space Complexity Classes, the next topic in Theory & Discrete Math.

Related topics