UNIT - II Part 1 LC& LP
UNIT - II Part 1 LC& LP
RRM is a method to prove a formula or derive a goal from a given set of clauses by contradiction.
The term clause is used to denote a special formula containing the Boolean operators ~ and V.
Any given formula can be easily converted into a set of clauses.
Resolution refutation is the most favoured method for developing computer based systems that
can be used to prove theorems automatically.
It uses a single inference rule , which is known as Resolution based on modus ponen inference
rule.
It is more efficient in comparison to NDS and Axiomatic system because in this case we do not
need to guess which rule or axiom to apply in development of proofs.
During resolution, we need to identify two clauses: one with a positive atom (P) and the other
with a negative atom (~P) for the application of resolution rule.
Conversion of a formula into a set of
clauses
In PL, there are two normal forms, namely, Disjunctive normal form
(DNF) and Conjunctive normal Form (CNF)
A formula is said to be in its normal formif it is constructedusing only natural connectives {~,Λ,V}
In DNF, the formula is represented as Disjunction of conjunction that is in the form
(L1Λ….Ln)V………V(Ln1Λ……ΛLnn). Ex: (AΛB)V(CΛD)V(EΛ~F)
In CNF, the formula is represented as Conjnunction of Disjunction that is in the form
(L1V….VLn) Λ…. Λ(Ln1V…VLnn). Ex: (AVB) Λ(CVD) Λ~E
Formally a clause is defined as a formula of the form(L1VL2V….VLn). Hence Λ (Conjunction)
of these clauses is the conjunction NF.
Conversion of a formula into its CNF
Example:
Predicate Logic
There are many limitations with propositional logic.
For example, we cannot find the similarities between the given set of propositions
A- John is a boy
B- Peter is a boy
C- Paul is a boy.
PL cannot represent the similarity that John, Peter and Paul are boys.
This can be represented in predicate logic as boy(A) , boy(B), boy(C) and general statement for this
was boy(X) where X is a variable bounded with John, Paul and Peter which are instances of boy(X)
The statement boy(X) is called a predicate statement or expression. Here boy is a predicate symbol
and Xis its argument.
Boy(X) becomes true or false based on X values Ex: boy(Peter)=True, boy(Mary)=False.
The Predicate Logic is a Logical Extension to Propositional Logic which deals with the validity,
satisfiability and unsatisfiability of a formula along with the inference rules for derivation of new
formula.
Predicate Calculus
Predicate Calculus is the study of predicate systems; When the inference rules are added to
predicate calculus, it becomes predicate logic.
WFF(Predicate Calculus)
Examples
1)“X is a brother of Y”
Brother(X,Y)
2)Peter loves his son
Love(Peter, son(Peter))
3) Every human is mortal
(ꓯX)(human(X)←mortal(X))
First Order Predicate Calculus.
If the quantification in predicate formula is only on simple variables and on predicates or
functions then it is called FOPC
If the quantification is over first order predicates and functions then it becomes second order
predicate calculus.
Ex: ꓯp(p(X)↔p(Y)) is a SOPC statement
ꓯXꓯY(p(X)↔p(Y)) is a FOPC statement.
Example
Prenex Normal Form
PNF
Logic Programming
LP was first introduced by Kowalski in 1974 and Colmerauer in 1973. It is based on FOL.
In LP, a program is usually a collection of program clauses.
A clause of FOL is represented in clausal notation in Logic programming.
Clausal notation is written in the form
P1,…..Pk←N1,….Nk
Where Pi are positive literals
Ni are negative literals.
The goals or queries are solved, derived or proved from a logic program using resolution
principle.