Você está na página 1de 61

CS 288: Fuzzy Logic & Design

M.Tech. (Computer Science & Engg.)


Uttarakhand Technical University
What is a fuzzy set?
Crisp Set: An element either belongs or does not
belong to a set.
Example People in a town divided into two sets
set of all males and set of all females.


Fuzzy Set: An element belongs to a set with certain
degree of belongingness.
Example People in a town divided into two sets
set of young people and set of old people.
Crisp logic
Crisp logic: 2-level logic TRUE / FALSE or YES /
NO or 1 / 0
That is, discrete binary truth value.
So, hard decision logic.
Crisp sets based on crisp logic.
But, crisp logic does not apply to most real-world
situations.
Example No precise boundary between young and
old people.
Concept of fuzzy logic
Fuzzy logic: Multi-level logic conceived by Zadeh
in 1965.
Continuous range of truth value, i.e., extent of truth
(or falsity) in the range 0 to 1
So, soft decision logic as much as the human
reasoning, e.g., very young, moderately young, not
so young, and so on.
Fuzzy sets based on fuzzy logic.
Crisp logic (set) is a special case of fuzzy logic (set).
Why fuzzy logic?
Limited precision.
A way of handling uncertainty.
Quantitative methods of handling qualitative issues.
To introduce human-like thinking in computers.
Applications:
Control systems
Pattern recognition
Decision making
Fuzzy set definition
If X is a collection of objects denoted generically by
x, then a fuzzy set A in X is a set of ordered pairs
given as



X = Universal set
x = Set element
A = Fuzzy set;
= Membership grade;
)
`

e
|
.
|

\
|
= X x
x
x
A
A
) (
) (x
A

X A_
| | 1 , 0 ) ( e x
A

Membership function
Membership grade is the degree of
belongingness of element x in the fuzzy set A.
That is, it is the measure of the extent by which x
satisfies the property of fuzzy set A.

Membership function: User defined function for
calculating the membership grade
Probabilistic measure
Possibilistic measure

) (x
A

Membership function
Membership vs probability measure:
Membership grade = degree of belongingness
Probability measure = chance of belongingness
Example Probability that x is young is 0.8;
membership of x in set of young people is 0.8
Multi-dimensional membership grade: Membership
grade based on multiple criteria

Example Membership grade for a person in
fuzzy set TALL depends on his height and age.
| |
N
A
x 1 , 0 ) ( e
Some definitions
Support: The support of a fuzzy set A in the
universal set X is the crisp set that contains all the
elements of X that have non-zero membership grade
in A.
Power set: The set of all possible fuzzy subsets of X.
Empty fuzzy set: whose support is a null set.
Height: The height of a fuzzy set is the largest
membership grade attained by any element in the
set.
Normalization: A fuzzy set is normalized when at
least one of its elements attain the maximum
possible membership grade which is generally one.
Some definitions
-cut: An -cut of a fuzzy set is a crisp set that
contains all the elements whose membership grade
is at least equal to .
It implies
Level set: The crisp set of all membership grade
values, including 0.
2 1 2 1
o o
o o
> _ if A A
{ } X x x
A A
e = = A some for ) ( o o
Some definitions
Convex fuzzy set: A fuzzy set is convex if and only if
each of its -cuts is a convex set.


Scalar cardinality: Sum of the membership grades of
all elements.
Fuzzy cardinality: It is the fuzzy set defined as
)
`

A e =
A
A
A o
o
o
~
| | ] 1 , 0 [ , ) 1 ( , ) ( ), ( min ) ( e + = > s r x s r x
A A A
Operations on fuzzy sets
Set inclusion:
Set equivalence:
Proper subset:

Set complement
Set union
Set intersection
X x x x B A
B A
e s _ ), ( ) ( if
X x x x B A
B A
e = = ), ( ) ( if
) ( ) ( such that and
), ( ) ( if
x x x
X x x x B A
B A
B A


< -
e s c
Set complement
The complement operation is defined by a function
C: [0,1] [0,1] and the complement of a fuzzy set
A is given as

Axiomatic requirements:
C(0) = 1, C(1) = 0
If a < b then C(a) C(b)
C(.) is a continuous function
C(.) is involutive, i.e., C( C(a) ) = a
( )
)
`

=
x
x C
A
A
) (
Complement functions
Sugeno class:



Yager class:

Standard complement:
( ) + e
+

= , 1 ,
1
1
) (

a
a
a C
( ) ( ) + e = , 0 , 1 ) (
1
W a a C
W
W
W
1 or 0 for , 1 ) ( = = = W a a C
Set union
The union operation is defined by a function
U: [0,1] [0,1] [0,1] and the union of fuzzy sets
A and B is given as

Axiomatic requirements:
U(0,0) = 0, U(0,1) = U(1,0) = U(1,1) = 1
Commutative: U(a,b) = U(b,a)
Monotonic: If a p, b q then U(a,b) U(p,q)
Associative: U( U(a,b), c) = U(a, U(b,c))
( )
)
`

=
x
x x U
B A
B A
) ( ), (
Set union
U(.) is continuous function
Idempotent: U(a,a) = a

Union functions:
Standard: max(a,b)
Algebraic sum: a + b ab
Bounded sum: min(1, a+b)
Drastic union: U
max
(a,b) = a, if b=0
= b, if a=0
= 1, otherwise
Set intersection
The intersection operation is defined by a function
i: [0,1] [0,1] [0,1] and the intersection of fuzzy
sets A and B is given as

Axiomatic requirements:
i(1,1) = 1, i(0,0) = i(0,1) = i(1,0) = 0
Commutative: i(a,b) = i(b,a)
Monotonic: If a p, b q then i(a,b) i(p,q)
Associative: i( i(a,b), c) = i(a, i(b,c))
( )
)
`

=
x
x x i
B A
B A
) ( ), (
Set intersection
i(.) is continuous function
Idempotent: i(a,a) = a

Intersection functions:
Standard: min(a,b)
Algebraic product: ab
Bounded difference: max(0, a+b1)
Drastic intersection: i
min
(a,b) = a, if b=1
= b, if a=1
= 0, otherwise
Properties of fuzzy set operations
Commutative:

Associative:


Idempotent:

Distributive:


Identity:
A B B A A B B A = = ;
) ( ) ( ) (
); ( ) ( ) (
C A B A C B A
C A B A C B A
=
=
A X A A A = = u ;
C B A C B A
C B A C B A
=
=
) ( ) (
; ) ( ) (
A A A A A A = = ;
Properties of fuzzy set operations
We have

Absorption:

De Morgans Laws:

Involution:

Equivalence formula:
X X A A = u = u ;
A B A A A B A A = = ) ( ; ) (
B A B A B A B A = = ;
A A =
( ) ( ) ( ) ( ) B A B A B A B A =
Properties of fuzzy set operations
Note the following which are different from
conventional crisp set:
(Law of non-contradiction)

(Law of excluded middle)
u = A A
X A A =
Fuzzy set decomposition
Representations of fuzzy sets by crisp sets
For every in the level set of A, find the -cut.

To obtain back A:
From every -cut obtained above, form a fuzzy
set as


Then,
( ) { }

e
e =
o
o o
o o
A x
x
A x
x
A
~

A
A A
A e
=
o
o
~
Extension principle
Mapping fuzzy subsets of X to fuzzy subsets of Y via
a function f.






If more than one element maps to the same
element y in Y, the maximum of the membership
grades of these elements in A is taken as the
membership grade of y in f(A).

Y A f
x f x f x f
A f
X A
x x x
A
Y X f
n
n
n
n
_ + + + =
_ + + + =

) ( ;
) (
...
) ( ) (
) (
; ...
:
2
2
1
1
2
2
1
1


Extension principle
If no element in X is mapped to y, membership
grade of y is zero.
Let,



Then membership grade of y in f(A
1
, A
1
, , A
n
) is
equal to the minimum of the membership grades of
x
k
in A
k
, for k = 1 to n.
( )
( ) Y y x x x f
Y X X X f
n
n
e =

,....., ,
,....., , :
2 1
2 1
Fuzzy arithmetic
Addition, subtraction, multiplication, division,
maximum, minimum, exponentiation, logarithm are
defined.
Types of numbers:
Scalars integers, real numbers
Intervals exact value not known but the bounds
can be established.
Fuzzy numbers uncertain numbers with a
knowledge of range of possible values and value
that is more possible than others, e.g.,
approximately 5.
Fuzzy numbers
It is a fuzzy set with different degree of closeness to
a crisp number.
Membership function ought to be normal and
convex.
All fuzzy set operations are applicable to fuzzy
numbers
Intersection, union, -cuts, extension, etc.
Operation similar to arithmetic operations are also
applicable
Linguistic variables
When fuzzy numbers are connected to linguistic
concepts, such as terms like very small, small,
medium, and so on.
Linguistic variable characterized by:
Name of the variable
Set of linguistic terms
Universal set
Syntactic rule
Semantic rule

Linguistic variables
Interval number
For an interval A = [a, b]:
Width w(A) = b a
Magnitude |A| = max( |a|, |b| )
Image A

= [b, a]
Inverse A
1
= [1/b, 1/a]
For two intervals A = [a, b] and P =[p, q]:
Equality A = P when a=p, b=q
Inclusion A subset of B if p a b q
Distance d(A,B) = max( |ap|, |bq| )
Arithmetic operations on intervals
For intervals A and P, and operator
we define


Division, A / P, is not defined when 0 is an element
in P.
The result of an arithmetic operation on closed
intervals is again a closed interval.
{ } / ,., , * + e
{ } P p A a p a P A e e = , * *
Arithmetic operations on intervals
Addition:

Subtraction:
Multiplication:


Division:


Note that:
However,
] , [ q b p a P A + + = +
] , [ p b q a P A P A = + =

( ) ( ) | | q b p b q a p a q b p b q a p a P A . , . , . , . max , . , . , . , . min . =
(

|
|
.
|

\
|
|
|
.
|

\
|
= =

q
b
p
b
q
a
p
a
q
b
p
b
q
a
p
a
P A P A , , , max , , , , min . /
1
] 1 , 1 [ / and ] 0 , 0 [ = = A A A A
A A A A / 1 and 0 e e
Properties of interval operations
Commutative
Associative
Identity
Distributive:


Sub-distributive:

Inclusion monotonicity:
C A B A C B A
C c B b c b
. . ) .(
, every for 0 . If
+ = +
e e >
C A B A C B A . . ) .( + _ +
Q P B A Q P B A
Q P B A Q P B A
Q B P A
/ / ; . .
;
, If
_ _
_ + _ +
_ _
Fuzzy number and fuzzy interval
A fuzzy number is a fuzzy set on
such that
A is normal (height(A) = 1)
-cut of A is a closed interval for all in the
range (0, 1]
The support of A is bounded
Since all -cuts are closed intervals, every fuzzy
number is a convex fuzzy set.
Membership function is continuous.
| | 1 , 0 : 9 A
Fuzzy number and fuzzy interval
Comparison of a real number and a crisp interval
with a fuzzy number and a fuzzy interval.
Arithmetic on fuzzy numbers
Definition based on cutworthiness:






Definition based on extension principle:
( )
( |
( ) { }
o
o
o o o
o
B A x
x
B A
B A B A
* *
* *
1 , 0
e =
=
e

( )
( ) | | ) ( ), ( min max ) (
*
*
y x z
B A
y x z
B A

=
=
Arithmetic on fuzzy numbers
Addition:
Arithmetic on fuzzy numbers
Subtraction:
Arithmetic on fuzzy numbers
Multiplication:
Arithmetic on fuzzy numbers
Division:
MIN and MAX operators
For intervals:




For fuzzy numbers:
| |
| | ) , max( ), , max( ) , ( MAX
) , min( ), , min( ) , ( MIN
q b p a P A
q b p a P A
=
=
( ) ( ) | |
( ) ( ) | | ) ( ), ( min sup ) ( , MAX
) ( ), ( min sup ) ( , MIN
) , max(
) , min(
y B x A z B A
y B x A z B A
y x z
y x z
=
=
=
=
MIN vs min operators
MAX vs max operators
Properties of MIN and MAX
Commutative
Associative
Idempotent
Absorption
Distributive
Interval equations
A + X = P
X = P A is not the solution except when
A = [a, a]
The solution is
X = [p a, q b]
The above solution exists iff
p a q b
Fuzzy number equations
The solution to a fuzzy equation A*X = B is obtained
by solving a set of interval equations X

, one for
each nonzero in the set

Final solution

The solution for A + X = B exists iff
p

where A

= [a

, b

] and P

= [p

,
q

], for all
p



p

a

b

q

for
B A
A A
{ }

] 1 , 0 ( e
e =
o
o
o
X x
x
X
Fuzzy number equations
Similarly, for fuzzy number equations A.X = B, X =
B / A is not the solution
Solution exists iff
p

/ a

/ b

where A

= [a

, b

] and P

= [p

,
q

], for all
p

/ a

/ b


p

/ a

/ b

for
Crisp relation
Crisp relation:

Example:
X ={dollar, pound, rupee}
Y = {USA, Canada, Britain, India}
Relation = (currency, country)
Then R = { (dollar,USA), (dollar, Canada),
(pound,Britain), (rupee,India) }
( ) { } Y X R Y y X x xRy y x R c e e = , , , ,
Fuzzy relation
Fuzzy relation:

Example:
X ={New York (NY), Paris (P)}
Y = {Beijing (B), New York (NY), London (L)}
Relation = Very far
Then R = { 1/(NY,B); 0.6/(NY,L); 0/(NY, NY);
0.9/(P,B); 0.7/(P,NY); 0.3/(P,L) }
( )
Y X R Y y X x
y x
R
R
c
)
`

e e = , ,
,

Some terminologies
Domain of a relation
Range of a relation
Height of a relation
-cut of a relation
Inverse of a relation
Properties of relation
Reflexive
Else, irreflexive and -reflexive in fuzzy relation
Symmetric
Asymmetric and anti-symmetric
Transitive:
Max-min and max-product transitive in fuzzy
relation
Non-transitive and anti-transitive
Properties of fuzzy relation
( )
( )
( )
( )
( ) ( )
( ) ( )
( ) ( ) x y y x X y x
y x x y y x
X y x x y y x
x x X x
X x x x
X x x x
X x x x
R R
R R
R R
R
R
R
R
, , , , : Asymmetric
0 , , 0 , : symmetric - Anti
, , , , : Symmetric
0 , , : e Irreflexiv
, 1 , : reflexive - Anti
, 0 , : reflexive -
, 1 , : Reflexive


c c

= e -
= > >
e =
= e -
e =
e > >
e =
Properties of fuzzy relation









Non-transitive: neither transitive nor anti-transitive.
( ) ( ) ( ) | |
( ) ( ) ( ) | |
( ) ( ) ( ) | |
( ) ( ) ( ) | | X z x z y y x z x
X z x z y y x z x
X z x z y y x z x
X z x z y y x z x
R R
X y
R
R R
X y
R
R R
X y
R
R R
X y
R
e s
e >
e s
e >
e
e
e
e
, , , , max ,
: transitive - anti product - Max
, , , , max ,
: ansitive product tr - Max
, , , , , min max ,
: transitive - anti min - Max
, , , , , min max ,
: tive min transi - Max




Poset and lattice
Partial order: reflexive, anti-symmetric and
transitive.
Partially ordered set (poset)
Maximal and minimal elements
Greatest and least elements
Upper and lower bounds of subsets
Greatest lower bound
Least upper bound
Lattice: A poset whose every 2-element subset has
GLB and LUB in the poset.
Fuzzy measures
Fuzzy measure assigns a value [0, 1] to each crisp
subsets of the universal set signifying the degree of
evidence or belief that a particular element belongs
to the subset.
Axioms:
Boundary condition:

Monotonicity:
( ) ( ) 1 , 0 = = u X g g
( ) ( ) B g A g B A s _
Belief measure
A belief is a fuzzy measure that additionally satisfies
the following relation:



Special cases:
( ) ( ) ( )
( )
n
n
j i
j i
i
i n
A A A Bel
A A Bel A Bel A A A Bel

+ >
+
<

.... ) 1 ( ..........
....
2 1
1
2 1
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( ) A Bel A Bel X Bel
A A A Bel A A A Bel
A A Bel A Bel A Bel A A Bel
j i
i
i n
+ > =
u = >
+ >

1
when .....
2 1
2 1 2 1 2 1
Plausibility measure
Associated with each belief measure is a plausibility
measure defined as



Alternatively,
( ) ( ) ( )
( ) ( ) A Pl A Bel
A Bel A Bel A Pl
=
> =
1
1
( ) ( ) ( )
( )
( ) ( ) 1
.... ) 1 ( ..........
....
2 1
1
2 1
> +

+ s
+
<

A Pl A Pl
A A A Pl
A A Pl A Pl A A A Pl
n
n
j i
j i
i
i n
Probability measure
Probability assignment is a mapping function:
m: P(X) [0, 1]
such that m() = 0 and
P(X)
m(A) = 1
Observations:
Not necessarily m(X)=1
Not necessarily m(A) m(B) when set A is
subset or equal to set B.
No relationship between m(A) and m() required.
Probability measure
Computation of belief and plausibility:



Focal element: If m(A) > 0, then A is called a focal
element of m.
F is the set of focal elements.
(F,m) is called body of evidence.

u = _
= =
A B A B
B m A Pl B m A Bel ) ( ) ( ) ( ) (
Probability measure
Total ignorance:





Single support function: m is a single support
function focused at A if
u = = = u
= = =
= e = =
A A Pl Pl
X A A Bel X Bel
X A X P A A m X m
1 ) ( , 0 ) (
0 ) ( , 1 ) (
), ( 0 ) ( , 1 ) (
A B X B B m
s X m s A m
= = =
= =
, , 0 ) (
1 ) ( , ) (
Probability measure
Combining evidence: standard method (Dempsters
rule of combination)
u = =
u =

u =
=
A A m
A
C m B m
C m B m
A m
C B
A C B
, 0 ) (
,
) ( ) ( 1
) ( ) (
) (
12
2 1
2 1
12
Possibility measure
Possibility measure is particular cases of plausibility
and belief measures.
The focal elements of a body of evidence are
nested.
The associated belief and plausibility measures are
called consonants.
Properties:

( ) | |
( ) | | ) ( ), ( max
) ( ), ( min
B Pl A Pl B A Pl
B Bel A Bel B A Bel
=
=

Você também pode gostar