Propositional Logic in Artificial Intelligence
Propositional Logic in Artificial Intelligence
One of the prime activities of human intelligence is reasoning. The activity of reasoning
involves construction, organization and manipulation of statements to arrive at new
conclusions. Thus, logic can be defined as a scientific study of the process of reasoning and
system of rules and procedures that help in the reasoning process.
Basically, the logic process takes some information (called premises) and produces
some outputs (called conclusions). Logic is basically classified into two categories,
propositional logic and predicate logic.
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:
1. a) It is Sunday.
2. b) The Sun rises from West (False proposition)
3. c) 3+3= 7(False proposition)
4. d) 5 is a prime number.
. There are two types of Propositions. They are Atomic Propositions (simple propositions)
and Molecular propositions (compound propositions).
Atomic Proposition: Atomic propositions are the simple propositions. It consists of a single
proposition symbol. These are the sentences which must be either true or false.
Example:
Example:
i). The letters A, B, … Z and these letters with subscripted numerals are well-formed atomic
propositions
ii). If A and B are well-formed atomic proposition then they can be connected with logical
connectives.
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:
A clear meaning of the logical propositions can be arrived at by constructing appropriate truth
tables for the molecular propositions. The following tables give the truth table for all
connectives.
Truth Table:
In propositional logic, we need to know the truth values of propositions in all possible
scenarios. We can combine all the possible combination with logical connectives, and the
representation of these combinations in a tabular format is called Truth table. Following are
the truth table for all logical connectives:
Truth table with three propositions:
We can build a proposition composing three propositions P, Q, and R. This truth table is
made-up of 8n Tuples as we have taken three proposition symbols.
Precedence of connectives:
Just like arithmetic operators, there is a precedence order for propositional connectors or
logical operators. This order should be followed while evaluating a propositional problem.
Following is the list of the precedence order for operators:
Precedence Operators
Properties of statements.
Valid : A sentence is valid if it is true for every interpretation. Valid sentences are also called
tautologies.
Equivalence: two sentences are equivalent if they have the same truth value under every
interpretation.
Logical consequences: A sentence is logical consequence of another if it is satisfied by all
interpretations which satisfy the first. More generally, it is a logical consequence of other
statements if and only if for any interpretation in which the statements are true, the resulting
statement is also true.
A valid statement is satisfiable, and a contradictory statement is invalid, but the
converse is not necessarily true.
P is satisfiable but not valid since an interpretation that assigns false to P assigns false to the
sentence P.
(P ∨¬P) is valid since every interpretation results in a value of true for (P ∨¬P)
(P ∧¬P) is a contradiction since every interpretation results in a value of false for (P ∧¬P).
P and ¬(¬P) are equivalent since each has the same truth values under every interpretation.
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.
A B A∧B B∧A
True True True True
True False False False
False True False False
False False False False
A B A→B ¬A ¬A ∧ B
True True True False True
True False False False False
False True True True True
This gives A →B = ¬A ∧ B
False False True True True
Some commonly used logical equivalences are listed in the following table.
Equivalence laws (or) Properties of Operators:
Idempotency:
P ∨ P= P, or
o
P ∧ P = P.
o
o
Commutativity:
P∧ Q= Q ∧ P, or
o
P ∨ Q = Q ∨ P.
o
o
Associativity:
(P ∧ Q) ∧ R= P ∧ (Q ∧ R),
o
(P ∨ Q) ∨ R= P ∨ (Q ∨ R)
o
o
Identity element:
P ∧ True = P,
o
P ∨ True= True.
o
o
Distributive:
P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
o
P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
o
o
DE Morgan's Law:
¬ (P ∧ Q) = (¬P) ∨ (¬Q)
o
¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
o
o
o Double-negation elimination:
o ¬ (¬P) = P.
Conditional elimination:
P → Q = ¬P ∨ Q
o
o
Bi-conditional elimination:
P ⇔ Q = (P → Q) ∧ (Q → P)
o
o
o We cannot represent relations like ALL, some, or none with propositional logic.
Example: