Question: In this problem we will see how to solve a class of Boolean formulas. A Boolean formula is a logical expression composed of Boolean variables
In this problem we will see how to solve a class of Boolean formulas. A Boolean formula
is a logical expression composed of Boolean variables which can take the values True or
False logical operators, and parentheses.
For example, Phi x xx xx x is a Boolean formula with variables x
and xnote: x denotes the negation of x denotes the logical OR and denotes the
logical AND of two Boolean variables. The formula Phi evaluates to False for x True
and x False
The Boolean Satisfiability Problem SAT asks the following question: Given a Boolean
formula Phi is there an assignment of True or False to its variables such that the formula
evaluates to True For instance, in the above example, the Boolean formula Phi x x
evaluates to True for x x True Therefore, Phi is satisfiable. Whereas, the following
Boolean formula is not satisfiable Phi x x xxxxxxxxx
is not satisfiable convince yourself
Solving such Boolean formulas plays a pivotal role in logic, and circuit design, and of course
computer science. A specific class of SAT formulas, known as SAT, consists of Boolean
formulas of the form C C Ck where each Ci
is a clause with exactly two variables
or their negations connected by an OR operation. The Boolean formulas in examples
above are both SAT formulas.
Bool Software Inc. is a startup that prides itself in designing efficient algorithms to solve
various classes of SAT problems. Having taken CIS during your grad school, the interviewer at Bool Software Inc. has promised you a permanent job with benefits if you can
design an algorithm that solves the SAT problem efficiently.
Since you have learnt only graph search primitives so far, your goal for this HW assignment
is to propose an efficient algorithm that takes in a SAT formula as input, and outputs
True if there is a satisfying assignment for the Boolean formula, and False if there is
no satisfying assignment for it You can use the following directed graph to develop your
algorithms:
Given a Boolean SAT formula Phi x xn on nvariables, let G V E be a directed
graph on n vertices, where each vertex denotes a variable xi and its negation xi
For each
clause xi yi add arcs xi yi and yi xi
Use an appropriate graph search algorithm
on G to solve the SAT problem. Prove the correctness and runtime of your algorithm.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
