Introduction to Propositional Logic in AI
In this article, we will learn about Propositional Logic in AI.
- The literal meaning of a proposition is to put across one’s views, ideas, suggestions, expression or judgment. The proposition can be done through a formal document or oral communication (Informal). It can either address a positive or negative connotation.
- A proposition in logic includes Boolean functionalities in a sentence to make it either True or False and also adds reasoning techniques and proofing methods to make it much more comprehensive. This logic is a very old and widely adopted one.
- This logic was readily embraced by the modern search algorithm in Artificial Intelligence applications and Computer-aided tools. It’s use cases in AI include planning, decision making, smart control, diagnosis and problem-solving areas in Business, Medical, Education fields.
What is Propositional Logic in AI?
This logic is synonymous with sentential logic, provides ways and means of combining or changing the propositions to create a complicated structure and to build a new logical relationship and properties. It combines logical connections of all the constituent statements, and the true value of the complex statement is derived. While doing, it considers other factors like reasoning, relationship, and interconnection between the constituent statements.
This logic provides better clarity on data and information in an incomplete environment by deeper analysis and inference of the limited information presented to it. Due to this unique feature and powerful algorithms deployed in logical reasoning, it is widely adopted in advanced search in AI in solving complex problems.
Syntax
Propositional logic (PL), in order to be effective, then we need to follow a language structure that should be agreed upon by everyone, and it should be easy to adopt by all. PL Language structure consists of simple undividable statements joined together with logical connectors.
A sentence in any language contains a combination of words like the verb, noun, pronoun, prepositions, etc., Syntax of PL Language also follows a similar rule, and it consists of
Sr. No | Subject | Syntax |
1 | Simple undividable statement represent true or false (not both) and it is Boolean in nature | Upper Case letters A, B, C, P, Q, R are used to represent statements |
2 | Logical Connectors or operators used to
connect two statements |
^, v, →, ↔, ¬ are used to represent AND, OR,
Implies, bi-conditional and NOT condition. |
3 | Complex conditions | Complex conditions are handled by coding
connectors within parenthesis. |
Other Features
- A simple sentence is called Atomic Proposition, and it should be either true or false. Example: 9+2 =11 is one such proposition, and it is true. Sunrises in the west is another example, and it is false.
- A combination of simple sentences connected by logical connectors is called Compound. Example: Today is Friday and people visit Temple today. It’s raining, and the match is called off.
- A Proposition that is always true is known as Tautology (another name for Valid Sentence).
- A Proposition that is always false is known as Contradiction.
- Sentences that are questions and command in nature do not belong to this Proposition Category.
Logical Connectives
It connects two undividable simple sentences or expresses a sentence in a logical sense. Complex statements can be created using logical connectives. There are 5 types of connectors, namely.
Sl. | Type | Symbol | Description |
1 | Negation | ¬ P | It represents a Negative condition. P is a positive statement, and ¬ P indicates NOT condition. Example: Today is Monday (P), Today is not a Monday (¬ P) |
2 | Conjunction | P ^ Q | It joins two statements P, Q with AND clause. Example: Ram is a cricket player (P). Ram is a Hockey player (Q). Ram plays both cricket and Hockey is represented by (P ^ Q) |
3 | Disjunction | P v Q | It joins two statements P, Q with OR Clause. Example: Ram leaves for Mumbai (P) and Ram leaves for Chennai (Q). Ram leaves for Chennai or Mumbai is represented by (P v Q). In this complex statement, at any given point of time if P is True Q is not true and vice versa. |
4 | Implication | P → Q | Sentence (Q) is dependent on sentence (P), and it is called implication. It follows the rule of If then clause. If sentence P is true, then sentence Q is true. The condition is unidirectional. Example: If it is Sunday (P) then I will go to Movie (Q), and it is represented as P → Q |
5 | Bi-conditional | P ⇔ Q | Sentence (Q) is dependent on sentence (P), and vice versa and conditions are bi-directional in this connective. If a conditional statement and its converse are true, then it is called as bi-conditional connective (Implication condition in both the directions P → Q and Q → P). If and only if all conditions are true, then the end statement is true. Example: If I have 1000 Rupees then only I will go to Bar. The converse condition that I will go to Bar if and only if I have Rs 1000. The first statement covers necessity and the second one covers sufficiency. |
Truth Table
It maps the truth values of propositions for all combinations that are possible with several logical connectives. It follows Boolean logic and propositional calculus. All such scenarios with corresponding truth values are captured in Table known as Truth Table.
The following table depicts the truth values of various combinations of Boolean conditions for Statements P and Q for all the logical connectives.
P | Q | Negation | Conjunction | Disjunction | Implication | Bi-conditional | |
¬ P | ¬ Q | P ^ Q | P v Q | P → Q | P⇔Q | ||
True | True | False | False | True | True | True | True |
True | False | False | True | False | True | False | False |
False | True | True | False | False | True | True | False |
False | False | True | True | False | False | True | True |
This can be extended to for three statements (P, Q, R) with any combinations of logical connectives. The connectives can be combined with multiple connectors like Parenthesis or Brackets. The order of precedence of logical connectors in evaluating propositional logic is
- Parenthesis
- Negation
- Conjunction (AND)
- Disjunction (OR)
- Implication (If…then)
- Bi-Conditional (if and only if)
Conclusion – Propositional Logic in AI
Due to its ability in solving complex problems this logic is used quite extensively in Business, Education and Medical fields.
But it has some limitations viz.,
- It cannot address relations like Some, ALL,
- It can neither handle logical relationships.
- It has limited expressive ability.
Recommended Articles
This is a guide to Propositional Logic in AI. Here we discuss what is Propositional Logic in AI, along with syntax, logical connectives and truth table in detail. You can also go through our other related articles to learn more –