Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Propositional Logic in Artificial Intelligence

Uploaded by

athullyamolsr06
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Propositional Logic in Artificial Intelligence

Uploaded by

athullyamolsr06
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Logic

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 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:

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:

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."

Following are some basic facts about propositional logic:


o Propositional logic is also called Boolean logic as it works on 0 and 1.
o 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.
o Propositions can be either true or false, but it cannot be both.
o Propositional logic consists of an object, relations or function, and logical
connectives.
o These connectives are also called logical operators.
o The propositions and connectives are the basic elements of the propositional logic.
o Connectives can be said as a logical operator which connects two sentences.
o A proposition formula which is always true is called tautology, and it is also called a
valid sentence.
o A proposition formula which is always false is called Contradiction.
o A proposition formula which has both true and false values is called Contingency
o 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:

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.

iii) Nothing else is a well defined preposition.

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.

Here P= Ritika is Doctor. Q= Ritika is Engineer, so we can write it as P ∨ Q.


Example: "Ritika is a doctor or Engineer",
4. 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
5. Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, It is known as if
and only if rules.

P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.(or) P Q


example If I am breathing, then I am alive

Following is the summarized table for Propositional Logic Connectives:

Semantics of logical proposition

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

First Precedence Parenthesis

Second Precedence Negation

Third Precedence Conjunction(AND)

Fourth Precedence Disjunction(OR)

Fifth Precedence Implication

Six Precedence Biconditional

¬R∨ Q, It can be interpreted as (¬R) ∨ Q.


Note: For better understanding use parenthesis to make sure of the correct interpretations. Such as

Properties of statements.

Satisfiable: A statement is satisfiable if there is some interpretation for which it is true.

Contradiction. A sentence is contradictory (unsatisfiable) 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 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.

As example of the above definition consider the following statements.

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.

P is a logical consequence of (P ∧ Q) since any interpretation for which (P ∧ Q) is true, P is


also true.

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.

For example (A ∧ B) is logically equivalent to (B ∧ A). It can be written as A∧B = B∧A

A B A∧B B∧A
True True True True
True False False False
False True False False
False False False False

Consider another example.

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

Limitations of Propositional logic:

o We cannot represent relations like ALL, some, or none with propositional logic.
Example:

1. All the girls are intelligent.


2. Some apples are sweet.
o Propositional logic has limited expressive power.
o In propositional logic, we cannot describe statements in terms of their properties or
logical relationships.

You might also like