Question: This is the DPLL algorithm in sat solver where part iii uses part i and ii where each code has to be separated(please solve it
This is the DPLL algorithm in sat solver where part iii uses part i and ii where each code has to be separated(please solve it if you can I need it as soon as possible) they might look lengthy but they are not. (PYTHON CODE)
Also, I will be testing it using DIMACS format file so if you could show me how can i do it please
part.i) Write a Python function unit_propagate in the two arguments literal and clause set which outputs a new clause set after iteratively applying unit propagation until it cannot be applied further.
part.ii) Write a Python function pure_literal_eliminate in a single argument clause_set which outputs a new clause set after iteratively applying the pure literal assignment scheme until it cannot be applied further.
part.iii) Write a recursive Python function dpll_sat_solve in the two arguments clause_set and partial_assignment that solves the satisfiability of the clause set by applying unit propagation and pure literal elimination before branching on the two truth assignments for a given variable (this is the famous DPLL algorithm). In case the clause set is satisfiable under the partial assignment it should output a satisfying assignment. When this is run with an empty partial assignment it should act as a SAT-solver.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
