| Department of Computer Science and Engineering | CSE 150 |
| University of California at San Diego | Fall 2004 |
The purpose of this project is to implement two different algorithms
for testing propositional satisfiability, namely the DPLL and Walksat
algorithms explained in class, and to do interesting experiments with
them.
For this project, you may use Java, C, or C++. If you want to
use a different language, contact the instructor. Using C is
strongly recommended, because speed is very important for SAT solvers.
Think carefully what data structures you need to use to make your
implementations fast.
Both the DPLL and Walksat algorithm use heuristics. Your job
is to invent your own heuristic for each algorithm, and to do an
experimental study of its success. Use your creativity, but also
use your knowledge and your ability to think critically! For DPLL
you should invent a heuristic for variable ordering. For Walksat
you should invent a heuristic for which
variable to choose, among all variables belonging to unsatisfied
clauses.
You can debug your implementations using the
random 3SAT problem instances with 20 variables available at http://www.cs.ubc.ca/~hoos/SATLIB/benchm.html.
Note that these small 3SAT instances are all satisfiable.
In your report, you should explain your heuristics in high-level
pseudocode. You should also explain brief motivations for
them, i.e. why they seem like good choices. You must think about
your
heuristics at a conceptual level. You should also explain how you
make Walksat deal with unsatisfiable 3SAT instances. When (e.g.
after how many flips) is it reasonable for Walksat to stop and declare
failure?
Run both your algorithms systematically on all 2000 3SAT instances
with 100 variables and 430 clauses available in SATLIB (these files are
named uf100-430 and uuf100-430). For each
algorithm and each instance, measure the runtime. For Walksat,
also measure the number of variable flips. For DPLL, measure the
search tree size. For each algorithm, plot graphically the
measurements you get for satisfiable instances, and separately the
measurements for unsatisfiable instances. In your report, explain
briefly the conclusions you draw from these plots.
./dpll uf50-01.cnf
./walksat uf50-01.cnf
Satisfying
assignment found: 0 or 1
The output for Walksat should have the following form:
Number of restarts performed: an
integer
Number of flips performed: an
integer
Satisfying assignment found: 0 or 1
Here are detailed instructions for how to submit your code. You will submit a printout of your report at the start of class on the due date. The maximum length of the report is four pages single-spaced, not counting the title page. The recommended length is about three pages single-spaced. Remember to check the class web page and WebCT regularly for possible updates to this project description.
This project will be graded as follows: