Fuzzy 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 29

Fuzzy Logic

Important

• If you miss something or haven’t


understood something, do not hesitate
to ask me again !!
Fuzzy Logic.

• In conventional logic, a statement is either true or false,


with nothing in between. This principle of true or false
was formulated by Aristotle some 2000 years ago as the
Law of the Excluded Middle.
Check this !
• Is the statement My child is good completely true or
completely false?

• How about: I am rich? This can be true (Mr. Ratan


Tata) or false (a begger), but how about most of us? Or
she is beautiful? The idea of gradations of truth is
familiar to every one.
Fuzzy Logic
• Fuzzy logic offers a better way of representing reality. In
fuzzy logic, a statement is true to various degrees, ranging
from completely true through half-truth to completely false.

• The basic idea of multi-valued logic has been explored to


some extent by a number of mathematicians in this century,
but the real breakthrough was made by Prof. Lotfi Zadeh of
the University of California in Berkeley. In 1965 he
published a paper on the theory of fuzzy sets; that paper has
given rise to hundreds of papers on fuzzy mathematics and
fuzzy systems theory.
Conventional Logic vs. Fuzzy Logic
• Consider the truth of the combination of two statements, A AND
B. A and B are both assertions; for example, Ram is a man, or I
don't have much free time this week.

• In conventional logic, both A and B must be either true or false.


The statement (A AND B) is true only if both A and B are
individually true; otherwise, the statement (A AND B) is false.

• Now, how do we define the fuzzy truth value of the statement (A


AND B) if the fuzzy truth values of A and B separately are
known?

• Fuzzy logic gives a remarkably simple answer to this problem: the


truth of (A AND B) together is the minimum of the truth value of
A and the truth value of B.
Classical / Crisp Set Theory
• Universal Set or Universe of Discourse

X: Universe
A

Element
not in A

Element in A =
a
Relations between sets
• If A and B are sets, A is a subset of B if each element of
A is also an element of B: 
A B.
• If A and B are sets, A and B are equal iff A B and B A.
We write A=B.
• A and B are disjoint iff no element of A is an element of
B and vice versa.
Operations on sets
For A, B in X,
• Union of A & B
AB   x U x  A...or...x  B

• Intersection of A & B
A  B   x   : x  A...and ...x  B
• Complement of A & B

A '   x   : x  A
Operations on Sets

1. A  B  B  A; A  B  B  A
2. A  ( B  C )  ( A  B)  C
A  ( B  C )  ( A  B)  C
3. A  A '  U
A  A '  Null
4.( A ') '  A
5.( A  B ) '  A ' B '
6. A  A  A; A  A  A
Operations on Sets

7. A  ( B  C )  ( A  B)  ( A  C )
A  ( B  C )  ( A  B)  ( A  C )
Characteristic Functions

• Let U be a fixed non-empty set, Universal set or


Universe of discourse (UOD) or simply domain.
• We define a function f
f: U {0, 1}
f is the characteristic function on U( CH(U) ).
Relations on CH(U)
For f and g in CH(U),
1. f is less than or equal to g, written as f ≤ g, iff f(x) ≤
g(x) for all x in U.
2. f is equal to g, f = g, iff f ≤ g and g ≤ f [ f(x)=g(x) for
all x in U].
Cartesian Product

• AxB ={(a,b): a A and b B}.


• Note: AxB ≠ BxA and Ax(BxC) ≠ (AxB)xC
where A, B and C are distinct sets.

• Solve problems from books.


What is a fuzzy set?
• The set (concept, predicate) A is characterized by a
membership function m: X → {0, 1}.

• The unit interval [0, 1] is also represented as I.

• First we consider a set X of all real numbers between 0


and 10 which we call the universe of discourse. Now,
let's define a subset A of X of all real-numbers in the
range between 5 and 8.
A = [5,8]
membership grade
• We now show the set A by its characteristic function, i.e. this
function assigns a number 1 or 0 to each element in X,
depending on whether the element is in the subset A or not.
This results in the following figure:

• A(x) is called the membership grade of x.


A  {( x, A( x)) : x  U }
Fuzzy set

• Consider U = {a, b, c, d} and A:UI defined by A(a)=0,


A(b)=0.7, A(c)=0.4, A(d)=1.

• The fuzzy set can be written as:


A={(a,0), (b,0.7), (c, 0.4), (d,1)}
• In this example we want to describe the set of young people.
More formally we can denote
B = {set of young people}
• As age starts at 0, the lower range of this set is clear. The
upper range, on the other hand, is rather hard to define. As a
first attempt we set the upper range to, say, 20 years.
Therefore we get B as a crisp interval, namely:
B = [0,20]
• Now the question arises: why is somebody on his 20th
birthday young and right on the next day not young?
Obviously, this is a structural problem, for if we move the
upper bound of the range from 20 to an arbitrary point we can
pose the same question !
• A more natural way to construct the set B would be to
relax the strict separation between young and not young.
• We will do this by allowing not only the (crisp) decision
YES: he/she is in the set of young people or NO: he/she
is not in the set of young people but more flexible
phrases like Well, he/she belongs a little bit more to the
set of young people or NO, he/she belongs nearly not to
the set of young people.
graphically characteristic function
• To be more concrete we now show the set of young people
similar to our first example graphically by its characteristic
function

• This way a 25 years old would still be young to a degree of 50


percent.
Operations on Fuzzy Sets
• Similar to the operations on crisp sets we also want to intersect, unify
and negate fuzzy sets.

• Let A be a fuzzy interval between 5 and 8 and B be a fuzzy number


about 4. The corresponding figures are shown below.
Membership function
• A membership function can also be defined as:
1
 A ( x) 
(1  x) 2
Shapes of membership functions
AND
• The following figure shows the fuzzy set between 5 and 8 AND
about 4 (notice the blue line).
OR
• The Fuzzy set between 5 and 8 OR about 4 is shown in the
next figure (again, it is the blue line).
NEGATION
• This figure gives an example for a negation. The blue line is the
NEGATION of the fuzzy set A.
Self Test
• Let A and B be crisp sets on U. Then
1. Crisp union of A and B = Fuzzy union of A and B.
2. Crisp intersection of A and B = Fuzzy intersection of A and B.
3. Crisp complement of A = Fuzzy complement of A and B.
Self Test :
Differentiate between Crisp Set
Theory and Fuzzy Set Theory
BREAK

You might also like