CNF and Sat

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

CNF AND SAT

SOLVING
Shaheer Muzammil
Shahbaz Hussain
Ahmed Javed
Faran Ahmed
Aakash Parkash

Introduction

Problem Statement:
Develop a tool that checks for validity of arbitrary propositional logic
formulae using CNF and SAT Solving based validity checking methods.

Project Solution:
Developed a solution for checking validity and satisfiability of the
propositional logic formulae by using DPLL algorithm.

Conjunctive Normal Form (CNF)

It is useful in automated theorem proving


Formula is in conjunctive normal form (CNF) if:
It is a conjunction of clauses
clause is a disjunction of literals
It is an AND of ORs

Negation Normal Form (NNF)

It is useful in automated theorem proving


Inmathematical logic, a formula is innegation normal formif :
Thenegationoperator (,NOT) is only applied to variables
And the only other allowedBoolean operatorsare
conjunction(AND) anddisjunction(OR).

NNF Algorithm (Pseudo Code)

CNF Algorithm (Pseudocode)

Validity through CNF


This is the first part of the project which is used to check the validity
of the propositional formulae through CNF.
In this method we are checking every clause of CNF that does it return
a TRUE.
A clause returns a TRUE if contains both the literals and its negation in
clause.
To convert a prepositional formula into CNF following steps are
followed:
IMP_FREE
NNF
CNF

SATisfiability Solver

This is the second part of our project is used to check the validity.
Program that automatically decides whether a propositional logic
formula is satisfiable
It takes CNFs .
If formula is satisfiable:
SAT solver produces true assignment that satisfies the formula
We had developed SATisfiability solver using DPLL Algorithm (next slide).

DPLL
Truth table = check all possibilities = exponential increase
DPLL takes the CNF and tells its satisfiability.
Three main steps of DPLL are :
Backtracking
Unit propagation
If a clause is aunit clause, i.e. it contains only a single unassigned literal, this clause
can only be satisfied by assigning the necessary value to make this literal true.

Pure literal
If apropositional variableoccurs with only one polarity in the formula, it is calledpure.
Pure literals can always be assigned in a way that makes all clauses containing them
true. Thus, these clauses do not constrain the search anymore and can be deleted .

DPLL Algorithm (Pseudocode)

THANK YOU

You might also like