Hey everyone! Welcome to Fuzzy Logic
lectures. In this video we'll be
discussing about : What is fuzzy logic?
Introduction to classical systems and
fuzzy sets an extension of classical
sets. Now what is fuzzy logic? The term
fuzzy logic was introduced with a 1965
proposal of fuzzy set theory by Lotfi
Zadeh. The term fuzzy refers to
things which are not clear or are vague
and in the real world
many times we encounter a situation and
we can't determine whether the state is
true or false, there fuzzy logic
provides a very valuable flexibility for
reasoning. So it resembles a human
reasoning in many ways and hence we can
consider uncertainties and inaccuracies
of any situation. Before we dive
deeper into this lecture let us
understand what is a crisp value. The
term crisp means precise and it deals
with values that has a strict boundary.
i.e true or false. The value should
either be true or false to be called as
a crisp value and it cannot contain any
in-between values. Now in the boolean
system truth value one represents the
absolute truth value and zero represents
the absolute false value that is one is
true and zero is false. However in the
case of a fuzzy logic system we have
intermediate values present which are
partially true and partially false.
Now let's consider an example to show how a boolean system truth value works and how
a fuzzy logic system works. In this
question you can see that the condition
is-  Is the tea hot? In boolean
system having crisp values you can see
two solutions it is no and yes but in a fuzzy logic system with fuzzy values
you can see that there are many
solutions -  It is extremely hot, very hot,
cold and extremely cold. So you can say
that in a boolean system having crisp
values you only have the absolute false
value and the absolute true value but in
a fuzzy logic system you have these partially true and partially false
values as you can see extremely hot is
somewhat close to absolute true so you
can say that they're partially true
similarly extremely cold is somewhat
similar to absolutely false value so you
can say that is partially false. This is
the basic difference between fuzzy logic
systems and boolean systems. Now we'll
talk about membership functions.
Membership functions were first
introduced in 1965 by Lofti Zadeh
in his first research paper 'fuzzy sets'.
They characterize fuzziness i.e
all the information in a fuzzy set
whether the elements in the fuzzy set
are discrete or whether they are continuous and
they represent the degree of truth in a
fuzzy logic system. In the previous
example for a boolean system having
crisp values, for the solution no, this
represents the absolute false value
therefore the membership value over here
would be 0 whereas in the case of a true
value which is yes, the membership value
would be 1. In the case of fuzzy
logic it is somewhat different since
we're dealing with partially true and
partially false value we have membership
values as 0.9, 0.7, 0.5 and 0.3. These
values are assigned to the degree of
truth in the fuzzy system. As you
can see that extremely hot is some more
similar to the absolute true value, so I
have assigned it a value of 0.9 which is
close to 1. Similarly extremely cold is
similar to the absolute false value
therefore I have assigned the value of
0.3 which is close to 0. So this is how
the fuzzy logic systems they take up
partial values and each partial value
they'll be having a membership value
that is assigned to it. So you can say
that the fuzzy logic systems they are
governed by membership functions.
Let's move on to introduction to
classical sets. Classical set is a
collection of distinct object and it has
crisp values.
They contain objects that satisfy
precise properties of membership. For example:
A set of students having a height about
165. If you write this as A which is a
classical set, then you can have the
values as 165, 166, 167 and so on. Now each
individual entity in the set is called
as a member or an element of the set.
i.e 165, 166, 167 they are called as
the member or an element of the set.
You can say that the classical set is
defined is such a way that it has two
groups -  members and non-members i.e
165, 166, and 167 they all are called
members of the set. i.e the set of
students having the height above 165,  all
of them will come under members of the set but any other student
that does not have a height above 165
they are called as the non members of
the set. So you can say that in classical
sets, there are no partial membership which
exists over there. There are only members and non-members.
let A be a given set the membership
function can be used to define a set is
given by:
 
 
where χ (chi) is used to
denote the classical set is given as 1,
when x belongs to A and is given as 0
when x does not belong to A. So this is a
definition of a classical set A. In
this example, if a student has a height
above 165, his membership value is 1 and
it belongs to the set and if he has a
height below 165, his membership value is
0 and he does not belong to the set. So
this is all about classical sets. Now
another important concept that you need
to know is called as cardinality.
Cardinality of a set is a number of
elements of the set and this number is
also referred to as Cardinal number.
Let's take an example: Suppose you have a
set B and it has elements as 1, 2, 3 & 4
therefore you can say that the
cardinality of B is 4. Why? because it has
4 elements in the set, therefore the
total number of elements of the set
constitute cardinality
and in this example the number of
elements is 4 therefore the cardinal
number over here is 4. Now we'll move on
to fuzzy sets and extension to classical
sets. Fuzzy sets can be considered as
an extension and a gross
oversimplification of the classical sets.
We can understand fuzzy sets in the
context of set membership. Basically it
allows partial membership which means
that it contains elements that are
varying degrees of membership in the set.
In the previous example under fuzzy
logic systems, we have noticed that 0.9,
0.7, 0.5 and 0.3 these are the varying
elements as in varying degrees of the
membership, so these constitute the
partial values and they constitute the
degrees of truth in a fuzzy logic system.
That is what's meant by this particular
line. We can understand the
difference between classical sets and
fuzzy sets. Classical set contains
elements that satisfy precise properties
of membership while fuzzy set contain
elements that satisfy imprecise
properties of membership. I'll present
you with an example so that the
differences between classical set and
fuzzy sets would be much more clear.
Let's consider two graphs, one a fuzzy
set and one of classical set. μ(mu)
is the membership value of the fuzzy set
A and χ(chi) is the membership value
of the classical set A and you can see x
over here is the element. Now the graph of
fuzzy is in such a way that it looks
like this whereas a classical set graph
will look like this. Graph of the fuzzy
set looks like this is because this
particular region over here, they
represent the partial values whereas in
case of a classical set we only have 0
and we have 1. Therefore the graph of the
classical set looks like this and fuzzy
set looks like this. Apart from 0 & 1 you
have the partial values but in case of a
classical set you only have 0 & 1. So
this is the difference between fuzzy sets
and classical sets. A fuzzy set A in
the universe U can be defined as a set
of ordered pairs and it can be represented mathematically
as: 
where y belongs to the universe U and
this is the mathematical representation
of a fuzzy set A in the universe U.
Y is an element in the
fuzzy set A and you can say that :
between 0 and 1. i.e  in this example
we can see that the membership function
it took the value between 0 and 1 and is
0.3, 0.5, 0.7, 0.9 they all lie between 0
and 1. A fuzzy set can be represented by
two ways:
Then the fuzzy set
is given as:
 
This is the way of representing a fuzzy
set when the universe is discrete and
finite. There's another way in order
to represent the same fuzzy set.  It can
be written as:
This is
another way in order to represent the
same fuzzy set when the universe U is
discrete and finite.
Let's take an example: Suppose
you have elements as 1, 2, 3,4 and you
have membership values as 0.1, 0.3,
0.5 and 0.8 i.e these are the
elements and these are the
membership values. so you can write
it in this representation as:  a
 
So substituting these elements you can
write:
 
So set A can be represented in its
discrete form and the other way to
represent this set,as in this way, we can
write it as:
So these are the two ways in which you
can show how a fuzzy set can be
represented where the universe U is
discrete and finite and the case two is
when the universe is continuous and
infinite. Over there the fuzzy set is
written as:
where this integration does not mean the
actual integration operation. What it
does mean is that is just a
representation for the collection of
elements. i.e For example if n is
equal to 3, then the fuzzy set A is given
as:
that means it is giving us a
collection of three elements. This is the case when the U is continuous and infinite
Now we move on to few examples to show
how crisp and fuzzy set representations
happen for different examples. The
first question. Show the fuzzy and crisp
representation of a set of students
having a height 165 and above. Let's
consider that there are students having
heights of 154,156, 163 and 165.
What we can see is that we have to
assign membership values to each of these
elements. Now since 165 satisfies the
condition 165 and above, we will give
this a membership value of 1 and since
163 is somewhat closer to 165 we will
give it a random value of about 0.8 and
since 156 is a little bit more further
away from 165 we'll give it some 0.5 and
this value will give it a 0.3. So we can
say that these are the elements and
these are the membership values and if
you're writing it in the fuzzy set
representation form, then A is equal to
154 and 0.3 and then you have 156 and
0.5, 163 and 0.8 and 165 and 1. Now you can
either write it in this form or you can
write it in the other form. I have chosen
to write it in this particular form. Now
that we have assigned the membership
values to the elements, we can draw the
fuzzy graph and this is the fuzzy graph
for the fuzzy representation of the set
of students having a height above 165. As
you can see, over here we can see the
membership values and over here are the
elements. Let's mark the values:
When we
mark the values and when we draw the
graph, we notice that it comes like this.
After 165, the membership value will
be 1 because the condition is the set of
students having a high point 165 and
above.
So then after 165, the value remains as
one. If we're drawing a graph for the
crisp representation of the set, then we
can see that only after 165 will the
value be 1. Therefore all other values
will be 0 because in a crisp set it can
only take the values of 0 or 1 i.e
absolutely false or absolutely true. So
for 165 and about the value will be 1 i.e at 165 which is 1 and every
other value also it is one. This is
the condition for a crisp representation
and this is the condition for a fuzzy
representation. The second question
is :
 
The condition given here is  that the oral
toxicity has to be greater than 500.
Let's draw a fuzzy and a crisp
representation for the same. Then the
case of the crisp representation like
always only when the oral toxicity is
greater than 500, the membership value
will be 1. So when it is at 500 and above
the membership value will be 1. This
is a condition for a crisp
representation. However in the case of a
fuzzy representation, we know that it can
take partial values. So at 500 and above,
it will be 1 i.e the value will be 1, we
can see that a straight line from 500
and onwards can be observed which is at 1
but till 500 we will be having values that
are partially increasing until it
reaches 500 or until it reaches 1. Even
though the value of membership is small
we can admit that even though there is a
little bit amount of waste it is still
overly toxic and it keeps on increasing
as we reach 500 . So this is the condition
for a crisp representation
and this is a condition for a fuzzy
representation.
I hope the concept of crisp and fuzzy is
very clear to you all by now. Let's move
on to operations on a classical set.
For two sets A and B and a universe X,
the union is given as:
i.e is X is an element
which is present in A or it is an
element which is present in B. As you
can see A is represented by this circle, B
is represented by this circle and X
is represented by this rectangle. So A union
B gives us all the elements of set A
and set B. This constitutes the union.
For example we have a set A and it
has elements as 1, 2, 3, 4 and another set
B which has elements 5, 6, 7, & 8.
So A union B operation will give us 1, 2,
3, 4, 5, 6, 7 and 8. i.e all the elements
of set A and all the elements of set B,
they constitute A union B. The next
operation is called as intersection.
A intersection B is given:
i.e x is an element that should
be present in both A and B for the
intersection operation to be fulfilled.
As you can see A is represented by
this circle and B is represented by this
circle and X is represented by the
rectangle and you can see that A
intersection B is the common region
between A and B. For example if you
have set A which has elements as 1, 2 and
3 and another set B which has elements as
2, 3 and 4, then you can write that A
intersection B is given as 2 & 3 because
2 & 3 is common in both sets A and B.
Therefore A intersection B will give us
the common elements of A and B so the
answer is 2 and 3.
The next operation we're going to
discuss is complement.
Complement A is given as:
That means x is an element
that is not present in A but it is
present in the universe of X and every
other element not present in X will be
present in the universe X. So that is
what is depicted in this diagram.
The next operation we are going to
learn is called as difference. A
minus B is given:
That means
x should belong in the set A and it
should not be present in set B. A is this
circle and B is this circle and X is the
universe and we can see that A minus B
is all the elements of A minus the
common elements of A and B minus the
elements in B. That means A will only
include the elements that is not common
to both A and B and does not include the
elements in B as well. For example if
A is equal to 1, 2 & 3 and B is equal to
3, 4 & 5 that means A minus B will be
given as 1 & 2. Why? because 3 is the
common element of A and B and that is
not included. So 3 is removed and only
the elements of A is written that is 1 &
2. Similarly if the question asked is B minus A , then the answer will be 4 & 5
i.e the common element of A and B is
removed and the rest of the elements of
B is written that is 4 & 5. This is
all about the operations on a classical
set. Now we will talk about operations on
fuzzy sets. For two fuzzy sets A and
B and a universe U and an element y of
the universe, the first operation we are
going to discuss is Union. μ(mu) of A
union B is given as:
where y belongs to the universe U.
So what this operation does is this
operation gives us the union and also
called as the max operator.
i.e union of A and B will give us
the maximum of fuzzy set A and fuzzy set
B. First I will show you a graph on
how this union could be understood
better. If this is a graph and this
is μ(mu)A and this is μ(mu)B and this is element y
and if fuzzy set A is represented as
this figure and fuzzy set B is
represented as this figure, then we can
say that union of A and B will be given
as this whole region. This whole region
gives us the union of A and B i.e
all the elements of fuzzy set A and fuzzy
set B. This is the union of fuzzy set
A and fuzzy set B. Let us take an
example suppose a fuzzy set A is given
as:
and fuzzy set B is given as:
Then union of A and B has
to be maximum of both these fuzzy sets
i.e maximum of both of these is:
 
So
this over here is the union of A and B
Now we move on to intersection. 
Intersection of two operations is
basically given as μ(mu)A intersection
B is equal to:
where y belongs to the universe U
and this operator will give us the
minimum value. so in case of union, it is called as a max operator and in case of
intersection it is a minimum operator i.e intersection of A and B is equal to
minimum of fuzzy set A and minimum
of fuzzy set B. I'll show you a graph
so that the concept will be much more
clear. Suppose this is a graph and μ(mu)
A, μ(mu)B and here we have Y and suppose if A is represented by this figure and B is
represented by this figure then A
intersection B will be the common region
of A and B, that is this particular
region. This is the region that is common
to both A and B and you can say that
this region is given as μ(mu)A
intersection B. Numerically when we
solve an example, let's take the same
example as before. μ(mu)A is given as
this and μ(mu)B is given as this. Now we
have to find out what is μ(mu)A
intersection B. μ(mu)A intersection B
should give us the minimum of all these
elements. That is minimum of both these
elements is:
So this gives us
the μ(mu) intersection B of the fuzzy
sets A and B. The next operation we will
go on to is complement. The μ(mu) of A
complement is given:
This gives us the membership value μ(mu)A bar and this is the element y. If the
graph of fuzzy set A looks like this and
the complement operation is given as μ(mu)
A bar which is equal to 1 minus μ(mu)A Now as you can see over here the value of μ(mu)A
is equal to 0 in this region so the
value of μ(mu)A complement will be 1 minus
0 which is equal to 1 so the value of μ(mu)
A bar will be equal to 1 till this
region. Now over here the value of μ(mu)A
is equal to 1 so the value of μ(mu)A bar
will be 1 minus 1
should be equal to zero so this will be
the value of μ(mu)A bar. When the value of
μ(mu)A is 1, now again the value of μ(mu)A
over here is zero so the value of μ(mu)A
bar will be 1 minus 0 which is 1. So when
you draw a line through it you can get
it as this. So this over here is a graph
of μ(mu)A complement. Let's take a
numerical example. μ(mu)A is given:
So μ(mu)A complement
will be equal to:
 
 
So this is how the complement operation
works for a fuzzy logic set. The last but
not the least is a difference operator
which is given as:
 
i.e it is equal to the minimum of μ(mu)A
and μ(mu)B complement. Now we draw a
graph to make it more clear. If a is
given as this and if B is given as this
shape, then you can say that μ(mu)A
intersection B complement will be equal to
this as in it will be the region of A minus
a common region of A and B minus the
elements of B. So this over here will
give us μ(mu)A intersection B
complement.
Now let's take a numerical example. If μ(mu)A is given as this and μ(mu)B is
given as this, we have to find out the
minimum of μ(mu)A and μ(mu)B
complement. So let us first find what is
μ(mu)B complement. So μ(mu)B complement
is:
now we have
to find the minimum of μ(mu)A and μ(mu)B complement. So μ(mu)A minus B will be
given as:
So this gives us the μ(mu)A minus B which is
the difference operation and that is all
for operations on fuzzy sets. Let's
move on to properties of sets and the
first property that we are going to
study is called as commutativity.
That means that even if
you do A union B or if you reverse and
do it as B Union A the answer will be
the same. Same is the case for
intersection and now the next property
is called as Associativity.
That means whichever order you take the
union first it doesn't matter. If you
take B union C first and then do it with
A union, the answer will be the same as A
union B union C. Same is the case for
intersection. Now you have Distributivity
 
B intersection C can be distributed as A
union B intersection A union C. Now you
have a property called Idempotency.
Now there's
a property called as Identity.
 
 
 
For example if you take a set A and it has
elements as 1, 2, 3 & 4 now A union Φ(phi) means
all the elements of Φ(phi) and all the
elements of A. So all the elements in Φ(phi)
and A is obviously A itself. Therefore A
union Φ(phi) is equal to A. The next
property is A intersection X is equal to A.
Now A intersection X is equal to A where
A is 1, 2, 3, 4 and X is the universe so as
you can see that A is this set and X is
the universe. So since A belongs to X we
can see that the common elements between
A and X is obviously A. Therefore A
intersection X will be A only and the
next is A intersection Φ(phi) which is equal
to Φ(phi). now Φ(phi) is a null set and A has
elements as 1, 2, 3, 4, and you can see that
there are no common elements between Φ(phi)
and A. Therefore A intersection Φ(phi) is
equal to Φ(phi) which is a null set as in
there are no elements that are common to
A and Φ(phi). The next one is A union X
which is equal to X. This is A and
this is the universe X, then A union X is
all the elements of A and X. So obviously
all the elements of A and X is X itself.
So A union X will be X itself. Now the
next thing that you have is transitivity.
That is if A belongs to B and B belongs
to C then A will definitely belong to C.
That is if set A is present in set B and
set B is present in set C then
definitely set A will be present in set
C. Now you have few properties like
Involution which is A double complement
is equal to A. You have the De Morgan's
principle:
then you have something called as Law of
Excluded middle which is :
 
Now these properties of sets are common
for both the classical set and fuzzy
sets. The only difference is for fuzzy
sets it is represented like this and for
classical set it is
like this. I hope you all understood the
basic concept of fuzzy logic and found
this video understandable. If any of you
have any doubts, please feel free to ask
in the comment section below. In the
next lecture we'll be dealing with
characteristics and features of membership functions and relations, Cartesian
product and composition of fuzzy and
classical sets. Thank you for watching
Topperly and have a very nice day!
