Module2 PL
Module2 PL
REPRESENTATION
FORMALIZED SYMBOLIC LOGICS
LOGIC IS FORMAL METHOD OF REASONING
Propositional logic in Artificial intelligence
Propositional logic (PL) is the simplest form of logic where all the
statements are made by propositions. A proposition is a declarative
statement which is either true or false. It is a technique of knowledge
representation in logical and mathematical form.
Example:
Logical Connectives:
Logical connectives are used to connect two simpler propositions or representing a
sentence logically. We can create compound propositions with the help of logical
connectives. There are mainly five connectives, which are given as follows:
1.Negation: A sentence such as ¬ P is called negation of P. A literal can be either
Positive literal or negative literal.
2.Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a
conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
3.Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called
disjunction, where P and Q are the propositions.
Example: "Ritika is a doctor or Engineer",
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it as P ∨ Q.
1.Implication: A sentence such as P → Q, is called an implication. Implications
are also known as if-then rules. It can be represented as
If it is raining, then the street is wet.
Let P= It is raining, and Q= Street is wet, so it is represented as P → Q
2.Biconditional: A sentence such as P⇔ Q is a Biconditional sentence,
example If I am breathing, then I am alive
P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.
T T T F T
T F F T T
F T F T T
F F F T T
Logical equivalence:
Logical equivalence is one of the features of propositional logic. Two propositions are
said to be logically equivalent if and only if the columns in the truth table are identical
to each other.
Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B.
In below truth table we can see that column for ¬A∨ B and A→B, are identical hence A
is Equivalent to B
Exercise :Determine if P-> Q is equivalent to ~PV Q
Limitations of Propositional logic:
•We cannot represent relations like ALL, some, or none with propositional
logic. Example:
• All the girls are intelligent.
• Some apples are sweet.
•Propositional logic has limited expressive power.
•In propositional logic, we cannot describe statements in terms of their
properties or logical relationships.
Are the statements, “it will not rain or snow” and “it will not rain and it will not snow”
logically equivalent
T T F F
T F F T
F T T F
F F T T
Properties of Operators:
•Commutativity:
• P∧ Q= Q ∧ P, or
• P ∨ Q = Q ∨ P.
•Associativity:
• (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
• (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
•Identity element:
• P ∧ True = P,
• P ∨ True= True.
•Distributive:
• P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
• P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
•DE Morgan's Law:
• ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
• ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
•Double-negation elimination:
• ¬ (¬P) = P.
Inference:
In artificial intelligence, we need intelligent computers which can create new logic from old
logic or by evidence, so generating the conclusions from evidence and facts is termed
as Inference.
Inference rules:
Inference rules are the templates for generating valid arguments. Inference rules are applied
to derive proofs in artificial intelligence, and the proof is a sequence of the conclusion that
leads to the desired goal.
In inference rules, the implication among all the connectives plays an important role.
Following are some terminologies related to inference rules:
•Implication: It is one of the logical connectives which can be
represented as P → Q. It is a Boolean expression.
•Converse: The converse of implication, which means the right-hand
side proposition goes to the left-hand side and vice-versa. It can be
written as Q → P.
•Contrapositive: The negation of converse is termed as
contrapositive, and it can be represented as ¬ Q → ¬ P.
•Inverse: The negation of implication is called inverse. It can be
represented as ¬ P → ¬ Q.
From the above term some of the compound statements are equivalent to each other, which we
can prove using truth table:
Hence from the above truth table, we can prove that P → Q is equivalent to ¬ Q → ¬ P, and
Q→ P is equivalent to ¬ P → ¬ Q
Proof by Truth-Table:
4. Conjunction
The Conjunction rule is one the common inference rule, and it states that If P is true and Q is
true then P & Q will be true.
P,Q
___________
P& Q
5.TRANSPOSITION
The simplification rule state that if P🡪Q is true, then ~Q 🡪 ~P will also be true. It can be
represented as
P Q P🡪Q ~Q ~P ~Q🡪~P
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 0 0
1 1 1 0 0 1
6. SUBSTITUTION
The substitution rule state that if PV~P is true, then Q V ~Q will also be true. It can be
represented as
P Q ~P ~Q PV~P Q V ~Q
0 0 1 1 0 0
0 1 1 0 0 0
1 0 0 1 0 0
1 1 0 0 0 0