Professional Documents
Culture Documents
منطق غيمي الجلسة الثامنة
منطق غيمي الجلسة الثامنة
منطق غيمي الجلسة الثامنة
if x is A, then y is B
x is A
-----------------------then y is B
y is B needs to be inferred from the premise A
B
How do we define B ?
max min composition
B = max {min(A, A B)}
Example
:Given universe
U = {1, 2, 3}
V = {4, 5, 6, 7}
A = u is 2 = {0.8, 1, 0.8}
B = v is 4 = {1, 0.8, 0.3, 0}
1
2
3
A B = 1 if A B, else B
Given A
First we calculate
AB=
u is 3 = {0.3, 0.8, 1}
1 1 0.3 0
1 0.8 0.3 0
1 1 0.3 0
Then:
B(4) = max {0.3, 0.8, 1}
B(5) = max {0.3, 0.8, 1}
B(6) = max {0.3, 0.3, 0.3}
B(7) = max {0, 0, 0}
B = {1, 1, 0.3, 0}
B = {1, 1, 0.3, 0}
this result is a fuzzy set,
and not a definite crisp
answer
a defuzzified answer can
be found in various ways
a popular way is to find
the centre of mass
:thus we can say
if u = 2 then v =4
u = 3
------------------------------
then v = 5.42
Building Systems: An
Example
:The Basic Tipping Problem
Given a number between 0 and 10 that
represents the quality of service at a restaurant
, (where 10 is excellent)
and another number between 0 and 10 that
represents the quality of the food at that
, restaurant (again, 10 is excellent)
?what should the tip be
7
The rules
If the service is poor or the food is rancid, then. 1
.tip is cheap
.If the service is good, then tip is average. 2
If the service is excellent or the food is. 3
delicious, then tip is
.generous
:Assume that
,an average tip is 15%
a generous tip is 25%, and
8 . a cheap tip is 5%
:Four Steps
Step
Step
Step
Step
1.
2.
3.
4.
10
11
12
13
Step 4: Defuzzify
The final output of the fuzzy system
must be
:a crisp number. For this process
The input aggregate output from
step 3
The output a single number
14
Defuzzification (Cont)
15
16
17
18
19
20
21
22
23