Sep 12, 2003 ------------- - SAT problems - one of the first problems shown to be NP-complete - symbols, clauses, and CNF - most CSPs can be formulated as SAT! How? - Examples of CNF SAT problems - (x1 OR x2) AND (x2 OR x3) - has many solutions - (x1 OR x2 OR x3) AND (~x1 OR x2) AND (~x2 OR x3) AND (~x3 OR x1) AND (~x1 OR ~x2 OR ~x3) - has no solution - k-CNF-SAT - can have any number of clauses - can have any number of symbols - but at most k symbols/clause (or sometimes exactly k) - Goal of boolean satisfiability - see if it is solvable - or say no, if no assignment exists - 2-CNF-SAT is in P, but - 3- (and greater) CNF-STAT is NP-complete - brief digression about complexity classes - solving simple SAT problems - truth table approach: O(2^n) - unit propagation and trying out values - polynomial time for 2-CNF-SAT - Formulating other problems as CNF-SAT - n-queens - graph coloring - What is hard about 3-CNF-SAT problems - ratio of clauses to variables (C/N ratio) - easy to solve when C/N is small - easy to prove unsatisfiability when C/N is large - middle region is most dangerous - around [4.2, 4.3] - GSAT: an iterative improvement algorithm - two loops, with inner loop - flipping variables in direction of greatest improvement - sound but not guaranteed to get an answer - currently a "record holder" algorithm