



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Applied Logic Lecture 5: SAT is NP and Introduction to Proofs CS 4860 Spring 2009 Tuesday, February 3, 2009
Reading : Please read Smullyan Chapter II pages 15–24.
Here is our current ”location” on the course map from Lecture 1
Propositional Logic Syntax (formulas) lecture 2/book Chapter 1 § 1. Boolean valuations, interpretations, truth tables. Value of a formula under an interpretation lecture 2,3 / book Chapter 1 § 2. Algebra CNF, DNF, distributive laws lecture 2. Encoding graph problems into CNF lecture 2. SAT Problem lectures 2,3. DPLL class of algorithms lecture 3,4. SAT is NP this lecture. Random SAT examples, phase transition, spinglass, Bart Selman’s results, this lecture. SAT and AI - encoding graph coloring this lecture.
proofs (Chapter II § 1) Justifying true propositions proofs from axioms, modus ponens, substitution proof as a record of failed falsification (Tableaux) rules schemes especially X ⊃ Y rules judgements and signed formulas ` X, F X
Consider the following encoding of graph coloring into CNF formulas. The task is to color planar graphs so that no adjacent countries have the same color. Here is an example from the map of Europe.
Let the countries with the color i be Bi, Gi, Fi, Li. Consider only three colors, red(r), blue(b), green(g). Then the possible coloring of France is Fr ∨ Fb ∨ Fg.
The constraints on pairs of neighbors derived from the graph include pairs such as ∼ (Bb ∧ Lb), ∼ (Br ∧ Lr), etc. These are equivalent to (∼ Bb∨ ∼ Lb) ∧ (∼ Br∨ ∼ Lr)∧ etc.
Write down the CNF claim that red, green, and blue suffice to color this map and prove it is unsatisfiable.
SAT is the first of hundreds of combinatorial problems shown to be solvable in Nondeterministic Polynomial time (NP). Consider a problem to be a set S of elements from a discrete set U. S belongs to the class of NP problems if and only if there is a polynomial time algorithm R on U and on another discrete set T and a polynomial p such that
x ∈ S if f ∃ t : T.|t| ≤ p (|x|)&R(x, t).
The running time of R(x, t) is bounded by c · (|t| + |x|)d^ where |x| and |t| is the length of x and t (think of x and t as strings of symbols) and c and are positive integers. We call t a certificate for x.
To see that SAT belongs to NP, let U be the set of propositional formulas, Form. Note, SAT ⊆ F orm.
Here is Church’s well known ”Hilbert-style” axiom system for propositional logic. It is in the axiomatic style of Euclid as made rigorous by Hilbert.
Rules of Inference
Axioms
(1) p ⊃ (q ⊃ p)
(2) (s ⊃ (p ⊃ q)) ⊃ ((s ⊃ p) ⊃ (s ⊃ q))
(3) (∼ p ⊃∼ q) ⊃ (q ⊃ p)
A proof is a finite sequence of formulas F 1 , F 2 , ..., Fn such that each Fi is an axiom or follows from previous formulas by a rule of inference.
Either price-theory implies a recession or quant-theory implies one, if the two theories is true, there will be a recession.
((p ⊃ r) ∨ (q ⊃ r)) ⊃ ((p ∨ q) ⊃ r)
Here is a proof attempt using tableau rules
F (((p ⊃ r) ∨ (q ⊃ r)) ⊃ ((p ∨ q) ⊃ r)) F (X ⊃ Y ) case T ((p ⊃ r) ∨ (q ⊃ r)), F ((p ∨ q) ⊃ r)) T X, F Y T (p ∨ q), F r F (X ⊃ Y ) case again T (X ∨ Y ) case T X | T Y