Artificial Intelligence - Rules of Inference



Inference is the process of making logical inferences or drawing conclusions from given information, facts or assumptions. It is an essential aspect of thinking or allowing us to go from what we know to what we do not know by using logical principles or patterns.

In our daily lives, we use inference to make decisions or solve problems. For example, if we hear a car alarm sound from the parking lot, we infer that someone has probably broken into that person's car or probably a false alarm went off. We don't know what truly had happened, but based on the prior knowledge we have with car alarms we made an assumption.

What is Inference

Inference is the process in artificial intelligence through which intelligent systems derive new knowledge or make decisions based on the information that exists. It enables artificial intelligence agents to reason, solve problems, and learn. For instance, in a spam detection system, inference means analyzing an email and deciding, whether it is spam or not, according to the patterns of learning.

Key Concepts of Inference in AI

Inference in AI allows the machine to infer meaningful conclusions, predict and optimize decision-making by using the available data and applying logical rules. Following are few key components of inference system −

  • Reasoning: AI agents uses inference to draw logical conclusions from facts and rules, allowing them to answer questions and solve problems.

  • Learning: Inference is applied in machine learning where models learn patterns from data and then apply inference to predict new data.

  • Decision-Making: AI systems use inference to compare multiple decisions and determine the best action based on their knowledge and goals.

Rules of Inference in AI

The rules of inference are the logical principles or guidelines that allows us to draw proper valid conclusions from given assumptions. They show how statements can be combined logically to produce new, logically consistent conclusions. Some common rules include Modus Ponens, Modus Tollens, Hypothetical Syllogism, and Disjunctive Syllogism. These rules make sure that the conclusions have validity based on premises.

Inference Rules and Terminologies

The concept of implication is central to the study of inference rules. An implication (P → Q) states that if the P is true then Q must be true. There are many derived forms related to the concept of implication.

  • Converse: Flipping the variables of implication i.e, P → Q is Q → P. It changes the inference in such a way that if Q is a true statement then P must be true.

  • Contrapositive: The negation of the converse is ¬Q → ¬P. This terminology tells that if Q is not true, then P cannot be true. The contrapositive is logically equivalent to implication if one is true, the other must also be true.

  • Inverse: The negation of original implication is ¬P → ¬Q. It says that if P is false, then Q cannot be true. The inverse and converse are logically equivalent.

The following truth table represents the logical equivalency between these forms, particularly between the contrapositive and the implication as well as between the inverse and the converse.

P Q P → Q Q → P ¬ Q → ¬ P ¬ P → ¬ Q
T T T T T T
T F F T F T
F T T F T F
F F T T T T

Types of Inference Rules

The following inference rules illustrate several logical procedures for obtaining conclusions, demonstrating how provided premises lead to valid conclusion in reasoning systems.

Modus Ponens

The Modus Ponens is one of the best and important rule in inference, which states that if P, P → Q is true the Q must be true.

Notation of Modus Ponens = $$\frac{P→Q , P}{\Q}$$

Example

The following example illustrates the application of Modus Ponens in logical inference −

  • Premise 1: If students complete a Tutorials Point course then they will receive a certificate. (If P then Q)

  • Premise 2: A student has completed a course from Tutorials Point. (P is true.)

  • Conclusion: Student will receive a certificate. (Q is true.)

Modus Tollens

Modus Tollens rule states that, If P implies Q (P → Q) and Q is false, then P must also be false. It can be represented as −

Notation of Modus Tollens = $$\frac{P → Q , ¬ Q}{\ ¬P}$$

Example

The following example illustrates the application of Modus Tollens in logical inference −

  • Premise 1: If the dog is hungry, then it will bark. (If P then Q)

  • Premise 2: The dog isn't barking. (Q is false.)

  • Conclusion: The dog isn't hungry. (P is False)

Hypothetical Syllogism

The hypothetical syllogism rule states that, if P implies Q (P → Q) and Q implies R (Q → R), then P implies R (P → R). It can be represented as −

Notation of Hypothetical Syllogism =$$\frac{P → Q, Q → R} {\ P → R}$$

Example

The following example illustrates the application of Hypothetical Syllogism in logical inference −

  • Premise 1: If company launches a new marketing campaign then brand awareness increases. (If P then Q)

  • Premise 2: As brand awareness increases, there is an increased expectation of sale. (If Q then R)

  • Conclusion: Therefore, if the company introduces a new marketing campaign, sales will increase. (If P then R)

Disjunctive Syllogism

Disjunctive is one of the common rule which states that, if we have P or Q (PQ), and we know that P is false, then Q must be true. It can be represented as −

Notation of Disjunctive Syllogism = $$\frac{¬P, P Q}{\ Q}$$

Example

The following example illustrates the application of Disjunctive Syllogism in logical inference −

  • Premise 1: Either the light is on, or the bulb is broken. (P or Q)

  • Premise 2: The light is not on. (P is false)

  • Conclusion: Therefore, the bulb is broken. (Q is true)

Addition

Addition rule states that, if P is true, then we can conclude P or Q (PQ), regardless of Q. It can be represented as −

Notation of addition = $$\frac{p}{\ P → Q}

Example

The following example illustrates the application of Addition in logical inference −

  • Premise: We provide digital marketing training. (P is true)

  • Conclusion: Therefore, we provide digital marketing training or social media marketing training. (P or Q)

Simplification

Simplification rule state that, if P and Q (PQ) are both true, then we can conclude that P is true and Q is true. It can be represented as −

Notation of simplification = $$\frac{P Q}{\ P}

Example

The following example illustrates the application of Simplification in logical inference −

  • Premise: This AI tutorial explains about propositional logic and First-order-logic (P and Q)

  • Conclusion 1: Therefore, this AI tutorial explains propositional logic. (P is true)

  • Conclusion 2: Therefore, this AI tutorial explains First-order-logic. (Q is true)

Resolution

Resolution rule state that, if we have PQ and ¬PR, then we can conclude QR. It can be represented as −

Notation of Resolution = $$\frac{PQ, ¬PR}{\Q R}

Example

The following example illustrates the application of Resolution in logical inference −

  • Premise 1: Either the meeting is today, or it is tomorrow. (P or Q)

  • Premise 2: Either the meeting is not today, or it will be online. (Not P or R)

  • Conclusion: Therefore, either the meeting is tomorrow, or it will be online. (Q or R)

The most commonly used rules of inference or summarized in below table −

Rules of Inference Tautology Name
P, P → Q, Q (P(P → Q)) → Q Modus Ponens
¬Q, P → Q, ¬P (¬Q (P → Q)) → ¬P Modus Tollens
P → Q, Q → R, P → R ((P → Q) (Q → R)) → (P → R) Hypothetical Syllogism
¬P, P Q, Q (¬P (P Q)) → Q Disjunctive Syllogism
P, (P Q) P → (P Q) Addition
P Q, P (P Q) → P Simplification
P Q, ¬P R, Q R ((P Q) (¬P R)) → (Q R) Resolution

Applications of Inference Rules

Inference rules are used in a various industries, from healthcare to entertainment, allowing AI to analyze difficult problems or situations and offer insightful results. The following are some important uses of inference rules in various fields −

  • Medical Diagnosis Systems In medical AI applications, inference is used to evaluate patient information, including symptoms and test results, and provide a diagnosis. The system uses medical knowledge and rules to infer the causes of the disease and precautions, which helps a doctor to decide on an exact diagnosis.

  • Virtual Assistants:(Siri, Alexa) Virtual assistants use inference to understand and act on human commands. They apply natural language processing to infer what a person is asking for or what a question means, which helps them provide suitable answers or take appropriate actions.

  • Recommender Systems: (Netflix, Amazon) Inference plays a role in suggesting items, movies, and information to users. AI looks at past user activity to guess their likes and dislikes. This allows it to predict movies they might enjoy, which makes for a better user experience.

  • Autonomous Vehicles: Self-driving cars rely on inference to make choices as they go. Their sensors help them gather info about what's around them (like people walking other cars, and road signs). This lets them drive through traffic.

Advertisements