SAT Solvers and Applications
SAT Solvers and Applications
Presented By:
Raj Shekhar
[email protected]
Satisfiability Problem/SAT
• Boolean Variables: Values ϵ {0, 1} or {TRUE, FALSE}
• Boolean operations: AND(^), OR(v), and NOT(~)
• Boolean formula: Expression with Boolean variables & operations.
For example: F = (~X ∧ Y) ∨ (X ∧ ~Z)
• Boolean formula Satisfiable: some assignment of 0/1s to the
variables makes the formula evaluate to 1.
• Satisfiability Problem: To test if a Boolean formula is satisfiable.
SAT ϵ NP
• Computers : Deterministic Turing Machine(TM)
• Can go to a single state from any state under any given condition
• Non-Deterministic Turing Machine(NTM)
• Can go to several states from a given state even under same conditions
• Also assume: They know which next state is optimal w.r.t Time Complexity
• NP = {Problems solvable by NTM in polynomial time}
• Equivalent Definition:
• Verifiable in Polynomial Time
• SAT ϵ NP
• Any claimed solution can be verified in Polynomial Time
SAT ϵ NP Complete
• Why?
• All problems in NP polynomial time reducible to SAT (Cook/Levin Theorem)
SAT Solvers : Current State
• Efficient SAT solver => Efficient solution to any NP problem
• No theoretically efficient solver known (P =? NP)
• But consistent development in SAT solvers since several years.
• 50+ competitive SAT solvers available
• Several competitions held for fastest SAT solvers.
• Many solvers do practically well. e.g. Minisat, Picosat, Lingeling*
• Problems as large as 1M variables, 5M clauses tractable
• Wise to leverage the developments to other Hard problem as well
* www.satisfiability.org
SAT Solver Interface
e.g. XOR(X,Y) = (~X V ~Y) ꓥ (X V Y)
• #Variables = 729
• #Clauses =~ 6000
SUDOKU using SAT Solver
• Variables:
• for 1 ≤ i,j,k ≤ 9, Xijk = 1 iff cell[i,j] contains digit k