Rules of inference in artificial intelligence

Rules of inference are a set of logical principles and deductive rules that draw conclusions from existing information or assertions.

Types of inference rules

Following are the types of inference rules:

  1. Modus ponens

  2. Modus tollens

  3. Hypothetical syllogism

  4. Disjunctive syllogism

  5. Addition

  6. Simplification

  7. Resolution

Before we begin, let's suppose the following statements for all the types mentioned below:

P: It is raining.

Q: The streets are wet.

R: Roads are slippery.

Modus ponens

If P implies Q and P is true, then Q is true.

Notation

Example

If it is raining, then the streets are wet (P -> Q), and it is raining (P); therefore, the streets are wet (Q).

Modus tollens

If P implies Q and Q is false, then P is false.

Notation

Example

If it is raining, then the streets are wet (P -> Q), and streets are not wet (~Q); therefore, it is not raining (~P).

Hypothetical syllogism

If P implies Q and Q implies R, then P implies R.

Notation

Example

If it is raining, then the streets are wet (P -> Q), and if the streets are wet, then roads are slippery (Q -> R); therefore, if it is raining, then roads are slippery (P -> R).

Disjunctive syllogism

If P or Q is true, and P is false, then Q is true.

Notation

Example

It is raining or streets are wet (P∨Q), and it is not raining (~P); therefore, streets are wet (Q).

Addition

If P is true, then P or Q is true.

Notation

Example

It is raining (P), therefore it is raining or streets are wet (P∨Q).

Simplification

If P and Q is true, then P is true.

Notation

Example

It is raining and streets are wet (P∧Q); therefore it is raining (P).

Resolution

If both P or Q and not P or R is true, then Q or R is true.

Notation

Example

It is raining or streets are wet (P∨Q) and it is not raining or roads are slippery (~P∨R); therefore streets are wet or roads are slippery (Q∨R).

Applications

Inference is a fundamental process that significantly impacts various applications, including natural language processing, expert systems, robotics, and computer vision.

Natural language processing (NLP): Based on context and prior knowledge, the inference understands the meaning of sentences.

Computer vision: The inference recognizes object as an image, based on patterns and features.

Robotics: Plans and actions are executed by the inference based on the environment.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved