0% found this document useful (0 votes)
13 views16 pages

Fuzzy Set

The document discusses neural networks, fuzzy logic, and genetic algorithms, focusing on their synthesis and applications. It includes examples of set theory, particularly fuzzy sets, and their operations such as union, intersection, and complement. Additionally, it explores membership functions and how they can be represented graphically and mathematically.

Uploaded by

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

Fuzzy Set

The document discusses neural networks, fuzzy logic, and genetic algorithms, focusing on their synthesis and applications. It includes examples of set theory, particularly fuzzy sets, and their operations such as union, intersection, and complement. Additionally, it explores membership functions and how they can be represented graphically and mathematically.

Uploaded by

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

1168‘ Neural Networks, Fuzzy Logic, and Genetic Algorithms—Synthesis and Applications

Generalizing.
. .
=10 a1 =Ylal-
Y Yianal
= i=1 =t j=1
i

Y D AN
A AL _fl‘A,} ©21)
i=lj=1 k=1 =
iejek
Example 6.4

Given |E| = 100. where E indicates a set of students who have chosen subjects from different
streams in the computer science discipline, it is found that 32 study subjects chosen from the
Computer Networks (CN) stream, 20 from the Multimedia Technology (MMT) stream. and 45 from
the Systems Software (SS) stream. Also, 15 study subjects from both CN and SS streams, 7 from
both MMT and SS streams, and 30 do not study any subjects chosen from either of the three
streams.
Find the number of students who study subjects belonging to all three streams.

Solution
Let A, B, C indicate students who study subjects chosen from CN., MMT. and SS streams
respectively. The problem is to find |4 N B n (]
The no. of students who do not study any subject chosen from either of the three
streams = 30.
ie. A~ B~ C =30
= (A U BUO|=30 (using De Morgan’s laws)
= IEl-lAwBuUC|=30
= AUBUC=]E-30
=100 - 30 = 70
From the principle of inclusion and exclusion,

MWuBUCI=Al+
1Bl +ICI-RAB-BAC-UAq+HUnBnC
= WABnCd=AuBUC-Al-|Bl-|Cl+
U nB+BAC+K1NnC
=70-32-20-45+15+7+10
=5
Hence. the no. of students who study subjects chosen from all the three streams is 5.

6.3 FUZZY SETS


Fuzzy sets support a flexible sense of membership of elements to a set. While in crisp set theory,
an element either belongs to or does not belong to a set. in fuzzy set theory many degrees of
membership (between 0 and 1) are allowed. Thus. a membership function ¥ is associated with a
referen 2l 10 the interval [0, 1].
Formally. the mapping is
written as Hi(x) 1 X —[0. 1)
A fuzzy
ser is defined as follows:
If X is a universe of discou
rse and x is a particular
may be written as a collectio element of X, then a fuzzy
n of ordered pairs set A defined on X

A= (x, Hi (X)), xe X}
Where each pair (x, Hi (6.23)
(X)) is called a singleton
An alternative
. In crisp sets. Hj; (x) is
definition which indicates
dropped.
given a fuzzy set as a union
by of all u; (x)/x singletons is

A= Z Hz(x)/x; in the discrete case


and xex (6.24)

A= J"ui (x)/x in the continuous case


x (6.25)
Here, the summation and integration signs
indicate the union of
all u; (x)/x singletons
Example .
Let X = {21, g2 83. &1.
g5} be the reference set
students. where “smart” of students. Let 4 be the
js a fuzzy linguistic ter fuzzy set of “smar™
m
4 ={(8,,0.4) (5,,0.5) (83.1) (24,0.
9) (g5,0.8)). - _
HereA indicates that the Sma
rtness of g, is 0.4, g, is 0.5
Though fuzzy sets model and o on when graded ove
vagueness, it needs to be r a scale of 0-1.
realized that the definition
of the sets

6.3.1 Membership Function


The membership function values
need not always be described by
these turn out 1o be as described discrete values. Quite often,
by a continuous function,
The fuzzy membership function for
the fuzzy linguistic term *cool” rela
May turn out 10 be as illustrated ting to temperature
in Fig. 6.10.

cool

0[5 10 15 20 25 30 35 40
Temperature
Fig. 6.10 Continuous membership function for “cool”.

TLol U —
- -

Ll7D-‘ Neural Networks, Fuzzy Logic, and Genetic Algorithms—Syntlesis and Applications

A membership function can also be given mathematically as

The graph is as shown in Fig. 6.11.

Fig. 6.11 Continuous membership function dictated by a mathematical function.

Ditferent shapes of membership functions exist. The shapes could be triangular, trapezoidal,
curved or their variations as shown in Fig. 6.12.

u(x) ux) n(x) u(x)

X | X | X | X

Fig. 6.12 Different shapes of membership function graphs.

Example
Consider the set of people in the following age groups
0-10 40-50
10-20 50-60
20-30 60-70
30-40 70 and above
The fuzzy sets “young”, “middle-aged”, and “old” are represented by the membership function
graphs as illustrated in Fig. 6.13.

young middle aged old

0 10 20 30 40 50 60 70 80 90

Fig. 6.13 Example of fuzzy sets expressing “young”, “middle-aged”, and “old".
Fuzzy Set Theory m

6.3.2 Basic Fuzzy Set Operations

Given X to be the universe of discourse and A and B to be fuzzy sets with 14 (x) and up(x) as
their respective membership functions. the basic fuzzy set operations are as follows:

Union

The union of two fuzzy sets A and B is a new fuzzy set A U B also on X with a membership
function defined as

Hyop(x) = max (g (x), pp(x)) (6.26)


Example

Let A be the fuzzy set of young people and B be the fuzzy set of middle-aged people as
illustrated in Fig. 6.13. Now A U B. the fuzzy set of “young or middle-aged” will be given by

A U B: ‘young or middle-aged’

age —

In its discrete form, for x;, x5, x3

if : A= {(x,0.5),(x,,0.7),(x3,0)) and B = {(%,,0.8), (x,,0.2), (x3,1)}

AUB = {(x,0.8), (x,,0.7), (x3.1)}

since, Hzop(x) = max(ug(x), ps(x))

= max (0.5, 0.8)

=08

Hiop(x) = max(f; (x3), Hz(xz)) = max(0.2,0.7) = 0.7

Hiop(x3) = max(u;(x3), 5(x3)) = max(0,1) =1


Intersection

The intersection of fuzzy sets A and B is a new fuzzy set & N B with membership function
defined as
i ~5(0) = min(uz(x), A5(x)) (6:27)
|l72 Neural Networks, Fuzzy Logic, and Genetic Algorithms—Synthesis and Applications

Exan.lple

For A and B defined as “young” and “middle-aged” as illustrated in previous examples.

A N B: ‘young and middle-aged’

In its discrete form, for xy, x;, x3

if A= {(x,0.5), (x5,0.7), (x3,0)} and B = {(x,.0.8), (x5,0.2), (x3.1)}

I T ARE = (4,09, (2.0, (x3.00)


since, Hin5(x) = min (00, 25(5))
= min (0.5, 0.8)

=05
Il HBi~5(x2) = min (u3(x,), p5(x3))
min (0.7, 0.2)

‘ | =02

Hing(x3) = min(u3(x), p3(x3))


= min (0.1)

; Complement
The complement of a fuzzy set A is a new fuzzy set 4 with a membership function

Hi(0) = 1= 3 (x) (6.28)


! Example

For the fuzzy set 4 defined as “young” the complement “not young” is given by A“. In its discrete
| form. for x, xs. and x;
Fuzzy Set Theory 173]

A “not young”
e

0 10 20 30 40 50 60 70 80 90

if A= {(x1, 0.5) (2. 0.7) (x5, 0)}


then, A= (31, 0.5) (x2. 0.3) (xy, 1))
since, Hze(x) = 1= p;(x)
=1-05
=05

Hae(xa) = 1= pz(xy)
=1-0.7
=03

< Hze(xs) = 1= p15(x3)

- =1-0

-
Other operations are, = 1

Product of two Suzzy sets :

The product of two fuzzy sets 4 and 3 is a new


fuzzy set A - B whose membership function is
defined as

Hi5(x) = pz(x) py(x) (6.29)


Example k
A={(x,02), (x5, 0.8), (x3, 0.42)

B = {(x), 04) (x2, 0), (x3, 0.1)}


A- B ={(x, 0.08) (xa, 0) (x3, 0.04)}
Since Hi5(x) = p(x)
;5 (x,)
=0.2-0.4 =0.08

Hip(xa) = pi(xp)-;(x5)
B
=08-0=0

L — s
l1741 Neural Networks, Fuzzy Logic, and Genetic Algorithms—Synthesis and Applications

Hi5(x3) = pz(x3)-pz(x)
=04-0.1
=0.04
Equality

Two fuzzy sets A and B are-said to-be equal (4 = B) if 1;(x) = pz(x) (6.30)
Example

A= {(,0.2)(x,,0.8)}
B = {(x,0.6)(x,,0.8)}
€ = ((.,02)(x;.0.8)}
A# B

since ui(x) # pz(x) although

Hi(xz) = Hp(x;)
but A=C
since Hi(x) = pe(x) =02
and H3(x) = He(x;) =08
Product of a fuzzy set with a crisp number

Multiplying a fuzzy set Abya crisp number a results in a new fuzzy set product a. A with the
membership function

Ha 3 (%) = a-p5(x) (6.31)


Example
A= {(x).04), (x,,0.6). (x3,0.8))
For a=03

a A= ((x,0.12).
(x5 0.18), (x;,0.24)}
since, Hoi(x) = a-pz(x)
=03-04
=0.12
U, i) = a pz(x;)
=03-06
=0.18
Fuzzy Set Theory fil

Hoi(x3) = a pz(x)
=03-08
=024

Power of a fuzzy set

The a power of a fuzzy set A is a new fuzzy set A% whose membership function is given by

Hpe (%) = (3 () (6.32)


Raising a fuzzy set to its second power is called Concentration (CON) and taking the square root
is called Dilarion (DIL).

Example
A = {(x,0.4), (x,.0.2), (x;,0.7))
For a=2

M (x) = (15 (x))*


Hence, (A)* = {(x1,0.16), (x,,0.04), (x3,0.49))

Since Hi(x) = (3(x)) = (0.4)" = 0.16


My (x2) = (z(x2))* = (0.2) = 0.04
Hz(x3) = (z(x3)) = (0.7)F = 0.49
Difference

The difference of two fuzzy sets A and B is a new fuzzy set & - B defined as
A-B=(@AnkB) (6.33)
Example

A = {(x,,0.2), (x,,0.5), (x:.0.6)}; B = ((x,0.1), (x,.0.4), (x,0.5)}


= {(1.0.9), (x3,0.6), (x3,0.5)}
&B
1

ANB
n
]
>
I

{(51.0.2)(x,.0.5)(x3,0.5))
"

Disjunctive sum

The disjunctive sum of two fuzzy sets A and B is a new fuzzy set A ® B defined as

ADB=(AnByu(AnB) _ (6.34)

I
|176! Neural Networks, Fuzzy Logic, and Genetic Algorithms—Synthesis and Applications

Example
! A = ((x,0.4)(x;,0.8)(x,0.6)}
1 B = {(x.0.2)(x,,0.6)(x3,0.9)}

‘ Now, A° = {(x,0.6)(x5,0.2)(x;,0.4)}
%x : B = {(x,,0.8)(x:,0.4)(x;,0.1)}
“ A°A B = {(x,,0.2)(x,,0.2)(x;,0.4)}
| ANB = {(x,0.4)(x2,0.4)(x;,0.1)}

[ A® B = ((x,0.4)(x,,0.4)(x3,0.4)}
\
) 6.3.3 Properties of Fuzzy Sets
|
11 Fuzzy sets follow some of the properties satisfied by crisp sets. In fact, crisp sets can be thought
! | of as special instances of fuzzy sets. Any fuzzy set A is a subset of the reference set X. Also, the
membership of any element belonging to the null set & is 0 and the membership of any element
belonging to the reference set is 1.
The properties satisfied by fuzzy sets are

‘ [ Commutativity: AUB=BUA

! AnB=5BAnA (6.35)
‘ Associativity: Au(BuC)y=Au B)uUC
‘” An(BnC)=AnB)nC (6.36)
| _ - - N = - =
ii Distributivity: AU(BnC)=AUB) n@AuUE)
‘1 An(Bul)=AnB)u@An ) (6.37)
I Idempotence: AUA=A
‘l ‘ And=A (639)
| Identity: Av@=4
Il Aux=4
i\ ino=0
B Aux=X (6.39)
‘ ‘ Transitivi: 1fic B < C,thend < € (6.40)
13 ‘ Involution: AY=A 6.41)

3 | De Morgan’s laws: AN B)Y=@v B9


| -
| AU B)=@ANBY (6:42)
" Fuzzy Set Theory @I
Since fuzzy sets can overlap, the laws of excluded middle do not
hold good. Thus,
AVA #2X (6.43)
ANA 20 (6.44)
Example 6.5

The task is to recognize English alphabetical characters (F, E, X, Y, I,


T) in an image processing
system.
Define two fuzzy sets I and F to represent the identification of characters / and F.

1 = ((F.04), (E, 03), (X, 0.1), (¥, 0.1), (I, 0.9), (T,0.8)}
F = ((F., 0.99), (£, 0.8), (X, 0.1), (¥,02), (1, 0.5), (T; 0.5)}
Find the following. 5
@ @G TuF ) (T-F (i) FUF©
(b) Verify De Morgan's Law, (I U F)° = ¢ A f©
Solution
@ @ Tu F = ((F,0.99),(E,0.8), (X,0.1), (¥,0.2),(1,0.9),
(T,0.8)}
(ii) I-F =dnF9
= ((F,0.01),(£,0.2), (X,0.1), (¥.0.1). (1,0.5), (T,oa{
(iii) FUF = ((F,0.99), (£,0.8),(X.0.9),(,0.8),(1,0.5), (T, 0.5)}
(b) De Morgan’s Law

(TUF = [°AFC
TUF = ((F,0.99), (E,0.8), (X.0.1), (¥.0.2),(7,0.9),(T,0.8)}

(TUF* = ((F,0.01), (E,0.2),(X,0.9).(¥,0.8),(1,0.1),(T,0.2)}


7 = {(F,0.6), (£,0.7),(X.0.9),(¥,0.9), (1,0.1),(T,0.2)}

F¢ = {(F,0.01),(E,0.2), (X,0.9),(¥,0.8),(1,0.5),(T,0.5)}
and

I°nF° = {(F,0.01), (E,O.Z).(X,0.9),(Y,0.S).(’,0.1),(T,0.2)}

Hence, (TUFf = [°NF°

Example 6.6

Consider the fuzzy sets A and B defined on the interval X = (0. 5] of real numbers, by the
membership grade functions
e ST S — R - e — g

|17s Neural Networks, Fuzzy Logic, and Genetic Algorithms—Synthesis and Applications

Hi(0 = o w0 = 27
Determine the mathematical formulae and graphs of the membership grade functions of each of
the following sets

(@ ALB
b AuB
(c) AnB

@) (AuB)©

Solution

A'r

1
@a w0
() = 1= wa®)
p(x) = 1=
1= —2—
“ ulx)
T ox+1

o1 2 3 4 5
X

Ec
1
Hpe(x) = 1= pip(x)
=1-27 Hx)
21
=
0 1 2 3 4 57

AuB = A
[
118 i
(®) Hz,5(x) = max(uz(x), Hz(x)
x e} 2
:max[—x—‘ 2")
x+1

0o 1 2 3 4 5
| x
An B -
© 1 5
Hinp(x) = min (u;(x), pz(x) A
i
. (; 2».() 1(x) I
x+1 i
-
— !
|
0 x J
;

L
1 @nBy=Anb
@ Hi05e(x) = Hienpe(x) (O De Morgan's law) A Be
1

= min (Uze (), fz(x))
1 g H(x) :|
= min| ——r,
!
——
x+1" g%
|!
e
0 X 5

6.4 CRISP RELATIONS


In this section. we review crisp relations as a prelude to
fuzzy relations. The concept of relations
between sets is built on the Cartesian product operator of sets.

6.4.1 Cartesian Product

The Cartesian product of two sets A and B denoted by


A x B is the set of all ordered pairs such
that the first element in the pair belongs to 4 and the second
element belongs to B.
ie. AXB = (a.b/ueA, bzB}
If A =Band A and B are non-empty then A x B = B x 4.
The Cartesian product could be extended to n number of sets

XA = ((a.a3.05.....a,)/a < A, for everyi =1,2....,n} (6.45)

n
Observe that X A = 1:[ 1Al (6.46)
Example

Given Ar={a b).Ay={1.2).


A3 = {a},
ations
[182' Newral Networks, Fuzzy Logic, and Genetic Algorithmis—Synthesis and Applic ——

R oS (1, 1) = max(min (0. 0), min(1. 0), min(0. 0)}


since
=max (0.0, 0) =

ReS(l. 3)=max{0. 0,0} =0


R ¢S§(1.5) =max({0. 1.0} =

Similarly, ResS3.1)=0
RcS(3,3)=R :5(3.5)=R=S(5, 1)=R S (5, 3)=RoS(5\5)=0

R < § from the relation marrix is {(1, 5)}.

u
W
1


o
Also, SeR=13

o
o
3.

o
6.5 FUZZY RELATIONS ©

Fuzzy relation is a fuzzy set defined on the Cartesian product of crisp sets X1. Xa..oy X, where the
n-tuples (x;, Xs...., x,) may have varying degrees of membership within the rclatmn The
membership values indicate the strength of the relation between the tuples.

Example

Let R be the fuzzy relation between two sets X, and X: where X, is the set of diseases and
X is the set of symptoms.

X, = {typhoid, viral fever, common cold}


X, = {running nose, high temperature, shivering)

The fuzzy relation R may be defined as


Running - High Shivering e
nose temperature -
Typhoid 0.1 e 0.9 0.8
Viral fever 02 0.9 0.7
Common cold * 0.9 0.4 0.6 s

6.5.1 Fuzzy Cartesian Product

Let A be a fuzzy set defined on the universe X and B bea fuzzy set defined on the universe 11
the Cartesian product between the fuzzy sets A and 3 indicated as A x B and resulting in 2
fuzzy relaion R is given by

= sz AR
Fuzzy Set Theory @;I

R=AxBcXxy (6.52)
where R has its membership function given by

Hp(xy) = iz,5(x)
min (u5(x), 25(y)) (6.53)
Example

Let A = {(x1, 0.2), (x2, 0.7), (x3,0.4)} and B = {(y1, 0.5), (y2, 0.6)} be two fuzzy sets defined on
the universes of discourse X = (x,, x,, %3} and ¥ = (y,, y,) respecti
vely. Then the fuzzy relation &
resulting out of the fuzzy Cartesian product flxfi
is given by
o o»n
x (02 02
R=AxB=1x, (05 06
x3 |04 04
since,

R(x.) =min (#3(x1), 13(3)) = min(0.2,0.5) = 0.2


R(x.3,) =min(0.2.0.6) = 0.2 :
R(xpy) =min(0.7,0.5) = 0.5
R(x5,y2) = min(0.7,0.6) = 0.6
R(x3,%) = min(0.4,0.5) = 0.4
R(x3.y,) =min(0.4,0.6) = 0.4

6.5.2 Operations on Fuzzy Relations

Let R and § be fuzzy relations on X x Y.


Union

Hzos(ny) = max (Ug(x.y), ps(x.y)


(6.54)
Intersection

Hzns(ry) = min(ug(x,y), ps(x,y))


(6.53)
Complement

Hze(xy) = 1= pa(x,y)
(6.56)
Composition of relations
The definition is similar to that of crisp relation. Suppo
se R is a fuzzy relation defined on X x ¥.
and S is a fuzzy relati on defined on ¥ x Z. then R o Sisa fuzzy relation on X x Z. The fuzzy
Mmax-min composition is defined as
Im Newral Networks, Fuzzy Logic, and Genetic A[SO”“II"’S_S-‘"‘MCS“ and Applications

gs(x) = mayx(min(u':f(x._\')- H3(x-2)) (6.57


ye '
Example

X = (x) xa0x3) Y= (v va) Z= {2 220 33) (6.58)


»h ¥
x[0.5 0.1

Let R be a fuzzy relation x|02 09


x3{ 0.8 0.6

5 L

Let § be a fuzzy relation n[06 04 07


¥,|0.5 0.8 0.9

Then R:< S, by max-min composition yields,


a 5
x[05 04 05
ReS=x,|05 0.8 0.9
x| 0.6 0.6 0.7

Hg.s(x,2)) = max (min (0.3, 0.6), min (0.1, 0.5))

= max (0.5, 0.1)

=05

Hg.5(%),22) = max (min (0.5, 0.4), min (0.1, 0.8))

= max (0.4, 0.1)


=04
Similarly, T
Hzos(x),23) = max (0.5, 0.1) = 0.5

Hios(x2,7)) = max (0.2, 0.5) = 0.5

Mpos(x2,2,) = max (0.2, 0.8) = 0.8

Bos(x2:23) = max (0.2, 0.9)= 0.9


H.s(x3,7) = max (0.6, 0.5) = 0.6

Hzos(X3,25) = max (0.4, 0.6) = 0.6


Hios(x3.23) = max (0.7, 0.6) = 0.7

T
Fuzzy Set Theory 185' E
Example 6.7

Consider a set P = {Py, Py, P3, Py} of four varieties of


paddy plants, set D = {D,, D, D, Dy} of -
the various diseases affecting the plants and § = {S1, S, S5, s} be
the common symptoms of the
disease s.
Let R be a relation on P x D and § be a relation on D x §

i Dl DZ DJ Dl Sl S: Sl SX
- R[06 06 09 08 pfo1 02 07 09 ;
For, R =Pj01 02 09 08 S=DJ1 1 04 06
P09 03 04 08 Do 0 05 09
Sl P09 08 0.1 02 D09 1 08 02
Obtain the association of the plants with the different symptoms of the diseases using max-min
composition.

Solution
To obtain the association of the plants with the symptoms,
R o § which is a relation on the sets P
and S is to be computed. : B 7 i
Using max-min composition,

S S 8 S,
FR[08 08 08 09
RoS= P08 0.8 0.8 0.9
P08 0.8 0.8 0.9
P08 0.8 0.7 0.9

SUMMARY

¢ Fuzzy set theory is an effective tool to tackle the proble


m of uncertainty.
¢ In crisp logic, an event can take on only two
values, either a | or 0 depending on
whether its occurrence is true or false respectively
. However, in fuzzy logic. the event
may take a range of values between 0 and 1.
* Crisp sets are fundamental to the study of fuzzy sets. The basic concepts include
universal set. membership. cardinality of a set. family of sets. Venn diagrams. null set,
singleton set, power set. subset, and super set. The basic
are operations on Crisp sets
union. intersection. complement. and difference. A
set of preperties are satisfied by crisp
sets. Also, the concept of parition and covering result
in the two important rules. namely
rule of addition and principle of inclusion and exclusion.
¢ Fuzzy sets support a flexible sense of membership and
is defined to be the pair (x. ui(x)
where 1;(x) could be discrete or could be described
by a continuous function. The
membership functions could be triangular, trapezoidal.
curved or its variations.

You might also like