Propositional Logic
Propositional 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.
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.
Here are some other types of propositions:
Tautology: A proposition that is always true, regardless of the truth values of its
propositional variables
Contradiction: A proposition that is always false
Propositional logic is a formal logical system that deals with propositions and is
used by computer scientists to express ideas about statements.
o Contingency: A Contingency is a formula which has both some true and
some false values for every value of its propositional variables.
1. Atomic Propositions
2. Compound propositions
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:
as P ∨ Q.
Here P= Ritika is Doctor. Q= Ritika is Doctor, so we can write it
as P ⇔ Q.
P= I am breathing, Q= I am alive, it can be represented
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
∨ Q.
correct interpretations. Such as ¬R∨ Q, It can be interpreted as (¬R)
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
Properties of Operators:
o Commutativity:
P∧ Q= Q ∧ P, or
P ∨ Q = Q ∨ P.
o
o
o Associativity:
(P ∧ Q) ∧ R= P ∧ (Q ∧ R),
(P ∨ Q) ∨ R= P ∨ (Q ∨ R)
o
o
o Identity element:
P ∧ True = P,
P ∨ True= True.
o
o
o Distributive:
P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
o
o
o DE Morgan's Law:
¬ (P ∧ Q) = (¬P) ∨ (¬Q)
¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
o
o
o Double-negation elimination:
o ¬ (¬P) = P.
1. Logical Representation
Logical representation is a language with some concrete rules which deals
with propositions and has no ambiguity in representation. Logical
representation means drawing a conclusion based on various conditions.
This representation lays down some important communication rules. It
consists of precisely defined syntax and semantics which supports the
sound inference. Each sentence can be translated into logics using syntax
and semantics.
Syntax:
o Syntaxes are the rules which decide how we can construct legal
sentences in the logic.
o It determines which symbol we can use in knowledge
representation.
o How to write those symbols.
Semantics:
o Semantics are the rules by which we can interpret the sentence in the
logic.
o Semantic also involves assigning a meaning to each sentence.
Logical representation can be categorised into mainly two logics:
1. Propositional Logics
2. Predicate logics
Statements:
1. Jerry is a cat.
2. Jerry is a mammal
3. Jerry is owned by Priya.
4. Jerry is brown colored.
5. All Mammals are animal.
Frames are derived from semantic networks and later evolved into our
modern-day classes and objects. A single frame is not much useful.
Frames system consist of a collection of frames which are connected. In
the frame, knowledge about an object or event can be stored together in
the knowledge base. The frame is a type of technology which is widely
used in various applications including Natural language processing and
machine visions.
Example: 1
Slots Filters
Year 1996
Page 1152
Example 2:
Slots Filter
Name Peter
Profession Doctor
Age 25
Weight 78
Example:
o IF (at bus stop AND bus arrives) THEN action (get into the bus)
o IF (on the bus AND paid AND empty seat) THEN action (sit down).
o IF (on bus AND unpaid) THEN action (pay charges).
o IF (bus arrives at destination) THEN action (get down from the bus).
Types of knowledge
Following are the various types of knowledge:
1. Declarative Knowledge:
o Declarative knowledge is to know about something.
o It includes concepts, facts, and objects.
o It is also called descriptive knowledge and expressed in
declarative sentences.
o It is simpler than procedural language.
2. Procedural Knowledge
o It is also known as imperative knowledge.
o Procedural knowledge is a type of knowledge which is responsible
for knowing how to do something.
o It can be directly applied to any task.
o It includes rules, strategies, procedures, agendas, etc.
o Procedural knowledge depends on the task on which it can be
applied.
3. Meta-knowledge:
o Perception(understanding)
o Learning
o Knowledge Representation and Reasoning
o Planning
o Execution
The above diagram is showing how an AI system can interact with the real
world and what components help it to show intelligence. AI system has
Perception component by which it retrieves information from its
environment. It can be visual, audio or another form of sensory input. The
learning component is responsible for learning from data captured by
Perception comportment. In the complete cycle, the main components are
knowledge representation and Reasoning. These two components are
involved in showing the intelligence in machine-like humans. These two
components are independent with each other but also coupled together.
The planning and execution depend on analysis of Knowledge
representation and reasoning.
Player1 65 23
Player2 58 18
Player3 75 24
2. Inheritable knowledge:
o In the inheritable knowledge approach, all data must be stored into
a hierarchy of classes.
o All classes should be arranged in a generalized form or a
hierarchal manner.
o In this approach, we apply inheritance property.
o Elements inherit values from other members of a class.
o This approach contains inheritable knowledge which shows a
relation between instance and class, and it is called instance
relation.
o Every individual frame can represent the collection of attributes
and its value.
o In this approach, objects and values are represented in Boxed
nodes.
o We use Arrows which point from objects to their values.
o Example:
3. Inferential knowledge:
o Marcus is a man
o All men are mortal
Then it can represent as;
1. 1. Representational Accuracy:
KR system should have the ability to represent all kind of required
knowledge.
2. 2. Inferential Adequacy:
KR system should have ability to manipulate the representational
structures to produce new knowledge corresponding to existing
structure.
3. 3. Inferential Efficiency:
The ability to direct the inferential knowledge mechanism into the
most productive directions by storing appropriate guides.
4. 4. Acquisitional efficiency- The ability to acquire the new
knowledge easily using automatic methods.