Beruflich Dokumente
Kultur Dokumente
Debasis Samanta
IIT Kharagpur
dsamanta@iitkgp.ac.in
06.02.2018
Note :
(1) A × B 6= B × A
(2) |A × B| = |A| × |B|
(3)A × B provides a mapping from a ∈ A to b ∈ B.
3 5 7
1 0 0 0
2 1 0 0
R=
0
3 0 0
4 0 1 0
Intersection:
Complement:
R(x, y ) = 1 − R(x, y)
Example:
Suppose, R(x, y) and S(x, y ) are the two relations define over two
crisp sets x ∈ A and y ∈ B
0 1 0 0 1 0 0 0
0 0 1 0
and S = 0 1 0 0 ;
R= 0 0 0 1 0 0 1 0
0 0 0 0 0 0 0 1
Find the following:
1 R∪S
2 R∩S
3 R
Max-Min Composition
Given the two relation matrices R and S, the max-min composition is
defined as T = R ◦ S ;
Suppose
A is a fuzzy set on the universe of discourse X with µA (x)|x ∈ X
B is a fuzzy set on the universe of discourse Y with µB (y)|y ∈ Y
Then R = A × B ⊂ X × Y ; where R has its membership function given
by µR (x, y ) = µA×B (x, y) = min{µA (x), µB (y )}
Example :
A = {(a1 , 0.2), (a2 , 0.7), (a3 , 0.4)}and B = {(b1 , 0.5), (b2 , 0.6)}
b1 b2
a1 0.2 0.2
R =A×B = a2 0.5 0.6
a3 0.4 0.4
µR (a, b) = 1 − µR (a, b)
Composition
T =R◦S
µR◦S = maxy∈Y {min(µR (x, y ), µS (y , z))}
(Binary) fuzzy relations are fuzzy sets A × B which map each element
in A × B to a membership grade between 0 and 1 (both inclusive).
Note that a membership function of a binary fuzzy relation can be
depicted with a 3D plot.
( x, y )
Important: Binary fuzzy relations are fuzzy sets with two dimensional
MFs and so on.
Hint:
The basic assumption upon which crisp logic is based - that every
proposition is either TRUE or FALSE.
a b ∧ ∨ ¬a =⇒ =
0 0 0 0 1 1 1
1 1 1
0 2 0 2 1 1 2
0 1 0 1 1 1 0
1 1 1 1 1
2 0 0 2 2 2 2
1 1 1 1 1 1
2 2 2 2 2 2 1
1 1 1 1
2 1 2 1 2 1 2
1 0 0 1 1 0 0
1 1 1 1
1 2 2 1 1 2 2
1 1 1 1 1 1 1
Example 1:
P : Ram is honest
Intelligent: {(x1 , 0.3), (x2 , 0.4), (x3 , 0.1), (x4 , 0.6), (x5 , 0.9)}
We define a fuzzy proposition as follows:
P : x is intelligent
The canonical form of fuzzy proposition of this type, P is
expressed by the sentence P : v is F .
Predicate in terms of fuzzy set.
P : v is F ; where v is an element that takes values v from some
universal set V and F is a fuzzy set on V that represents a fuzzy
predicate.
In other words, given, a particular element v , this element belongs
to F with membership grade µF (v ).
Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.02.2018 27 / 64
Graphical interpretation of fuzzy proposition
F (v )
P: v is F
T(P)
T(P) = µF(v) for a v ε V
v V
If x is A then y is B
P = { 1,2,3,4} and T ={ 10, 15, 20, 25, 30, 35, 40, 45, 50 }
Let the linguistic variable High temperature and Low pressure are
given as
THIGH =
{(20, 0.2), (25, 0.4), (30, 0.6), (35, 0.6), (40, 0.7), (45, 0.8), (50, 0.8)}
A entails B
T-norm operator
The most frequently used T-norm operators are:
Minimum : Tmin (a, b) = min(a, b) = a ∧ b
Algebric product : Tap (a, b) = ab
Bounded product : Tbp (a, b) = 0 ∨ (a + b − 1)
a if b=1
Drastic product : Tdp = b if a=1
0 if a, b < 1
Min operator:
R
Rm = A × B = X ×Y µA (x) ∧ µB (y )|(x,y) or fmin (a, b) = a ∧ b
[Mamdani rule]
Propositional calculus :
R : A → B = Ā ∪ (A ∩ B)
Rmm = (A × B) ∪ (Ā × Y )
1 2 3 4
a 1 1 1 1
b 0.2 0.2 0.2 0.2
Ā × Y =
0.4 0.4 0.4 0.4
c
d 0 0 0 0
Therefore,
1 2 3 4
a 1 1 1 1
b 0.2 0.8 0.8 0.2
Rmm = (A × B) ∪ (Ā × Y ) =
0.4 0.6 0.6 0.4
c
d 0.2 1.0 0.8 0
X = {a, b, c, d}
Y = {1, 2, 3, 4}
Let, A = {(a, 0.0), (b, 0.8), (c, 0.6), (d, 1.0)}
B = {(1, 0.2), (2, 1.0), (3, 0.8), (4, 0.0)}
Determine the implication relation :
If x is A then y is B
1 2 3 4
a 0 0 0 0
b 0.2 0.8 0.8 0
Here, A × B =
0.2 0.6 0.6 0
c
d 0.2 1.0 0.8 0
1 2 3 4
a 1 1 1 1
b 0.2 0.2 0.2 0.2
and Ā × Y =
0.4 0.4 0.4 0.4
c
d 0 0 0 0
1 2 3 4
a 1 1 1 1
b 0.2 0.8 0.8 0.2
Rmm = (A × B) ∪ (Ā × Y ) =
0.4 0.6 0.6 0.4
c
d 0.2 1.0 0.8 0
This R represents If x is A then y is B
IF x is A THEN y is B ELSE y is C.
The relation R is equivalent to
R = (A × B) ∪ (Ā × C)
X = {a, b, c, d}
Y = {1, 2, 3, 4}
A = {(a, 0.0), (b, 0.8), (c, 0.6), (d, 1.0)}
B = {(1, 0.2), (2, 1.0), (3, 0.8), (4, 0.0)}
C = {(1, 0), (2, 0.4), (3, 1.0), (4, 0.8)}
Determine the implication relation :
If x is A then y is B else y is C
1 2 3 4
a 0 0 0 0
b 0.2 0.8 0.8 0
Here, A × B =
0.2 0.6 0.6 0
c
d 0.2 1.0 0.8 0
1 2 3 4
a 0 0.4 1.0 0.8
b 0 0.2 0.2 0.2
and Ā × C =
0 0.4 0.4 0.4
c
d 0 0 0 0
1 2 3 4
a 0 0.4 1.0 0.8
b 0.2 0.8 0.8 0.2
R=
0.2
c 0.6 0.6 0.4
d 0.2 1.0 0.8 0
{
If x is A then y is B else y is C
{ {
1 Modus Ponens : P, P =⇒ Q, ⇔Q
2 Modus Tollens : P =⇒ Q, ¬Q ⇔, ¬P
3 Chain rule : P =⇒ Q, Q =⇒ R ⇔, P =⇒ R
Given
1 C∨D
2 ∼ H =⇒ (A∧ ∼ B)
3 C ∨ D =⇒∼ H
4 (A∧ ∼ B) =⇒ (R ∨ S)
Similar concept is also followed in fuzzy logic to infer a fuzzy rule from
a set of given fuzzy rules (also called fuzzy rule base).
0 0
Here, A, B, A and B are fuzzy sets.
0 0
To compute the membership function A and B the max-min
0 0
composition of fuzzy sets B and A ,respectively with R(x, y)
(which is the known implication relation) is to be used.
Thus,
0 0
B = A ◦ R(x, y) µB (y) = max[min(µA0 (x), µR (x, y ))]
0 0
A = B ◦ R(x, y) µA (x) = max[min(µB 0 (y), µR (x, y ))]
P : If x is A then y is B
If x is A Then y is B
0
x is A
————————————–
0
y is B
0 0
We are to find B = A ◦ R(x, y ) where R(x, y) = max{A × B, A × Y }
y1 y2 y1 y2
x1 0.5 0.4 x1 0.5 0.5
A×B = x2 1 0.4 and A × Y = x2 0 0
x3 0.6 0.4 x3 0.4 0.4
1 y
2 y
x1 0.5 0.5
R(x, y ) = (A × B) ∪ (A × y) = x2 1 0.4
x3 0.6 0.4
0
Now, A = {(x1 , 0.6), (x2 , 0.9), (x3 , 0.7)}
0 0
Therefore, B = A◦ R(x, y)=
0.5 0.5
0.6 0.9 0.7 ◦ 1 0.4 = 0.9 0.5
0.6 0.4
0 0
Thus we derive that y is B where B = {(y1 , 0.9), (y2 , 0.5)}
P: If x is A Then y is B
0
Q: y is B
——————————————
0
x is A
Given that :
Let,
X = {30, 40, 50, 60, 70, 80, 90, 100} be the set of temperatures.
Y = {10, 20, 30, 40, 50, 60} be the set of rotations per minute.
R = (H × S) ∪ (H × Y )