Question 1
Greedy SAT Algorithm
This is an example of a greedy search algorithm:
- Guess a variable assignment at random
- Evaluate your guess by counting number of satisfied clauses.
- Consider the effect of swapping a single variable from to or vice-versa.
- Update the assignment to the assignment that leads to the biggest increase in the number of satisfied clauses.
- 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
- Guess variable assignment
- Evaluate: all clauses are satisfied.
- 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:
Link to original
- 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
- No unit clauses, no pure literals.
- Branch on :
- Unit clause elimination on :
- Branch on :
- Unit clause elimination on .
- All clauses are satisified.
Hence satisfying assignment is .
Question 3
- 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
- Unit clause elimination on :
- Unit clause elimination on :
- Unit clause elimination on :
- Unit clause elimination on :
- Unit clause elimination on :
- Unit clause elimination on : Empty set of clauses.
Hence they are all satisfiable.