0% found this document useful (0 votes)
18 views24 pages

Ai Unit Ivm

The document discusses various concepts in symbolic logic, focusing on non-monotonic reasoning, probability, and Bayesian networks. It explains how non-monotonic reasoning allows for the revision of conclusions based on new information, and introduces Bayes' theorem as a method for updating beliefs in uncertain situations. Additionally, it covers certainty factors, fuzzy logic, and the Dempster-Shafer theory as frameworks for handling uncertainty in artificial intelligence and expert systems.

Uploaded by

Ranga Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views24 pages

Ai Unit Ivm

The document discusses various concepts in symbolic logic, focusing on non-monotonic reasoning, probability, and Bayesian networks. It explains how non-monotonic reasoning allows for the revision of conclusions based on new information, and introduces Bayes' theorem as a method for updating beliefs in uncertain situations. Additionally, it covers certainty factors, fuzzy logic, and the Dempster-Shafer theory as frameworks for handling uncertainty in artificial intelligence and expert systems.

Uploaded by

Ranga Rao
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

UNIT-III

Symbolic Logic:
Non monotonic Reasoning
Probability and Bayes Theorem

Certainty Factors
Probabilistic Graphical Models
Bayesian Networks
Markov Networks
Fuzzy Logic
Graphical Representation of Fuzzy Logic
Symbolic Logic: Non monotonic Reasoning
Non-monotonic reasoning is a type of logical reasoning where the addition
of new information can invalidate previous conclusions. This contrasts with
monotonic reasoning, where once something is concluded, it remains true
regardless of new information.

04/27/2025
In non-monotonic reasoning, conclusions can change or be withdrawn as
new facts or rules are introduced. This is closer to human reasoning, where
we often revise our beliefs based on new evidence.

M V S Narayana
Example 1: Default Assumptions
Consider a situation where we know the following:
Fact 1: "Birds can fly."
Based on this, we might conclude:
Conclusion 1: "Tweety is a bird, so Tweety can fly.“
Now, suppose new information comes in:
Fact 2: "Tweety is a penguin.“
Penguins are birds that cannot fly. Based on this new information, we
revise our conclusion: 2
Revised Conclusion: "Tweety cannot fly."
A belief in non-monotonic reasoning refers to a tentative conclusion or assumption
that may change when new information is presented.
Example: Diagnosing a Patient
Initial Belief:
A doctor examines a patient who has a high fever, headache, and fatigue. Based on
these symptoms and their general medical knowledge, the doctor believes that the
patient has the flu.

04/27/2025
• Fact 1: "The patient has a high fever, headache, and fatigue."
• Conclusion: "The patient likely has the flu."
• This conclusion is a belief, which seems reasonable given the symptoms, but it is

M V S Narayana
not guaranteed to be true because other conditions can cause similar symptoms.
• New Information:

Later, lab results show that the patient has been in a region with a recent outbreak
of dengue fever, and a blood test reveals a low platelet count (a key indicator of
dengue).
• New Fact: "The patient has a low platelet count and was recently in an area with a
dengue outbreak."
• Belief Revision: 3
With this new information, the doctor revises their initial belief and concludes that
the patient likely has dengue fever, not the flu.
• Revised Conclusion: "The patient probably has dengue fever, not the flu."
Uncertainty in Artificial Intelligence
• In AI and expert systems, non-monotonic logic is used to handle
uncertainty, often through techniques like probabilistic reasoning and
belief revision. For example, an AI might start by assuming something
based on default knowledge, but as it gathers new data, it updates its
beliefs:
• Fact 1: A machine-learning model predicts a customer is likely to buy a

04/27/2025
product (based on prior purchase patterns).
• Conclusion 1: "This customer is likely to make a purchase."
• New Data: The customer’s recent browsing history suggests they are

M V S Narayana
looking for a different type of product.
• Revised Conclusion: "The likelihood of purchase may be lower for the current
product."
Uncertainty is Handled by:
• Probabilistic Non-Monotonic Reasoning: Rather than binary true/false
conclusions, probabilities are assigned to possible outcomes, and those
probabilities are updated as new information becomes available.
• Belief Revision: In formal systems, belief revision mechanisms (such as
Bayesian updating) are used to adjust conclusions in light of new 4
evidence.
Probability and Bayes Theorem
Probability reasoning:
Probabilistic reasoning is concerned with Bayes theorem, confidence

04/27/2025
factor, belief function, belief networks, and theory of evidence for
handling uncertainties in the knowledge.
Probability Theory:

M V S Narayana
The probability theory is widely accepted in different fields of science
and engineering to quantify uncertainty.
It is basically reflects the likelihood of an event or chance that a
particular event will occur.
Lt us denote the probability of an event A by P(A).
P(A) =
5
Axioms of Probability:

04/27/2025
• this is called addition rule of probability if A and B are not
mutually exclusive.
Joint Probability:

M V S Narayana
Joint Probability is defined as the probability of occurrence of two
independent events in conjunction.
P(A and B) = P(A) * P(B)
Conditional Probability:
It is defined as probability of the occurrence of an even H
(hypothesis) provided an event E (evidence) is known to has
occurred. 6
P(H|E) = P(H and E) / P( E )
=P(H) using joint probability.
• Joint probability distribution of n variables require 2n entries
with all possible combinations
Let us consider an example:
Given the probability of some event today “Sun is bright today”
P(BS_today)=0.6
P(BS_tomorrow|BS_today) =0.8

04/27/2025
Let A  Sun is bright today
B  Sun will be bright tomorrow

M V S Narayana
For this we can compute joint probability distribution for these
two propositions
P(A) = 0.6 , P(A’) = 0.4
P(B|A) = 0.8 , P(B’|A)=0.2
P(B|A’) = 0.6 , P(B’|A’) = 0.4
P(B,A)=0.48 ,P(B’,A) = 0.12 ,P(B,A’) = 0.24 ,P(B’,A’) = 0.16
7
Bayes’ Theorem:
Bayes’ theorem was developed by thomas Bayes in the year 1763.
This theorem provides a mathematical model for reasoning where prior beliefs are
combined with evidence to get estimates of uncertainty.
P(H|E) = P(E|H) * P(H) / P(E)
Where
P(H) is known as the prior probability of H.

04/27/2025
P(H|E) is known as the conditional probability of H given E
P(E|H) is known as conditional probability of E given H

M V S Narayana
P(E) is the prior probability of E and acts as a normalizing constant.
Extensions of Bayes’ Theorem one Hypothesis and Two Evidences:
P(H|E1 and E2) = P(E1 | H) * P(E2|H) * P(H) / P(E1 and E2)
One Hypothesis and Multiples Evidences:
Multiple Hypotheses and Single Evidence
P(Hi|E) = P(E|Hi) * P(Hi) /
Drawbacks : if there is n different propositions being considered this makes
using Bayes’ Theorem intractable.
8
• Too many probabilities have to be provided.
• It leads to large space required to store each probabilities.
• It increases time complexity to O(2n)
• In spite of drawback, Bayesian theory provides an
attractive basis for uncertain reasoning system. Several
mechanisms have been developed to utilize the power
of Bayes’ theory, and ease of its implementation.
 Bayesian Networks

04/27/2025
Certainty factor theory
Dempster-Shafer theory

M V S Narayana
9
Bayesian networks
Why would we use Bayesian networks?
There are two main reasons.:

04/27/2025
1. Bayesian theorem quickly becomes intractable to compute
probabilities using the joint distribution,

M V S Narayana
2. since the number of probabilities (2n) is exponential in the
number of variables (n). It is unnatural and tedious to
specify all the probabilities
To address these concerns, we’d like a more compact and
efficient way of representing the joint distribution.
One of the technique is Bayesian networks.
Bayesian network is a compact representation of the joint
distribution, and takes advantage of the unconditional and 10
conditional independence among the variables.
Components of a Bayesian network
A Bayesian network is a directed acyclic graph that represent causality
relationship among variables.
• Each node corresponds to a random variable.
• X is a parent of Y if there is an arrow from node X to node Y . X is an

04/27/2025
ancestor of Z and Z is a descendent of X if there is some path from X
to Z.

M V S Narayana
• Each node Xi has a conditional probability distribution P(Xi|
Parents(Xi)) that quantifies the effect of the parents on the node. A
node with no parents will only require a prior (unconditional)
probability.
• Representing the joint distribution:

11
In words, the joint probability is the product of the conditional
probability of each variable given its parents.
04/27/2025
M V S Narayana
Remember that to specify the full joint distribution, at least 26 − 1 = 63
probabilities are required.
Using Bayesian network, only 1 + 1 + 2 + 2 + 2 + 4 = 12 probabilities are
required to specify the joint distribution.
12
Bayesian Belief Network
Advantages and Disadvantages
Advantages:
• This model encodes dependencies among variables, it is easy

04/27/2025
to handle missing data entries.
• It can be used to learn causal relationships.

M V S Narayana
• It is an ideal representation for combining prior knowledge
and data probability semantics.
• It is easy to understand local joint probability distributions

13
Certainty Factors and
Rule-Based Systems
The Certainty Factor (CF) is a concept used in expert systems
and artificial intelligence to represent the degree of belief or

04/27/2025
confidence in a given fact or hypothesis. It helps handle
uncertainty in knowledge-based systems by assigning a
numerical value between -1 and 1, where:

M V S Narayana
• 1 means absolute certainty that a hypothesis is true.
• -1 means absolute certainty that a hypothesis is false.
• 0 means complete uncertainty or no belief in either direction.
The formula for combining multiple certainty factors is typically:

14
In rule-based systems, the Certainty Factor (CF) is used to
handle uncertainty when the system applies rules to make
decisions or inferences. Rules in these systems are typically of
the form:
• IF (condition) THEN (conclusion)
For example: Medical Diagnosis

04/27/2025
• Rule 1:
IF the patient has a sore throat, THEN the patient may have a

M V S Narayana
cold (CF = 0.6).
• Rule 2:
IF the patient has a runny nose, THEN the patient may have a
cold (CF = 0.7).
• If a patient has both a sore throat and a runny nose, the
system combines the certainty factors of the two rules:
• CFcombined=0.6+0.7×(1−∣0.6∣)= 0.88
15
Thus, the system is 88% confident that the patient has a cold.
Example 2: Fault Detection in a Car Engine
• A rule-based system is used to detect engine problems.
• Rule 1:
IF the engine is making a knocking sound, THEN the engine may have a
spark plug issue (CF = 0.8).
• Rule 2:

04/27/2025
IF the engine has difficulty starting, THEN the engine may have a spark
plug issue (CF = 0.5).
• If the engine exhibits both symptoms, the CFs are combined as follows:

M V S Narayana
• CFcombined=0.8+0.5×(1−∣0.8∣)=0.8+0.5×0.2=0.8+0.1=0.9
Thus, the system is 90% confident that that there is a spark plug issue.
How CF Helps in Rule-Based Systems
• Quantifying Uncertainty: CF allows rule-based systems to work with
partial confidence when evidence is uncertain or incomplete.
• Combining Evidence: When multiple rules apply to the same hypothesis,
the CFs from each rule are combined, improving the system’s ability to
weigh evidence and make better decisions.
By using certainty factors, rule-based systems can provide more nuanced 16
and reliable conclusions, even when dealing with uncertain data.
Dempster-Shafer theory
The Dempster-Shafer theory (also known as the Theory of Belief Functions or Evidence
Theory) is a mathematical framework used to model uncertainty and combine evidence
from different sources. It’s particularly useful in situations where probability theory may
not fully capture the uncertainty due to a lack of precise information.
Key Concepts:

04/27/2025
• Frame of Discernment: This is the set of all possible outcomes or hypotheses, just like
in probability theory. For example, if you're predicting weather, your frame could be
{Rain, No Rain}.
• Basic Belief Assignment (BBA) or Mass Function (m): Instead of directly assigning

M V S Narayana
probabilities to events, the theory assigns belief to sets of outcomes. This belief is
called a Basic Belief Assignment (BBA), and it represents the degree of belief that
some subset of outcomes is true. For each subset, the BBA value (mass) lies between 0
and 1, and the sum of all masses is 1. If no evidence supports any particular outcome,
the mass is assigned to the whole frame.
• If you believe it’s going to rain but aren't entirely sure, you might assign a mass to the
subset {Rain}, and some mass to the entire set {Rain, No Rain}, representing uncertainty.
• Belief (Bel) and Plausibility (Pl):
• Belief (Bel): This function measures the total belief committed to a subset. It's the sum of
the masses of all subsets that are entirely contained in that subset. 17
• Plausibility (Pl): This function measures the possibility that a subset is true. It's the sum of
the masses of all subsets that have a non-empty intersection with the subset in question.
These two measures create a range of uncertainty where:
• Bel(A) ≤ P(A) ≤ Pl(A) (where P is the probability of event A).
• Dempster’s Rule of Combination: This is a rule used to combine evidence from
multiple sources. When two independent sources of evidence give different
masses to subsets of the frame, Dempster’s rule updates the belief by
combining them. It discounts conflicting evidence and focuses on reinforcing
consistent beliefs.

04/27/2025
• For example, if you receive two pieces of evidence about the weather from
different sources, one saying “likely rain” and the other “likely rain but possibly
no rain,” Dempster's rule would help combine these into a new belief set

M V S Narayana
reflecting the consensus.
Why Use Dempster-Shafer Theory?
• Handling Uncertainty: Unlike probability theory, which requires precise
probabilities for every event, Dempster-Shafer allows you to express ignorance
and handle uncertainty more flexibly.
• Partial Evidence: It’s great when you have some evidence but not enough to
assign full confidence to a hypothesis.
• Combining Evidence: It's useful for combining evidence from multiple, possibly
conflicting, sources in a consistent way. 18
In a nutshell, the Dempster-Shafer theory offers a more flexible approach than
classical probability when you're dealing with uncertainty and incomplete
Fuzzy Logic:
Fuzzy logic is a concept introduced by Lotfi Zadeh in the 1960s to handle
reasoning with uncertainty and imprecision. Unlike classical logic, which deals
with absolute truth values (0 or 1), fuzzy logic allows for a range of truth values
between 0 and 1. This makes it well-suited for representing uncertain, vague,
or imprecise information.

04/27/2025
Fuzzy Sets:
In classical sets, an element either belongs to a set (1) or does not (0). Fuzzy
sets allow for partial membership, meaning an element can belong to a set to

M V S Narayana
a certain degree, with values ranging from 0 to 1. For example, in a fuzzy set of
"tall people," someone can be considered 0.8 "tall," depending on the context.
A Fuzzy set is a set whose elements have degrees of membership. Fuzzy sets
are an extension of the classical notion of set (known as a Crisp Set).
More mathematically, a fuzzy set is a pair (A, µA) where A is a set and µA : A →
[0, 1]. For all x ∈ A, µA(x) is called the grade of membership of x.
membership function defines the degree of truth (or membership) for
elements in a fuzzy set. It maps each element to a value between 0 and 1, 19
determining how much an element belongs to the fuzzy set. For instance, the
membership function for "hot temperature" could assign 0.6 to 30°C and 0.9
to 40°C, indicating their degree of "hotness."
Linguistic Variables
• These are variables that take on linguistic values rather than
numeric ones. For example, "temperature" can be a linguistic
variable, with values like "cold," "warm," and "hot." These
linguistic values are represented as fuzzy sets, which allow for

04/27/2025
smooth transitions between categories.
For example, if age is interpreted as a linguistic variable, then its
term-set T(·), (that is, the set of its linguistic values) might be

M V S Narayana
T(age) = baby, teenager , young, old, very young, not young, very
old , . . .
Fuzzy Operators
• Fuzzy logic uses modified logical operators like AND, OR, and
NOT. Instead of strict Boolean logic, these operators are
adapted for fuzzy logic:
• AND: Takes the minimum value between two truth values.
20
• OR: Takes the maximum value between two truth values.
• NOT: Subtracts the truth value from 1.
Fuzzy Inference System (FIS)
• Fuzzy inference is the process of mapping inputs to outputs
using fuzzy logic. A Fuzzy Inference System (FIS) uses a set of
fuzzy rules ("If-Then" rules) to make decisions. For example:
• Rule: If the temperature is "high" AND the humidity is "low,"

04/27/2025
then the fan speed is "fast."
These rules are evaluated using fuzzy operators and
membership functions to infer conclusions.

M V S Narayana
Example : Consider the problem of controlling an air-conditioner.
The rules that are used to control the air conditioner can be
expressed as a cross product:
Control = Temperature × Speed
Where the set of linguistic values of the term sets is given as
Temperature = Cold + Cool + Pleasant + Warm + Hot
Speed = Minimal + Slow + Medium + Fast + Blast 21
M V S Narayana 04/27/2025
22
Now, for our fuzzification, we consider that the temperature is
16◦C and we want our knowledge base to compute the speed. The
fuzzification of the crisp temperature gives the following
membership for the Temperature fuzzy set:

04/27/2025
M V S Narayana
Inference: Consider that the temperature is 16◦ and we want our knowledge base
to compute the speed. Rules 2 and 3 are firing and are essentially the fuzzy
patches made out of the cross products of
Cool × Slow
Pleasant × Medium 23
Defuzzification:
Since fuzzy logic operates with fuzzy sets and degrees of truth,
the final output of a system is typically a fuzzy value.
Defuzzification is the process of converting this fuzzy output
into a crisp, clear result (a single number or category) that can
be used in decision-making.

04/27/2025
Common de-fuzzification methods include:
Centroid method: Finds the center of gravity of the fuzzy set.

M V S Narayana
Max-membership method: Takes the value with the highest
membership degree.
Applications
Fuzzy logic is widely used in areas where precise decision-
making is difficult due to ambiguity or complexity, such as:
• Control systems (e.g., washing machines, air conditioners)
• AI decision-making and expert systems
• Medical diagnosis 24

• Stock market analysis

You might also like