Question 1

Greedy SAT Algorithm

This is an example of a greedy search algorithm:

  1. Guess a variable assignment at random
  2. Evaluate your guess by counting number of satisfied clauses.
  3. Consider the effect of swapping a single variable from to or vice-versa.
  4. Update the assignment to the assignment that leads to the biggest increase in the number of satisfied clauses.
  5. Repeat until no further improvements are possible.

We find that this algorithm runs in polynomial time:

  • Selecting a random assignment and evaluating the ‘score’ of the assignment can both be done in linear time, .
  • Each iteration involves evaluating at most assignments that different in a single variable, which requires at most a polynomial number of steps.
  • We can never decrease ‘score’, so we iterate at most polynomial times.

This algorithm is not complete and may sometimes report unsatisfiable when it actually is. Despite this, it is a relatively quick algorithm and may be used as the first part of a SAT solver to help improve performance.

Link to original

  1. Guess variable assignment
  2. Evaluate: all clauses are satisfied.
  3. No further improvements can be made.

Question 2

DPLL Algorithm

The Davis-Putnam-Logemann-Loveland (DPPL) algorithm was proposed in the 1962. It is a divide-and-conquer backtrack-search type algorithm, it works as follows:

  • Run pure literal elimination and unit clause propagation.
  • If any clauses remain unsatisfied, we branch on any remaining variable :
    • Choose to make by adding to
    • Choose to make by adding to
  • We can achieve this by recursively calling the DPLL Algorithm until either:
    • all clauses are satisfied and
    • a conflict is detected in the partial assignment
Link to original

  1. No unit clauses, no pure literals.
  2. Branch on :
    1. Unit clause elimination on :
    2. Branch on :
      1. Unit clause elimination on .
      2. All clauses are satisified.

Hence satisfying assignment is .

Question 3

  1. Construct the implication graph for :

This produces the Scc graph:

To find the satisfying assignment, we need to find suitable assignments to ensure that the graph holds:

Question 4

  1. Unit clause elimination on :
  2. Unit clause elimination on :
  3. Unit clause elimination on :
  4. Unit clause elimination on :
  5. Unit clause elimination on :
  6. Unit clause elimination on : Empty set of clauses.

Hence they are all satisfiable.