SlideShare a Scribd company logo
Artificial Intelligence – CS364
Fuzzy Logic
Fuzzy logic
The word "fuzzy" means "vagueness". Fuzziness occurs
when the boundary of a piece of information is not clear-
cut.
• Fuzzy sets have been introduced by Lotfi A. Zadeh
(1965) as an extension of the classical notion of set.
• Classical set theory allows the membership of the
elements in the set in binary terms, a bivalent condition -
an element either belongs or does not belong to the set.
Fuzzy set theory permits the gradual assessment of the
membership of elements in a set, described with the aid of
a membership function valued in the real unit interval [0,
1].
Artificial Intelligence – CS364
Fuzzy Logic
Fuzzy set Theory
• Example: Words like young, tall, good, or high are fuzzy.
− There is no single quantitative value which defines the
term young. −
• For some people, age 25 is young, and for others, age 35
is young. − The concept young has no clean boundary. −
Age 1 is definitely young and age 100 is definitely not
young; − Age 35 has some possibility of being young and
usually depends on the context in which it is being
considered
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
In real world, there exists much fuzzy knowledge;
Knowledge that is vague, imprecise, uncertain,
ambiguous, inexact, or probabilistic in nature.
Human thinking and reasoning frequently involve
fuzzy information, originating from inherently
inexact human concepts. Humans, can give
satisfactory answers, which are probably true.
However, our systems are unable to answer many
questions. The reason is, most systems are
designed based upon classical set theory and two-
valued logic which is unable to cope with
unreliable and incomplete information and give
expert opinions.
Artificial Intelligence – CS364
Fuzzy Logic
Fuzzy logic
Fuzzy logic is determined as a set of mathematical principles for knowledge
representation based on degree of member ship functions rather than on
crisp membership function of classical binary logic
Fuzzy logic reflects how people think . It attempts to model our sense of
words ,our decision making and our common sense.
Unlike two valued Boolean logic, fuzzy logic is multi-valued . It deals with
degree of membership and degrees of truth.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Contents
• Fuzzy set-A fuzzy set is simply defined as a set with fuzzy
boundaries.
• a membership function for a fuzzy set A on the universe
of discourse X is defined as µA:X → [0,1], where each
element of X is mapped to a value between 0 and 1. This
value, called membership value or degree of membership,
quantifies the grade of membership of the element in X to
the fuzzy set A.
• Membership functions allow us to graphically represent a
fuzzy set. The x axis represents the universe of discourse,
whereas the y axis represents the degrees of membership in
the [0,1] interval.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Characteristics of Fuzzy Sets
• The classical set theory developed in the late 19th century
by Georg Cantor describes how crisp sets can interact.
These interactions are called operations.
• Also fuzzy sets have well defined properties.
• These properties and operations are the basis on which the
fuzzy sets are used to deal with uncertainty on the one
hand and to represent knowledge on the other.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Note: Membership Functions
• For the sake of convenience, usually a fuzzy set is denoted
as:
A = A(xi)/xi + …………. + A(xn)/xn
where A(xi)/xi (a singleton) is a pair “grade of
membership” element, that belongs to a finite universe of
discourse:
A = {x1, x2, .., xn}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Example to represent fuzzy set
(i) ‘Definitely tall’ may be represented as ‘tallness having value 1’
(ii) ‘Not at all tall’ may be represented as ‘Tallness having value 0’
(iii) ‘A little bit tall’ may be represented as ‘tallness having value say .2’.
(iv) ‘Slightly tall’ may be represented as ‘tallness having value say .4’.
(v) ‘Reasonably tall’ may be represented as ‘tallness having value say .7’.
and so on.
Similarly, the values of other concepts or, rather, other linguistic variables like sweet,
good, beautiful, etc. may be considered in terms of real numbers between 0 and 1.
Coming back to the imprecise concept of tall, let us think of five male persons of an
organisation, viz., Mohan, Sohan, John, Abdul, Abrahm, with heights 5' 2”, 6' 4”, 5' 9”,
4' 8”, 5' 6” respectively.
Then had we talked only of crisp set of tall persons, we would have denoted the Set of
tall persons in the organisation = {Sohan}
But, a fuzzy set, representing tall persons, include all the persons alongwith respective
degrees of tallness. Thus, in terms of fuzzy sets, we write:
Tall = {Mohan/.2; Sohan/1; John/.7; Abdul/0; Abrahm/.4}.
The values .2, 1, .7, 0, .4 are called membership values or degrees: Note:
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Relation
Relation on fuzzy sets refers to a way of associating elements
from one fuzzy set with elements from another fuzzy set. This
concept extends the idea of relations from classical set theory to
accommodate the notion of degrees of membership in fuzzy
sets.
A fuzzy relation R between two fuzzy sets A and B is defined
by a set of ordered pairs (x,y,μR​(x,y)), where x is an element
from A, y is an element from B, and μR​(x,y) is a membership
function indicating the degree to which x is related to y in the
fuzzy relation R.
In other words, the membership function μR​(x,y) assigns a
degree of membership to the pair (x,y) in the fuzzy relation R.
This degree of membership can be interpreted as the strength or
degree of the relationship between x and y.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Operations of Fuzzy Sets
Intersection Union
Complement
Not A
A
Containment
A
A
B
B
A B
A
A B
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Operations :-
Fuzzy relations, like crisp relations, can undergo various operations that
involve combining, modifying, or analyzing these relations. Here are
some common operations on fuzzy relations:
Max-Min Composition:
Union
Intersection
Compliment
Containment
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Complement
• Crisp Sets: Who does not belong to the set?
• Fuzzy Sets: How much do elements not belong to the set?
• The complement of a set is an opposite of this set. For
example, if we have the set of tall men, its complement is
the set of NOT tall men. When we remove the tall men set
from the universe of discourse, we obtain the complement.
• If A is the fuzzy set, its complement A can be found as
follows:
A(x) = 1  A(x)
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Containment
• Crisp Sets: Which sets belong to which other sets?
• Fuzzy Sets: Which sets belong to other sets?
• Similar to a Chinese box, a set can contain other sets. The
smaller set is called the subset. For example, the set of tall
men contains all tall men; very tall men is a subset of tall
men. However, the tall men set is just a subset of the set of
men. In crisp sets, all elements of a subset entirely belong
to a larger set. In fuzzy sets, however, each element can
belong less to the subset than to the larger set. Elements of
the fuzzy subset have smaller memberships in it than in the
larger set.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Intersection
• Crisp Sets: Which element belongs to both sets?
• Fuzzy Sets: How much of the element is in both sets?
• In classical set theory, an intersection between two sets contains the
elements shared by these sets. For example, the intersection of the set
of tall men and the set of fat men is the area where these sets overlap.
In fuzzy sets, an element may partly belong to both sets with different
memberships.
• A fuzzy intersection is the lower membership in both sets of each
element. The fuzzy intersection of two fuzzy sets A and B on universe
of discourse X:
AB(x) = min [A(x), B(x)] = A(x)  B(x),
where xX
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Union
• Crisp Sets: Which element belongs to either set?
• Fuzzy Sets: How much of the element is in either set?
• The union of two crisp sets consists of every element that falls into
either set. For example, the union of tall men and fat men contains all
men who are tall OR fat.
• In fuzzy sets, the union is the reverse of the intersection. That is, the
union is the largest membership value of the element in either set.
The fuzzy operation for forming the union of two fuzzy sets A and B
on universe X can be given as:
AB(x) = max [A(x), B(x)] = A(x)  B(x),
where xX
Artificial Intelligence – CS364
Fuzzy Logic
Max Min Composition
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Operations of Fuzzy Sets
Complement
0
x
1
(x)
0
x
1
Containment
0
x
1
0
x
1
A B
Not A
A
Intersection
0
x
1
0
x
A B
Union
0
1
A B

A B

0
x
1
0
x
1
B
A
B
A
(x)
(x) (x)
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Properties of Fuzzy Sets
• Equality of two fuzzy sets
• Inclusion of one set into another fuzzy set
• Cardinality of a fuzzy set
• An empty fuzzy set
• -cuts (alpha-cuts)
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Equality
• Fuzzy set A is considered equal to a fuzzy set B, IF AND
ONLY IF (iff):
A(x) = B(x), xX
A = 0.3/1 + 0.5/2 + 1/3
B = 0.3/1 + 0.5/2 + 1/3
therefore A = B
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Inclusion
• Inclusion of one fuzzy set into another fuzzy set. Fuzzy set
A  X is included in (is a subset of) another fuzzy set, B 
X:
A(x)  B(x), xX
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
then A is a subset of B, or A  B
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Cardinality
• Cardinality of a non-fuzzy set, Z, is the number of elements in Z. BUT
the cardinality of a fuzzy set A, the so-called SIGMA COUNT, is
expressed as a SUM of the values of the membership function of A,
A(x):
cardA = A(x1) + A(x2) + … A(xn) = ΣA(xi), for i=1..n
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
cardA = 1.8
cardB = 2.05
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Empty Fuzzy Set
• A fuzzy set A is empty, IF AND ONLY IF:
A(x) = 0, xX
Consider X = {1, 2, 3} and set A
A = 0/1 + 0/2 + 0/3
then A is empty
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Alpha-cut
• An -cut or -level set of a fuzzy set A  X is an ORDINARY SET
A  X, such that:
A={A(x), xX}.
Consider X = {1, 2, 3} and set A
A = 0.3/1 + 0.5/2 + 1/3
then A0.5 = {2, 3},
A0.1 = {1, 2, 3},
A1 = {3}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Set Normality
• A fuzzy subset of X is called normal if there exists at least one
element xX such that A(x) = 1.
• A fuzzy subset that is not normal is called subnormal.
• All crisp subsets except for the null set are normal. In fuzzy set theory,
the concept of nullness essentially generalises to subnormality.
• The height of a fuzzy subset A is the large membership grade of an
element in A
height(A) = maxx(A(x))
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Core and Support
• Assume A is a fuzzy subset of X:
• the support of A is the crisp subset of X consisting of all
elements with membership grade:
supp(A) = {x A(x)  0 and xX}
• the core of A is the crisp subset of X consisting of all
elements with membership grade:
core(A) = {x A(x) = 1 and xX}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Set Math Operations
• aA = {aA(x), xX}
Let a =0.5, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}
then
Aa = {0.25/a, 0.15/b, 0.1/c, 0.5/d}
• Aa = {A(x)a, xX}
Let a =2, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}
then
Aa = {0.25/a, 0.09/b, 0.04/c, 1/d}
• …
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Examples
• Consider two fuzzy subsets of the set X,
X = {a, b, c, d, e }
referred to as A and B
A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}
and
B = {0.6/a, 0.9/b, 0.1/c, 0.3/d, 0.2/e}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Examples
• Support:
supp(A) = {a, b, c, d }
supp(B) = {a, b, c, d, e }
• Core:
core(A) = {a}
core(B) = {o}
• Cardinality:
card(A) = 1+0.3+0.2+0.8+0 = 2.3
card(B) = 0.6+0.9+0.1+0.3+0.2 = 2.1
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Examples
• Complement:
A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}
A = {0/a, 0.7/b, 0.8/c 0.2/d, 1/e}
• Union:
A  B = {1/a, 0.9/b, 0.2/c, 0.8/d, 0.2/e}
• Intersection:
A  B = {0.6/a, 0.3/b, 0.1/c, 0.3/d, 0/e}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Examples
• aA:
for a=0.5
aA = {0.5/a, 0.15/b, 0.1/c, 0.4/d, 0/e}
• Aa:
for a=2
Aa = {1/a, 0.09/b, 0.04/c, 0.64/d, 0/e}
• a-cut:
A0.2 = {a, b, c, d}
A0.3 = {a, b, d}
A0.8 = {a, d}
A1 = {a}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Rules
• In 1973, Lotfi Zadeh published his second most influential paper. This
paper outlined a new approach to analysis of complex systems, in
which Zadeh suggested capturing human knowledge in fuzzy rules.
• A fuzzy rule can be defined as a conditional statement in the form:
IF x is A
THEN y is B
• where x and y are linguistic variables; and A and B are linguistic values
determined by fuzzy sets on the universe of discourses X and Y,
respectively.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Classical Vs Fuzzy Rules
• A classical IF-THEN rule uses binary logic, for example,
Rule: 1 Rule: 2
IF speed is > 100 IF speed is < 40
THEN stopping_distance is long THEN stopping_distance is short
• The variable speed can have any numerical value between 0 and 220
km/h, but the linguistic variable stopping_distance can take either
value long or short. In other words, classical rules are expressed in the
black-and-white language of Boolean logic.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Classical Vs Fuzzy Rules
• We can also represent the stopping distance rules in a fuzzy form:
Rule: 1 Rule: 2
IF speed is fast IF speed is slow
THEN stopping_distance is long THEN stopping_distance is short
• In fuzzy rules, the linguistic variable speed also has the range (the
universe of discourse) between 0 and 220 km/h, but this range includes
fuzzy sets, such as slow, medium and fast. The universe of discourse
of the linguistic variable stopping_distance can be between 0 and 300
m and may include such fuzzy sets as short, medium and long.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Classical Vs Fuzzy Rules
• Fuzzy rules relate fuzzy sets.
• In a fuzzy system, all rules fire to some extent, or in other
words they fire partially. If the antecedent is true to some
degree of membership, then the consequent is also true to
that same degree.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
DEFINITIONS
A. Definitions
1. Sets
a. Classical sets – either an element belongs to the set or it
does not. For example, for the set of integers, either an
integer is even or it is not (it is odd). However, either you
are in the USA or you are not. What about flying into
USA, what happens as you are crossing? Another example
is for black and white photographs, one cannot say either a
pixel is white or it is black. However, when you digitize a
b/w figure, you turn all the b/w and gray scales into 256
discrete tones.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Classical sets
Classical sets are also called crisp (sets).
Lists: A = {apples, oranges, cherries, mangoes}
A = {a1,a2,a3 }
A = {2, 4, 6, 8, …}
Formulas: A = {x | x is an even natural number}
A = {x | x = 2n, n is a natural number}
Membership or characteristic function











A
x
A
x
x
A if
0
if
1
)
(
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Definitions – fuzzy sets
b. Fuzzy sets – admits gradation such as all tones between
black and white. A fuzzy set has a graphical description
that expresses how the transition from one to another takes
place. This graphical description is called a membership
function.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Definitions – fuzzy sets
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Definitions: Fuzzy Sets ()
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Membership functions (figure from Klir&Yuan)
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Firing Fuzzy Rules
• A fuzzy rule can have multiple antecedents, for example:
IF project_duration is long
AND project_staffing is large
AND project_funding is inadequate
THEN risk is high
IF service is excellent
OR food is delicious
THEN tip is generous
• The consequent of a fuzzy rule can also include multiple parts, for
instance:
IF temperature is hot
THEN hot_water is reduced;
cold_water is increased
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Example
• Air-conditioning involves the delivery of air which can be warmed or
cooled and have its humidity raised or lowered.
• An air-conditioner is an apparatus for controlling, especially lowering,
the temperature and humidity of an enclosed space. An air-conditioner
typically has a fan which blows/cools/circulates fresh air and has
cooler and the cooler is under thermostatic control. Generally, the
amount of air being compressed is proportional to the ambient
temperature.
• Consider Johnny’s air-conditioner which has five control switches:
COLD, COOL, PLEASANT, WARM and HOT. The corresponding
speeds of the motor controlling the fan on the air-conditioner has the
graduations: MINIMAL, SLOW, MEDIUM, FAST and BLAST.
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Example
• The rules governing the air-conditioner are as follows:
RULE 1:
IF TEMP is COLD THEN SPEED is MINIMAL
RULE 2:
IF TEMP is COOL THEN SPEED is SLOW
RULE 3:
IF TEMP is PLEASANT THEN SPEED is MEDIUM
RULE 4:
IF TEMP is WARM THEN SPEED is FAST
RULE 5:
IF TEMP is HOT THEN SPEED is BLAST
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Example
The temperature graduations are
related to Johnny’s perception of
ambient temperatures.
where:
Y : temp value belongs to the set
(0<A(x)<1)
Y* : temp value is the ideal member to
the set (A(x)=1)
N : temp value is not a member of the
set (A(x)=0)
Temp
(0C).
COLD COOL PLEASANT WARM HOT
0 Y* N N N N
5 Y Y N N N
10 Y Y N N N
12.5 N Y* N N N
15 N Y N N N
17.5 N N Y* N N
20 N N N Y N
22.5 N N N Y* N
25 N N N Y N
27.5 N N N N Y
30 N N N N Y*
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Fuzzy Sets Example
Johnny’s perception of the speed of the
motor is as follows:
where:
Y : temp value belongs to the set
(0<A(x)<1)
Y* : temp value is the ideal member to
the set (A(x)=1)
N : temp value is not a member of the
set (A(x)=0)
Rev/sec
(RPM)
MINIMAL SLOW MEDIUM FAST BLAST
0 Y* N N N N
10 Y N N N N
20 Y Y N N N
30 N Y* N N N
40 N Y N N N
50 N N Y* N N
60 N N N Y N
70 N N N Y* N
80 N N N Y Y
90 N N N N Y
100 N N N N Y*
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Exercises
For
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Draw the Fuzzy Graph of A and B
Then, calculate the following:
- Support, Core, Cardinality, and Complement for A and B
independently
- Union and Intersection of A and B
- the new set C, if C = A2
- the new set D, if D = 0.5 B
- the new set E, for an alpha cut at A0.5
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Solutions
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Support
Supp(A) = {a, b, c, d}
Supp(B) = {b, c, d, e}
Core
Core(A) = {c}
Core(B) = {}
Cardinality
Card(A) = 0.2 + 0.4 + 1 + 0.8 + 0 = 2.4
Card(B) = 0 + 0.9 + 0.3 + 0.2 + 0.1 = 1.5
Complement
Comp(A) = {0.8/a, 0.6/b, 0/c, 0.2/d, 1/e}
Comp(B) = {1/a, 0.1/b, 0.7/c, 0.8/d, 0.9/e}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Solutions
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Union
A B = {0.2/a, 0.9/b, 1/c, 0.8/d, 0.1/e}
Intersection
A B = {0/a, 0.4/b, 0.3/c, 0.2/d, 0/e}
C=A2
C = {0.04/a, 0.16/b, 1/c, 0.64/d, 0/e}
D = 0.5 B
D = {0/a, 0.45/b, 0.15/c, 0.1/d, 0.05/e}
E = A0.5
E = {c, d}
Artificial Intelligence – CS364
Fuzzy Logic
12/28/2023
Closing
• Questions???
• Remarks???
• Comments!!!
• Evaluation!

More Related Content

Similar to 23 fuzzy lecture ppt basics- new 23.ppt

Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptx
ImXaib
 
FuzzySet.pptx
FuzzySet.pptxFuzzySet.pptx
FuzzySet.pptx
ArunaDevi63
 
8709508
87095088709508
8709508
Fahrul Cool
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th Sem
DigiGurukul
 
Fuzzy.pptx
Fuzzy.pptxFuzzy.pptx
Fuzzy.pptx
ssuser3df5e2
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptx
PoonamKumarSharma
 
The Fuzzy Logical Databases
The Fuzzy Logical DatabasesThe Fuzzy Logical Databases
The Fuzzy Logical Databases
AlaaZ
 
Fuzzy logic by zaid da'ood
Fuzzy logic by zaid da'oodFuzzy logic by zaid da'ood
Fuzzy logic by zaid da'ood
master student
 
Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
Purnima Pandit
 
fuzzy logic
fuzzy logicfuzzy logic
fuzzy logic
Anmol Bagga
 
Presentation2 Fl
Presentation2 FlPresentation2 Fl
Presentation2 Fl
anshul parmar
 
Resources
ResourcesResources
Resources
butest
 
Fuzzy logic1
Fuzzy logic1Fuzzy logic1
Fuzzy logic1
Nateshwar Kamlesh
 
Fuzzy
FuzzyFuzzy
Soft computing Chapter 1
Soft computing Chapter 1Soft computing Chapter 1
Soft computing Chapter 1
Dr.Ashvini Chaudhari Bhongade
 
fuzzy
fuzzyfuzzy
Classical and Fuzzy Relations
Classical and Fuzzy RelationsClassical and Fuzzy Relations
Classical and Fuzzy Relations
Musfirah Malik
 
MemFunc.doc
MemFunc.docMemFunc.doc
MemFunc.doc
butest
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
Nateshwar Kamlesh
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
Ritu Bafna
 

Similar to 23 fuzzy lecture ppt basics- new 23.ppt (20)

Fuzzy Logic.pptx
Fuzzy Logic.pptxFuzzy Logic.pptx
Fuzzy Logic.pptx
 
FuzzySet.pptx
FuzzySet.pptxFuzzySet.pptx
FuzzySet.pptx
 
8709508
87095088709508
8709508
 
Fuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th SemFuzzy logic Notes AI CSE 8th Sem
Fuzzy logic Notes AI CSE 8th Sem
 
Fuzzy.pptx
Fuzzy.pptxFuzzy.pptx
Fuzzy.pptx
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptx
 
The Fuzzy Logical Databases
The Fuzzy Logical DatabasesThe Fuzzy Logical Databases
The Fuzzy Logical Databases
 
Fuzzy logic by zaid da'ood
Fuzzy logic by zaid da'oodFuzzy logic by zaid da'ood
Fuzzy logic by zaid da'ood
 
Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
 
fuzzy logic
fuzzy logicfuzzy logic
fuzzy logic
 
Presentation2 Fl
Presentation2 FlPresentation2 Fl
Presentation2 Fl
 
Resources
ResourcesResources
Resources
 
Fuzzy logic1
Fuzzy logic1Fuzzy logic1
Fuzzy logic1
 
Fuzzy
FuzzyFuzzy
Fuzzy
 
Soft computing Chapter 1
Soft computing Chapter 1Soft computing Chapter 1
Soft computing Chapter 1
 
fuzzy
fuzzyfuzzy
fuzzy
 
Classical and Fuzzy Relations
Classical and Fuzzy RelationsClassical and Fuzzy Relations
Classical and Fuzzy Relations
 
MemFunc.doc
MemFunc.docMemFunc.doc
MemFunc.doc
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy Logic ppt
Fuzzy Logic pptFuzzy Logic ppt
Fuzzy Logic ppt
 

Recently uploaded

Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 

Recently uploaded (20)

Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 

23 fuzzy lecture ppt basics- new 23.ppt

  • 1. Artificial Intelligence – CS364 Fuzzy Logic Fuzzy logic The word "fuzzy" means "vagueness". Fuzziness occurs when the boundary of a piece of information is not clear- cut. • Fuzzy sets have been introduced by Lotfi A. Zadeh (1965) as an extension of the classical notion of set. • Classical set theory allows the membership of the elements in the set in binary terms, a bivalent condition - an element either belongs or does not belong to the set. Fuzzy set theory permits the gradual assessment of the membership of elements in a set, described with the aid of a membership function valued in the real unit interval [0, 1].
  • 2. Artificial Intelligence – CS364 Fuzzy Logic Fuzzy set Theory • Example: Words like young, tall, good, or high are fuzzy. − There is no single quantitative value which defines the term young. − • For some people, age 25 is young, and for others, age 35 is young. − The concept young has no clean boundary. − Age 1 is definitely young and age 100 is definitely not young; − Age 35 has some possibility of being young and usually depends on the context in which it is being considered 12/28/2023
  • 3. Artificial Intelligence – CS364 Fuzzy Logic In real world, there exists much fuzzy knowledge; Knowledge that is vague, imprecise, uncertain, ambiguous, inexact, or probabilistic in nature. Human thinking and reasoning frequently involve fuzzy information, originating from inherently inexact human concepts. Humans, can give satisfactory answers, which are probably true. However, our systems are unable to answer many questions. The reason is, most systems are designed based upon classical set theory and two- valued logic which is unable to cope with unreliable and incomplete information and give expert opinions.
  • 4. Artificial Intelligence – CS364 Fuzzy Logic Fuzzy logic Fuzzy logic is determined as a set of mathematical principles for knowledge representation based on degree of member ship functions rather than on crisp membership function of classical binary logic Fuzzy logic reflects how people think . It attempts to model our sense of words ,our decision making and our common sense. Unlike two valued Boolean logic, fuzzy logic is multi-valued . It deals with degree of membership and degrees of truth.
  • 5. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Contents • Fuzzy set-A fuzzy set is simply defined as a set with fuzzy boundaries. • a membership function for a fuzzy set A on the universe of discourse X is defined as µA:X → [0,1], where each element of X is mapped to a value between 0 and 1. This value, called membership value or degree of membership, quantifies the grade of membership of the element in X to the fuzzy set A. • Membership functions allow us to graphically represent a fuzzy set. The x axis represents the universe of discourse, whereas the y axis represents the degrees of membership in the [0,1] interval.
  • 6. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Characteristics of Fuzzy Sets • The classical set theory developed in the late 19th century by Georg Cantor describes how crisp sets can interact. These interactions are called operations. • Also fuzzy sets have well defined properties. • These properties and operations are the basis on which the fuzzy sets are used to deal with uncertainty on the one hand and to represent knowledge on the other.
  • 7. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Note: Membership Functions • For the sake of convenience, usually a fuzzy set is denoted as: A = A(xi)/xi + …………. + A(xn)/xn where A(xi)/xi (a singleton) is a pair “grade of membership” element, that belongs to a finite universe of discourse: A = {x1, x2, .., xn}
  • 8. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Example to represent fuzzy set (i) ‘Definitely tall’ may be represented as ‘tallness having value 1’ (ii) ‘Not at all tall’ may be represented as ‘Tallness having value 0’ (iii) ‘A little bit tall’ may be represented as ‘tallness having value say .2’. (iv) ‘Slightly tall’ may be represented as ‘tallness having value say .4’. (v) ‘Reasonably tall’ may be represented as ‘tallness having value say .7’. and so on. Similarly, the values of other concepts or, rather, other linguistic variables like sweet, good, beautiful, etc. may be considered in terms of real numbers between 0 and 1. Coming back to the imprecise concept of tall, let us think of five male persons of an organisation, viz., Mohan, Sohan, John, Abdul, Abrahm, with heights 5' 2”, 6' 4”, 5' 9”, 4' 8”, 5' 6” respectively. Then had we talked only of crisp set of tall persons, we would have denoted the Set of tall persons in the organisation = {Sohan} But, a fuzzy set, representing tall persons, include all the persons alongwith respective degrees of tallness. Thus, in terms of fuzzy sets, we write: Tall = {Mohan/.2; Sohan/1; John/.7; Abdul/0; Abrahm/.4}. The values .2, 1, .7, 0, .4 are called membership values or degrees: Note:
  • 9. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Relation Relation on fuzzy sets refers to a way of associating elements from one fuzzy set with elements from another fuzzy set. This concept extends the idea of relations from classical set theory to accommodate the notion of degrees of membership in fuzzy sets. A fuzzy relation R between two fuzzy sets A and B is defined by a set of ordered pairs (x,y,μR​(x,y)), where x is an element from A, y is an element from B, and μR​(x,y) is a membership function indicating the degree to which x is related to y in the fuzzy relation R. In other words, the membership function μR​(x,y) assigns a degree of membership to the pair (x,y) in the fuzzy relation R. This degree of membership can be interpreted as the strength or degree of the relationship between x and y.
  • 10. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 11. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Operations of Fuzzy Sets Intersection Union Complement Not A A Containment A A B B A B A A B
  • 12. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 13. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Operations :- Fuzzy relations, like crisp relations, can undergo various operations that involve combining, modifying, or analyzing these relations. Here are some common operations on fuzzy relations: Max-Min Composition: Union Intersection Compliment Containment
  • 14. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 15. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Complement • Crisp Sets: Who does not belong to the set? • Fuzzy Sets: How much do elements not belong to the set? • The complement of a set is an opposite of this set. For example, if we have the set of tall men, its complement is the set of NOT tall men. When we remove the tall men set from the universe of discourse, we obtain the complement. • If A is the fuzzy set, its complement A can be found as follows: A(x) = 1  A(x)
  • 16. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Containment • Crisp Sets: Which sets belong to which other sets? • Fuzzy Sets: Which sets belong to other sets? • Similar to a Chinese box, a set can contain other sets. The smaller set is called the subset. For example, the set of tall men contains all tall men; very tall men is a subset of tall men. However, the tall men set is just a subset of the set of men. In crisp sets, all elements of a subset entirely belong to a larger set. In fuzzy sets, however, each element can belong less to the subset than to the larger set. Elements of the fuzzy subset have smaller memberships in it than in the larger set.
  • 17. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Intersection • Crisp Sets: Which element belongs to both sets? • Fuzzy Sets: How much of the element is in both sets? • In classical set theory, an intersection between two sets contains the elements shared by these sets. For example, the intersection of the set of tall men and the set of fat men is the area where these sets overlap. In fuzzy sets, an element may partly belong to both sets with different memberships. • A fuzzy intersection is the lower membership in both sets of each element. The fuzzy intersection of two fuzzy sets A and B on universe of discourse X: AB(x) = min [A(x), B(x)] = A(x)  B(x), where xX
  • 18. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Union • Crisp Sets: Which element belongs to either set? • Fuzzy Sets: How much of the element is in either set? • The union of two crisp sets consists of every element that falls into either set. For example, the union of tall men and fat men contains all men who are tall OR fat. • In fuzzy sets, the union is the reverse of the intersection. That is, the union is the largest membership value of the element in either set. The fuzzy operation for forming the union of two fuzzy sets A and B on universe X can be given as: AB(x) = max [A(x), B(x)] = A(x)  B(x), where xX
  • 19. Artificial Intelligence – CS364 Fuzzy Logic Max Min Composition 12/28/2023
  • 20. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Operations of Fuzzy Sets Complement 0 x 1 (x) 0 x 1 Containment 0 x 1 0 x 1 A B Not A A Intersection 0 x 1 0 x A B Union 0 1 A B  A B  0 x 1 0 x 1 B A B A (x) (x) (x)
  • 21. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 22. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 23. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023
  • 24. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Properties of Fuzzy Sets • Equality of two fuzzy sets • Inclusion of one set into another fuzzy set • Cardinality of a fuzzy set • An empty fuzzy set • -cuts (alpha-cuts)
  • 25. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Equality • Fuzzy set A is considered equal to a fuzzy set B, IF AND ONLY IF (iff): A(x) = B(x), xX A = 0.3/1 + 0.5/2 + 1/3 B = 0.3/1 + 0.5/2 + 1/3 therefore A = B
  • 26. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Inclusion • Inclusion of one fuzzy set into another fuzzy set. Fuzzy set A  X is included in (is a subset of) another fuzzy set, B  X: A(x)  B(x), xX Consider X = {1, 2, 3} and sets A and B A = 0.3/1 + 0.5/2 + 1/3; B = 0.5/1 + 0.55/2 + 1/3 then A is a subset of B, or A  B
  • 27. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Cardinality • Cardinality of a non-fuzzy set, Z, is the number of elements in Z. BUT the cardinality of a fuzzy set A, the so-called SIGMA COUNT, is expressed as a SUM of the values of the membership function of A, A(x): cardA = A(x1) + A(x2) + … A(xn) = ΣA(xi), for i=1..n Consider X = {1, 2, 3} and sets A and B A = 0.3/1 + 0.5/2 + 1/3; B = 0.5/1 + 0.55/2 + 1/3 cardA = 1.8 cardB = 2.05
  • 28. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Empty Fuzzy Set • A fuzzy set A is empty, IF AND ONLY IF: A(x) = 0, xX Consider X = {1, 2, 3} and set A A = 0/1 + 0/2 + 0/3 then A is empty
  • 29. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Alpha-cut • An -cut or -level set of a fuzzy set A  X is an ORDINARY SET A  X, such that: A={A(x), xX}. Consider X = {1, 2, 3} and set A A = 0.3/1 + 0.5/2 + 1/3 then A0.5 = {2, 3}, A0.1 = {1, 2, 3}, A1 = {3}
  • 30. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Set Normality • A fuzzy subset of X is called normal if there exists at least one element xX such that A(x) = 1. • A fuzzy subset that is not normal is called subnormal. • All crisp subsets except for the null set are normal. In fuzzy set theory, the concept of nullness essentially generalises to subnormality. • The height of a fuzzy subset A is the large membership grade of an element in A height(A) = maxx(A(x))
  • 31. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Core and Support • Assume A is a fuzzy subset of X: • the support of A is the crisp subset of X consisting of all elements with membership grade: supp(A) = {x A(x)  0 and xX} • the core of A is the crisp subset of X consisting of all elements with membership grade: core(A) = {x A(x) = 1 and xX}
  • 32. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Set Math Operations • aA = {aA(x), xX} Let a =0.5, and A = {0.5/a, 0.3/b, 0.2/c, 1/d} then Aa = {0.25/a, 0.15/b, 0.1/c, 0.5/d} • Aa = {A(x)a, xX} Let a =2, and A = {0.5/a, 0.3/b, 0.2/c, 1/d} then Aa = {0.25/a, 0.09/b, 0.04/c, 1/d} • …
  • 33. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Examples • Consider two fuzzy subsets of the set X, X = {a, b, c, d, e } referred to as A and B A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e} and B = {0.6/a, 0.9/b, 0.1/c, 0.3/d, 0.2/e}
  • 34. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Examples • Support: supp(A) = {a, b, c, d } supp(B) = {a, b, c, d, e } • Core: core(A) = {a} core(B) = {o} • Cardinality: card(A) = 1+0.3+0.2+0.8+0 = 2.3 card(B) = 0.6+0.9+0.1+0.3+0.2 = 2.1
  • 35. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Examples • Complement: A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e} A = {0/a, 0.7/b, 0.8/c 0.2/d, 1/e} • Union: A  B = {1/a, 0.9/b, 0.2/c, 0.8/d, 0.2/e} • Intersection: A  B = {0.6/a, 0.3/b, 0.1/c, 0.3/d, 0/e}
  • 36. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Examples • aA: for a=0.5 aA = {0.5/a, 0.15/b, 0.1/c, 0.4/d, 0/e} • Aa: for a=2 Aa = {1/a, 0.09/b, 0.04/c, 0.64/d, 0/e} • a-cut: A0.2 = {a, b, c, d} A0.3 = {a, b, d} A0.8 = {a, d} A1 = {a}
  • 37. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Rules • In 1973, Lotfi Zadeh published his second most influential paper. This paper outlined a new approach to analysis of complex systems, in which Zadeh suggested capturing human knowledge in fuzzy rules. • A fuzzy rule can be defined as a conditional statement in the form: IF x is A THEN y is B • where x and y are linguistic variables; and A and B are linguistic values determined by fuzzy sets on the universe of discourses X and Y, respectively.
  • 38. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Classical Vs Fuzzy Rules • A classical IF-THEN rule uses binary logic, for example, Rule: 1 Rule: 2 IF speed is > 100 IF speed is < 40 THEN stopping_distance is long THEN stopping_distance is short • The variable speed can have any numerical value between 0 and 220 km/h, but the linguistic variable stopping_distance can take either value long or short. In other words, classical rules are expressed in the black-and-white language of Boolean logic.
  • 39. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Classical Vs Fuzzy Rules • We can also represent the stopping distance rules in a fuzzy form: Rule: 1 Rule: 2 IF speed is fast IF speed is slow THEN stopping_distance is long THEN stopping_distance is short • In fuzzy rules, the linguistic variable speed also has the range (the universe of discourse) between 0 and 220 km/h, but this range includes fuzzy sets, such as slow, medium and fast. The universe of discourse of the linguistic variable stopping_distance can be between 0 and 300 m and may include such fuzzy sets as short, medium and long.
  • 40. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Classical Vs Fuzzy Rules • Fuzzy rules relate fuzzy sets. • In a fuzzy system, all rules fire to some extent, or in other words they fire partially. If the antecedent is true to some degree of membership, then the consequent is also true to that same degree.
  • 41. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 DEFINITIONS A. Definitions 1. Sets a. Classical sets – either an element belongs to the set or it does not. For example, for the set of integers, either an integer is even or it is not (it is odd). However, either you are in the USA or you are not. What about flying into USA, what happens as you are crossing? Another example is for black and white photographs, one cannot say either a pixel is white or it is black. However, when you digitize a b/w figure, you turn all the b/w and gray scales into 256 discrete tones.
  • 42. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Classical sets Classical sets are also called crisp (sets). Lists: A = {apples, oranges, cherries, mangoes} A = {a1,a2,a3 } A = {2, 4, 6, 8, …} Formulas: A = {x | x is an even natural number} A = {x | x = 2n, n is a natural number} Membership or characteristic function            A x A x x A if 0 if 1 ) (
  • 43. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Definitions – fuzzy sets b. Fuzzy sets – admits gradation such as all tones between black and white. A fuzzy set has a graphical description that expresses how the transition from one to another takes place. This graphical description is called a membership function.
  • 44. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Definitions – fuzzy sets
  • 45. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Definitions: Fuzzy Sets ()
  • 46. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Membership functions (figure from Klir&Yuan)
  • 47. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Firing Fuzzy Rules • A fuzzy rule can have multiple antecedents, for example: IF project_duration is long AND project_staffing is large AND project_funding is inadequate THEN risk is high IF service is excellent OR food is delicious THEN tip is generous • The consequent of a fuzzy rule can also include multiple parts, for instance: IF temperature is hot THEN hot_water is reduced; cold_water is increased
  • 48. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Example • Air-conditioning involves the delivery of air which can be warmed or cooled and have its humidity raised or lowered. • An air-conditioner is an apparatus for controlling, especially lowering, the temperature and humidity of an enclosed space. An air-conditioner typically has a fan which blows/cools/circulates fresh air and has cooler and the cooler is under thermostatic control. Generally, the amount of air being compressed is proportional to the ambient temperature. • Consider Johnny’s air-conditioner which has five control switches: COLD, COOL, PLEASANT, WARM and HOT. The corresponding speeds of the motor controlling the fan on the air-conditioner has the graduations: MINIMAL, SLOW, MEDIUM, FAST and BLAST.
  • 49. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Example • The rules governing the air-conditioner are as follows: RULE 1: IF TEMP is COLD THEN SPEED is MINIMAL RULE 2: IF TEMP is COOL THEN SPEED is SLOW RULE 3: IF TEMP is PLEASANT THEN SPEED is MEDIUM RULE 4: IF TEMP is WARM THEN SPEED is FAST RULE 5: IF TEMP is HOT THEN SPEED is BLAST
  • 50. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Example The temperature graduations are related to Johnny’s perception of ambient temperatures. where: Y : temp value belongs to the set (0<A(x)<1) Y* : temp value is the ideal member to the set (A(x)=1) N : temp value is not a member of the set (A(x)=0) Temp (0C). COLD COOL PLEASANT WARM HOT 0 Y* N N N N 5 Y Y N N N 10 Y Y N N N 12.5 N Y* N N N 15 N Y N N N 17.5 N N Y* N N 20 N N N Y N 22.5 N N N Y* N 25 N N N Y N 27.5 N N N N Y 30 N N N N Y*
  • 51. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Fuzzy Sets Example Johnny’s perception of the speed of the motor is as follows: where: Y : temp value belongs to the set (0<A(x)<1) Y* : temp value is the ideal member to the set (A(x)=1) N : temp value is not a member of the set (A(x)=0) Rev/sec (RPM) MINIMAL SLOW MEDIUM FAST BLAST 0 Y* N N N N 10 Y N N N N 20 Y Y N N N 30 N Y* N N N 40 N Y N N N 50 N N Y* N N 60 N N N Y N 70 N N N Y* N 80 N N N Y Y 90 N N N N Y 100 N N N N Y*
  • 52. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Exercises For A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Draw the Fuzzy Graph of A and B Then, calculate the following: - Support, Core, Cardinality, and Complement for A and B independently - Union and Intersection of A and B - the new set C, if C = A2 - the new set D, if D = 0.5 B - the new set E, for an alpha cut at A0.5
  • 53. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Solutions A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Support Supp(A) = {a, b, c, d} Supp(B) = {b, c, d, e} Core Core(A) = {c} Core(B) = {} Cardinality Card(A) = 0.2 + 0.4 + 1 + 0.8 + 0 = 2.4 Card(B) = 0 + 0.9 + 0.3 + 0.2 + 0.1 = 1.5 Complement Comp(A) = {0.8/a, 0.6/b, 0/c, 0.2/d, 1/e} Comp(B) = {1/a, 0.1/b, 0.7/c, 0.8/d, 0.9/e}
  • 54. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Solutions A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Union A B = {0.2/a, 0.9/b, 1/c, 0.8/d, 0.1/e} Intersection A B = {0/a, 0.4/b, 0.3/c, 0.2/d, 0/e} C=A2 C = {0.04/a, 0.16/b, 1/c, 0.64/d, 0/e} D = 0.5 B D = {0/a, 0.45/b, 0.15/c, 0.1/d, 0.05/e} E = A0.5 E = {c, d}
  • 55. Artificial Intelligence – CS364 Fuzzy Logic 12/28/2023 Closing • Questions??? • Remarks??? • Comments!!! • Evaluation!