0% found this document useful (0 votes)
12 views19 pages

Module2 PL

Propositional logic (PL) is a fundamental form of logic used in artificial intelligence, consisting of propositions that can be true or false, and is represented using symbolic variables and logical connectives. It includes concepts such as tautology, contradiction, and various logical operators like negation, conjunction, and disjunction. The document also discusses the syntax, semantics, properties, limitations, and inference rules associated with propositional logic.

Uploaded by

Jeeva Dharshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views19 pages

Module2 PL

Propositional logic (PL) is a fundamental form of logic used in artificial intelligence, consisting of propositions that can be true or false, and is represented using symbolic variables and logical connectives. It includes concepts such as tautology, contradiction, and various logical operators like negation, conjunction, and disjunction. The document also discusses the syntax, semantics, properties, limitations, and inference rules associated with propositional logic.

Uploaded by

Jeeva Dharshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

KNOWLEDGE

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:

Following are some basic facts about propositional logic:


•Propositional logic is also called Boolean logic as it works on 0 and 1.
•In propositional logic, we use symbolic variables to represent the logic, and we
can use any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
•Propositions can be either true or false, but it cannot be both.
•Propositional logic consists of an object, relations or function, and logical
connectives.
•These connectives are also called logical operators.
•The propositions and connectives are the basic elements of the propositional
logic.
•Connectives can be said as a logical operator which connects two sentences.
•A proposition formula which is always true is called tautology, and it is also
called a valid sentence.
•A proposition formula which is always false is called Contradiction.
•A proposition formula which has both true and false values is called
•Statements which are questions, commands, or opinions are not propositions
such as "Where is Rohini", "How are you", "What is your name", are not
propositions.

Syntax of propositional logic:


The syntax of propositional logic defines the allowable sentences for the knowledge
representation.
There are two types of Propositions:
1.Atomic Propositions
2.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:
1.a) 2+2 is 4, it is an atomic proposition as it is a true fact.
2.b) "The Sun is cold" is also a proposition as it is a false fact.
•Compound proposition: Compound propositions are constructed by combining
simpler or atomic propositions, using parenthesis and logical connectives.
Example
1.a) "It is raining today, and street is wet."
2.b) "Ankit is a doctor, and his clinic is in Mumbai."

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.

Following is the summarized table for Propositional Logic


Connectives:
SEMANTICS
The semantic or meaning of sentence is either True or False. An interpretation for a sentence or
group of sentences is an assignment of truth value to each propositional symbol. Once an
interpretation has been given to a sentence its true value is determined. This is done by repeated
application of semantic values to larger and larger parts of statement until a true value is found.
SEMANTIC RULES FOR STATEMENTS
Rule . True Statement False Statement
No.
1 ~f ~t
Ex: Find the interpretation of
2 t & t’ f&a
3 tVa a&f ((P & ~Q)-> R) V Q
4 avt fvf’ Given P is true, R,Q are false
5 a->t t->f
6 f->a t<->f
7 t<->t’ f<->t
8 f<->f’
Where t and t’ denotes true statement, f and f’ denotes false statement and a is any statement
PROPERTIES OF STATEMENT
Satisfiable : A Statement is satisfiable if there is some interpretation for
which it is true.
Contradiction : A sentence is contradictory if there is no interpretation for
which it is true
Valid A sentence is valid if it is true for every interpretation . Valid sentences
are called tautologies,
Equivalence : Two sentences are said to be equivalent if they have the same
truth values under every interpretation
Logical Consequence : A sentence is logical consequence of another if it is
satisfied by all interpretations which satisfies the first.
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:
Determine Whether the following statement is
Satisfiable, Contradictory or Valid
(P & Q) V ~(P & Q)

P Q P&Q ~(P & Q) (P&Q) V~( P & Q)

T T T F T

T F F T T

F T F T T

F F F T T

The Statement is Satisfiable


Exercise 1. (PVQ) 🡪 (P&Q)
2. (P&Q) 🡪 R V ~Q
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 symbol

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

It will Rain =R It will Snow= S Rain or Snow= (R V S) Not rain or


Snow=~(RVS)

Not Rain=~R Not Snow=~S Not Rain and Snow =~R&~S

Prove ~(RVS) is logically equivalent to ~R &~S

R S `R ~S ~R&~S (RVS) ~(RVS)

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

Types of Inference rules:


1. Modus Ponens:
The Modus Ponens rule is one of the most important rules of inference, and it states that if P and P
→ Q is true, then we can infer that Q will be true. It can be represented as:
Example:
Statement-1: "If I am sleepy then I go to bed" ==> P→ Q
Statement-2: "I am sleepy" ==> P
Conclusion: "I go to bed." ==> Q.
Hence, we can say that, if P→ Q is true and P is true then Q will be true.
Proof by Truth table:
2. CHAIN RULE
The Chain rule state that if P→R is true whenever P→Q is true, and Q→R is true. It can be
represented as the following notation:
Example:
Statement-1: If you have my home key then you can unlock my home. P→Q
Statement-2: If you can unlock my home then you can take my money. Q→R
Conclusion: If you have my home key then you can take my money. P→R
Proof by truth table:
3.Simplification:
The simplification rule state that if P∧ Q is true, then Q or P will also be true. It can be
represented as:

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

You might also like