Diagonalization




CS254

Chris Pollett

Mar 13, 2017

Outline

General SAT Algorithms

More on DPLL

  • DPLL tries to either find a refutation from a set of clauses or find a satisfying assignment. One way to do this would be in a loop to consider all pairs of clauses and resolve them against each other and see if one got any new clauses. If find empty clause halt and output 0. If generated new clauses, repeat. Else output 1 (in this case we can actually find an assignment).
  • DPLL tries to optimize this. In our discussion sometimes we will use the word model to mean assignment.
  • It performs the following three optimizations over the basic resolution algorithm and creates an partial assignment as it goes:
  • DPLL Algorithm

    function DPLL-Satisfiable?(clauses) returns true or false
       input:clauses := the set of clauses in the CNF formula
       symbols := a list of literals that appear in clauses
       return DPLL(clauses, symbols, {})
    
    function DPLL(clauses, symbols, model) returns true or false
       if every clause in clauses is true in model then return true
       if some clause in clauses is false in model then return false
       P, value := FIND-PURE-SYMBOL(symbols, clauses, model)
       if P is non-null then return DPLL(clauses, symbols - P - bar{P}, model ∪ {P=value})
       P, value := FIND-UNIT-CLAUSE(clauses, model)
       if P is non-null then return DPLL(clauses, symbols - P - bar{P}, model ∪ {P=value})
       P := CHOOSE(symbols); //symbols is a list, CHOOSE gets some literal in the list into P
       rest = REST(symbols, P); //all the elements in the list excluding P
       return DPLL(clauses, rest, model ∪ {P=true}) or
           DPLL(clauses, rest, model ∪ {P=false})
    

    Conflict Driven Clause Learning

    Hierarchy Theorems

    Time Hierarchy Theorem

    Theorem. If `f`, `g` are time-constructible functions satisfying `f(n)log f(n) = o(g(n))`, then `DTIME(f(n)) stackrel(subset)(ne) DTIME(g(n))`.

    Proof. We prove the simpler statement `DTIME(n) stackrel(subset)(ne) DTIME(n^(1.5))` and indicate how to modify the proof to the general result.

    Consider the Turing Machine `D` which computes: "On input `x`, run for `|x|^(1.4)` steps the UTM `U` that simulates the execution of `M_x` on `x`. If `U` outputs some bit `b in {0, 1}` in this time, then output the opposite answer. Else output `0`." Recall `M_x` is the machine represented by the string `x`.

    Given its definition, `D` halts after at most `n^(1.4)` steps. So it is decided within time `n^(1.5)`. Let `L` be the language of `D`. We claim that `L !in DTIME(n)`. For contradiction's sake, assume there is some TM `M` and constant `c` such that TM `M`, given any input `x \in{0, 1}^star`, halts within `c|x|` steps and outputs `D(x)`...

    Time Hierarchy Theorem (proof cont'd)

    The time to simulate `M` by the UTM `U` on every input `x` is at most `c' c |x|log |x|` for some number `c'` that depends on the alphabet size and number of tapes and states of `M`, but is independent of `|x|`. There is some number `n_0` such that `n^(1.4) > c' c n log n` for every `n > n_0`. Let `x` be a string representing `M` whose length is at least `n_0` (such a strings exists since `M` is represented by infinitely many strings). Then `D(x)` will obtain `b=M(x)` within `|x|^(1.4)` steps, but by the definition of `D`, we have `D(x) = 1 -b ne M(x)`. Thus, giving a contradiction.

    The proof of the general case for `f` and `g` is similar and uses the observation that the slowdown of the simulating machine `U` is at most logarithmic. Showing the general case is the first problem of HW3.

    Quiz

    Which of the following statements is true?

    1. The argument we used to show if `EXP != NEXP` then `P!=NP` can be modified to show if `DTIME(2^{kn}) != NTIME(2^{kn})` then `P!=NP`.
    2. We showed 2-SAT is NP-complete.
    3. We showed that for a clause to variable ratio greater than 6, a random CNF formula was equally likely to be satifiable as unsatisfiable.

    The Nondeterministic time Hierarchy Theorem

    The analogous result to the last, but for NDTM's, is the following:

    Theorem. If `t_1` and `t_2` are time-constructible functions and `t_1(n+1) = o(t_2(n))` then `NTIME(t_1(n))` is strictly contained in `NTIME(t_2(n))`.

    This kind of result was first proved by Cook (1972), then improved by Seiferas, Fischer and Meyer(1973) and simplified by Zak (book's proof). The version we are giving is due to Fortnow and Santhanam (2010).

    Proof. Let `M_1, ...` be an enumeration of nondeterministic Turing machines. We define a nondeterministic machine `M` that acts as follows on input `w=1^i01^m01^k`:

    This machine uses time `O(t_2(n))`. If `NTIME(t_1(n))= NTIME(t_2(n))` then there is an equivalent machine to M, `M_i`, that uses time `O(t_1(n))`. Since `t_1(n+1)=o(t_2(n))` we have for sufficiently large `m`,

    `1^i01^m0 in L(M)=L(M_i) iff 1^i01^m01 in L(M)=L(M_i) iff ...`
    ` iff 1^i01^m01^{m^{t_1(m)}} in L(M)=L(M_i) iff M(1^i01^m0)` rejects a contradiction.