0% found this document useful (0 votes)
130 views

Fuzzy Logic

Fuzzy set theory is an extension of classical set theory that allows for gradual membership in sets rather than binary membership. In fuzzy set theory, the membership of elements in a set is defined by a membership function that assigns a value between 0 and 1, representing the degree of membership. This allows for capturing vagueness and uncertainty, unlike classical sets which only allow an element to either fully belong or not belong. Examples of fuzzy concepts include young, tall, and small, where there is no clear boundary defining membership.

Uploaded by

Rammah Yusuf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

Fuzzy Logic

Fuzzy set theory is an extension of classical set theory that allows for gradual membership in sets rather than binary membership. In fuzzy set theory, the membership of elements in a set is defined by a membership function that assigns a value between 0 and 1, representing the degree of membership. This allows for capturing vagueness and uncertainty, unlike classical sets which only allow an element to either fully belong or not belong. Examples of fuzzy concepts include young, tall, and small, where there is no clear boundary defining membership.

Uploaded by

Rammah Yusuf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Fuzzy Set Theory

What is Fuzzy Set ?

• The word "fuzzy" means "vagueness". Fuzziness occurs when the


boundary of a piece of information is not clear-cut.

• Fuzzy sets have been introduced by Lotfi A. Zadeh (1965) as an


extension of the classical notion of set.

• Classical set theory allows the membership of the elements in the set
in binary terms, a bivalent condition - an element either belongs or
does not belong to the set.

Fuzzy set theory permits the gradual assessment of the membership


of elements in a set, described with the aid of a membership function
valued in the real unit interval [0, 1].

• Example:
Words like young, tall, good, or high are fuzzy.

− There is no single quantitative value which defines the term young.

− For some people, age 25 is young, and for others, age 35 is young.

− The concept young has no clean boundary.

− Age 1 is definitely young and age 100 is definitely not young;

− Age 35 has some possibility of being young and usually depends


on the context in which it is being considered.
Introduction

In real world, there exists much fuzzy knowledge;


Knowledge that is vague, imprecise, uncertain, ambiguous, inexact, or
probabilistic in nature.

Human thinking and reasoning frequently involve fuzzy information,


originating from inherently inexact human concepts. Humans, can give
satisfactory answers, which are probably true.

However, our systems are unable to answer many questions. The reason
is, most systems are designed based upon classical set theory and
two-valued logic which is unable to cope with unreliable and incomplete
information and give expert opinions.
• Classical Set Theory
A Set is any well defined collection of objects. An object in a set is
called an element or member of that set.

− Sets are defined by a simple statement describing whether a


particular element having a certain property belongs to that
particular set.

− Classical set theory enumerates all its elements using


A = { a 1 , a2 , a3 , a4 , . . . . a n }

If the elements ai (i = 1, 2, 3, . . . n) of a set A are subset of


universal set X, then set A can be represented for all elements

x ∈ X by its characteristic function

1 if x∈ X
µA (x) =
0 otherwise

− A set A is well described by a function called characteristic


function.
This function, defined on the universal space X, assumes :
a value of 1 for those elements x that belong to set A, and
a value of 0 for those elements x that do not belong to set A.
The notations used to express these mathematically are

Α : Χ → [0, 1]
A(x) = 1 , x is a member of A Eq.(1)
A(x) = 0 , x is not a member of A

Alternatively, the set A can be represented for all elements x ∈ X


by its characteristic function µA (x) defined as

1 if x ∈X
µA (x) = Eq.(2)
0 otherwise

− Thus in classical set theory µA (x) has only the values 0 ('false')
and 1 ('true''). Such sets are called crisp sets.
• Fuzzy Set Theory
Fuzzy set theory is an extension of classical set theory where
elements have varying degrees of membership. A logic based on
the two truth values, True and False, is sometimes inadequate when
describing human reasoning. Fuzzy logic uses the whole interval between
0 (false) and 1 (true) to describe human reasoning.

− A Fuzzy Set is any set that allows its members to have different

degree of membership, called membership function, in the interval


[0 , 1].

− The degree of membership or truth is not same as probability;

ƒ fuzzy truth is not likelihood of some event or condition.


ƒ fuzzy truth represents membership in vaguely defined sets;

− Fuzzy logic is derived from fuzzy set theory dealing with reasoning
that is approximate rather than precisely deduced from classical
predicate logic.

− Fuzzy logic is capable of handling inherently imprecise concepts.

− Fuzzy logic allows in linguistic form the set membership values to

imprecise concepts like "slightly", "quite" and "very".

− Fuzzy set theory defines Fuzzy Operators on Fuzzy Sets.


• Crisp and Non-Crisp Set

− As said before, in classical set theory, the characteristic function


µA(x) of Eq.(2) has only values 0 ('false') and 1 ('true'').
Such sets are crisp sets.

− For Non-crisp sets the characteristic function µA(x) can be defined.


ƒ The characteristic function µA(x) of Eq. (2) for the crisp set is
generalized for the Non-crisp sets.
ƒ This generalized characteristic function µA(x) of Eq.(2) is called
membership function.
Such Non-crisp sets are called Fuzzy Sets.

− Crisp set theory is not capable of representing descriptions and

classifications in many cases; In fact, Crisp set does not provide


adequate representation for most cases.
• Representation of Crisp and Non-Crisp Set
Example : Classify students for a basketball team
This example explains the grade of truth value.
- tall students qualify and not tall students do not qualify
- if students 1.8 m tall are to be qualified, then
should we exclude a student who is 1/10" less? or
should we exclude a student who is 1" shorter?

■ Non-Crisp Representation to represent the notion of a tall person.

Degree or grade of truth Degree or grade of truth

Not Tall Tall Not Tall Tall


1 1

0 0
1.8 m Height x 1.8 m Height x

Crisp logic Non-crisp logic

Fig. 1 Set Representation – Degree or grade of truth

A student of height 1.79m would belong to both tall and not tall sets
with a particular degree of membership.

As the height increases the membership grade within the tall set would
increase whilst the membership grade within the not-tall set would
decrease.
• Capturing Uncertainty
Instead of avoiding or ignoring uncertainty, Lotfi Zadeh introduced Fuzzy
Set theory that captures uncertainty.

■ A fuzzy set is described by a membership function µA (x) of A.


This membership function associates to each element xσ ∈ X a
number as µA (xσ ) in the closed unit interval [0, 1].

The number µA (xσ ) represents the degree of membership of xσ in A.


■ The notation used for membership function µA (x) of a fuzzy set A is

Α : Χ → [0, 1]

■ Each membership function maps elements of a given universal base

set X , which is itself a crisp set, into real numbers in [0, 1] .


■ Example

µ
µc (x) µF (x)
1
C F
0.5

0 x

Fig. 2 Membership function of a Crisp set C and Fuzzy set F

■ In the case of Crisp Sets the members of a set are :

either out of the set, with membership of degree " 0 ",


or in the set, with membership of degree " 1 ",

Therefore, Crisp Sets ⊆ Fuzzy Sets

In other words, Crisp Sets are Special cases of Fuzzy Sets.


• Examples of Crisp and Non-Crisp Set

Example 1: Set of prime numbers ( a crisp set)

If we consider space X consisting of natural numbers ≤ 12


ie X = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
Then, the set of prime numbers could be described as follows.
PRIME = {x contained in X | x is a prime number} = {2, 3, 5, 6, 7, 11}

Example 2: Set of SMALL ( as non-crisp set)

A Set X that consists of SMALL cannot be described;


for example 1 is a member of SMALL and 12 is not a member of SMALL.

Set A, as SMALL, has un-sharp boundaries, can be characterized by a


function that assigns a real number from the closed interval from 0 to 1 to
each element x in the set X.
Fuzzy Set

A Fuzzy Set is any set that allows its members to have different degree
of membership, called membership function, in the interval [0 , 1].

• Definition of Fuzzy set


A fuzzy set A, defined in the universal space X, is a function defined
in X which assumes values in the range [0, 1].

A fuzzy set A is written as a set of pairs {x, A(x)} as


A = {{x , A(x)}} , x in the set X
where x is an element of the universal space X, and
A(x) is the value of the function A for this element.

The value A(x) is the membership grade of the element x in a


fuzzy set A.

Example : Set SMALL in set X consisting of natural numbers ≤ to 12.

Assume: SMALL(1) = 1, SMALL(2) = 1, SMALL(3) = 0.9, SMALL(4) = 0.6,


SMALL(5) = 0.4, SMALL(6) = 0.3, SMALL(7) = 0.2, SMALL(8) = 0.1,
SMALL(u) = 0 for u >= 9.

Then, following the notations described in the definition above :


Set SMALL = {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3}, {7, 0.2},
{8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

Note that a fuzzy set can be defined precisely by associating with


each x , its grade of membership in SMALL.

• Definition of Universal Space


Originally the universal space for fuzzy sets in fuzzy logic was
defined only on the integers. Now, the universal space for fuzzy sets
and fuzzy relations is defined with three numbers.

The first two numbers specify the start and end of the universal space,
and the third argument specifies the increment between elements.
This gives the user more flexibility in choosing the universal space.

Example : The fuzzy set of numbers, defined in the universal space


X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]
Fuzzy Membership

A fuzzy set A defined in the universal space X is a function defined


in X which assumes values in the range [0, 1].

A fuzzy set A is written as a set of pairs {x, A(x)}.


A = {{x , A(x)}} , x in the set X
where x is an element of the universal space X, and
A(x) is the value of the function A for this element.

The value A(x) is the degree of membership of the element x


in a fuzzy set A.

The Graphic Interpretation of fuzzy membership for the fuzzy sets :


Small, Prime Numbers, Universal-space, Finite and Infinite
UniversalSpace, and Empty are illustrated in the next few slides.
• Graphic Interpretation of Fuzzy Sets SMALL
The fuzzy set SMALL of small numbers, defined in the universal space
X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]

The Set SMALL in set X is :


SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

Therefore SetSmall is represented as


SetSmall = FuzzySet [{{1,1},{2,1}, {3,0.9}, {4,0.6}, {5,0.4},{6,0.3}, {7,0.2},
{8, 0.1}, {9, 0}, {10, 0}, {11, 0}, {12, 0}} , UniversalSpace → {1, 12, 1}]

FuzzyPlot [ SMALL, AxesLable → {"X", "SMALL"}]


SMALL
1
.8

.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Sets SMALL
• Graphic Interpretation of Fuzzy Sets PRIME Numbers

The fuzzy set PRIME numbers, defined in the universal space


X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]

The Set PRIME in set X is :


PRIME = FuzzySet {{1, 0}, {2, 1}, {3, 1}, {4, 0}, {5, 1}, {6, 0}, {7, 1}, {8, 0},
{9, 0}, {10, 0}, {11, 1}, {12, 0}}

Therefore SetPrime is represented as


SetPrime = FuzzySet [{{1,0},{2,1}, {3,1}, {4,0}, {5,1},{6,0}, {7,1},
{8, 0}, {9, 0}, {10, 0}, {11, 1}, {12, 0}} , UniversalSpace → {1, 12, 1}]

FuzzyPlot [ PRIME, AxesLable → {"X", "PRIME"}]


PRIME
1
.8

.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Sets PRIME

• Graphic Interpretation of Fuzzy Sets UNIVERSALSPACE

In any application of sets or fuzzy sets theory, all sets are subsets of
a fixed set called universal space or universe of discourse denoted by X.
Universal space X as a fuzzy set is a function equal to 1 for all elements.

The fuzzy set UNIVERSALSPACE numbers, defined in the universal


space X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]

The Set UNIVERSALSPACE in set X is :

UNIVERSALSPACE = FuzzySet {{1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1},
{7, 1}, {8, 1}, {9, 1}, {10, 1}, {11, 1}, {12, 1}}

Therefore SetUniversal is represented as


SetUniversal = FuzzySet [{{1,1},{2,1}, {3,1}, {4,1}, {5,1},{6,1}, {7,1},
{8, 1}, {9, 1}, {10, 1}, {11, 1}, {12, 1}} , UniversalSpace → {1, 12, 1}]

FuzzyPlot [ UNIVERSALSPACE, AxesLable → {"X", " UNIVERSAL SPACE "}]


UNIVERSAL SPACE
1
.8

.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Set UNIVERSALSPACE

• Finite and Infinite Universal Space


Universal sets can be finite or infinite.
Any universal set is finite if it consists of a specific number of different
elements, that is, if in counting the different elements of the set, the
counting can come to an end, else the set is infinite.

Examples:
1. Let N be the universal space of the days of the week.
N = {Mo, Tu, We, Th, Fr, Sa, Su}. N is finite.
2. Let M = {1, 3, 5, 7, 9, ...}. M is infinite.
3. Let L = {u | u is a lake in a city }. L is finite.
(Although it may be difficult to count the number of lakes in a city,
but L is still a finite universal set.)
• Graphic Interpretation of Fuzzy Sets EMPTY

An empty set is a set that contains only elements with a grade of


membership equal to 0.
Example: Let EMPTY be a set of people, in Minnesota, older than 120.
The Empty set is also called the Null set.

The fuzzy set EMPTY , defined in the universal space


X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]

The Set EMPTY in set X is :


EMPTY = FuzzySet {{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0},
{8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}}

Therefore SetEmpty is represented as


SetEmpty = FuzzySet [{{1,0},{2,0}, {3,0}, {4,0}, {5,0},{6,0}, {7,0},
{8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}} , UniversalSpace → {1, 12, 1}]

FuzzyPlot [ EMPTY, AxesLable → {"X", " UNIVERSAL SPACE "}]


EMPTY
1
.8

.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Set EMPTY
Fuzzy Operations

A fuzzy set operations are the operations on fuzzy sets. The fuzzy set
operations are generalization of crisp set operations. Zadeh [1965]
formulated the fuzzy set theory in the terms of standard operations:
Complement, Union, Intersection, and Difference.

In this section, the graphical interpretation of the following standard


fuzzy set terms and the Fuzzy Logic operations are illustrated:

Inclusion : FuzzyInclude [VERYSMALL, SMALL]

Equality : FuzzyEQUALITY [SMALL, STILLSMALL]

Complement : FuzzyNOTSMALL = FuzzyCompliment [Small]

Union : FuzzyUNION = [SMALL ∪ MEDIUM]

Intersection : FUZZYINTERSECTON = [SMALL ∩ MEDIUM]

• Inclusion
Let A and B be fuzzy sets defined in the same universal space X.
The fuzzy set A is included in the fuzzy set B if and only if for every x in
the set X we have A(x) ≤ B(x)
Example :
The fuzzy set UNIVERSALSPACE numbers, defined in the universal
space X = { xi } = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} is presented as
SetOption [FuzzySet, UniversalSpace → {1, 12, 1}]

The fuzzy set B SMALL


The Set SMALL in set X is :
SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

Therefore SetSmall is represented as


SetSmall = FuzzySet [{{1,1},{2,1}, {3,0.9}, {4,0.6}, {5,0.4},{6,0.3}, {7,0.2},
{8, 0.1}, {9, 0}, {10, 0}, {11, 0}, {12, 0}} , UniversalSpace → {1, 12, 1}]
The fuzzy set A VERYSMALL
The Set VERYSMALL in set X is :
VERYSMALL = FuzzySet {{1, 1 }, {2, 0.8 }, {3, 0.7}, {4, 0.4}, {5, 0.2},
{6, 0.1}, {7, 0 }, {8, 0 }, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

Therefore SetVerySmall is represented as


SetVerySmall = FuzzySet [{{1,1},{2,0.8}, {3,0.7}, {4,0.4}, {5,0.2},{6,0.1},
{7,0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}} , UniversalSpace → {1, 12, 1}]

The Fuzzy Operation : Inclusion


Include [VERYSMALL, SMALL]
Membership Grade B A

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Inclusion
FuzzyPlot [SMALL, VERYSMALL]
• Comparability
Two fuzzy sets A and B are comparable
if the condition A ⊂ B or B ⊂ A holds, ie,
if one of the fuzzy sets is a subset of the other set, they are comparable.

Two fuzzy sets A and B are incomparable


If the condition A ⊄ B or B ⊄ A holds.

Example 1:
Let A = {{a, 1}, {b, 1}, {c, 0}} and
B = {{a, 1}, {b, 1}, {c, 1}}.
Then A is comparable to B, since A is a subset of B.
Example 2 :
Let C = {{a, 1}, {b, 1}, {c, 0.5}} and
D = {{a, 1}, {b, 0.9}, {c, 0.6}}.
Then C and D are not comparable since
C is not a subset of D and
D is not a subset of C.
Property Related to Inclusion :
for all x in the set X, if A(x) ⊂ B(x) ⊂

• Equality
Let A and B be fuzzy sets defined in the same space X.
Then A and B are equal, which is denoted X = Y
if and only if for all x in the set X, A(x) = B(x).
Example.
The fuzzy set B SMALL
SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The fuzzy set A STILLSMALL


STILLSMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4},
{6, 0.3}, {7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The Fuzzy Operation : Equality


Equality [SMALL, STILLSMALL]
Membership Grade B A

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X

Fig Graphic Interpretation of Fuzzy Equality


FuzzyPlot [SMALL, STILLSMALL]

Note : If equality A(x) = B(x) is not satisfied even for one element x in
the set X, then we say that A is not equal to B.
• Complement
Let A be a fuzzy set defined in the space X.
Then the fuzzy set B is a complement of the fuzzy set A, if and only if,
for all x in the set X, B(x) = 1 - A(x).

The complement of the fuzzy set A is often denoted by A' or Ac or A


Fuzzy Complement : Ac(x) = 1 – A(x)
Example 1.
The fuzzy set A SMALL
SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The fuzzy set Ac NOTSMALL


NOTSMALL = FuzzySet {{1, 0 }, {2, 0 }, {3, 0.1}, {4, 0.4}, {5, 0.6}, {6, 0.7},
{7, 0.8}, {8, 0.9}, {9, 1 }, {10, 1 }, {11, 1}, {12, 1}}

The Fuzzy Operation : Compliment


NOTSMALL = Compliment [SMALL]
Membership Grade A Ac

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X

Fig Graphic Interpretation of Fuzzy Compliment


FuzzyPlot [SMALL, NOTSMALL]
Example 2.
The empty set Φ and the universal set X, as fuzzy sets, are
complements of one another.
Φ' = X , X' = Φ

The fuzzy set B EMPTY


Empty = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0}, {5, 0}, {6, 0},
{7, 0}, {8, 0}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The fuzzy set A UNIVERSAL


Universal = FuzzySet {{1, 1 }, {2, 1 }, {3, 1}, {4, 1}, {5, 1}, {6, 1},
{7, 1}, {8, 1}, {9, 1 }, {10, 1 }, {11, 1}, {12, 1}}

The fuzzy operation : Compliment


EMPTY = Compliment [UNIVERSALSPACE]
Membership Grade B A

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Compliment
FuzzyPlot [EMPTY, UNIVERSALSPACE]
• Union
Let A and B be fuzzy sets defined in the space X.
The union is defined as the smallest fuzzy set that contains both A and B.
The union of A and B is denoted by A ∪ B.
The following relation must be satisfied for the union operation :
for all x in the set X, (A ∪ B)(x) = Max (A(x), B(x)).

Fuzzy Union : (A ∪ B)(x) = max [A(x), B(x)] for all x ∈X

Example 1 : Union of Fuzzy A and B

A(x) = 0.6 and B(x) = 0.4 ∴ (A ∪ B)(x) = max [0.6, 0.4] = 0.6

Example 2 : Union of SMALL and MEDIUM


The fuzzy set A SMALL
SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The fuzzy set B MEDIUM


MEDIUM = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0.2}, {5, 0.5}, {6, 0.8},
{7, 1}, {8, 1}, {9, 0.7 }, {10, 0.4 }, {11, 0.1}, {12, 0}}

The fuzzy operation : Union


FUZZYUNION = [SMALL ∪ MEDIUM]
SetSmallUNIONMedium = FuzzySet [{{1,1},{2,1}, {3,0.9}, {4,0.6}, {5,0.5},
{6,0.8}, {7,1}, {8, 1}, {9, 0.7}, {10, 0.4}, {11, 0.1}, {12, 0}} ,
UniversalSpace → {1, 12, 1}]
Membership Grade FUZZYUNION = [SMALL ∪ MEDIUM]

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Union
FuzzyPlot [UNION]

The notion of the union is closely related to that of the connective "or".
Let A is a class of "Young" men, B is a class of "Bald" men.
If "David is Young" or "David is Bald," then David is associated with the
union of A and B. Implies David is a member of A ∪ B.
• Intersection

Let A and B be fuzzy sets defined in the space X. Intersection is defined


as the greatest fuzzy set that include both A and B. Intersection of A and
B is denoted by A ∩ B. The following relation must be satisfied for the
intersection operation :
for all x in the set X, (A ∩ B)(x) = Min (A(x), B(x)).
Fuzzy Intersection : (A ∩ B)(x) = min [A(x), B(x)] for all x ∈X

Example 1 : Intersection of Fuzzy A and B

A(x) = 0.6 and B(x) = 0.4 ∴ (A ∩ B)(x) = min [0.6, 0.4] = 0.4

Example 2 : Union of SMALL and MEDIUM

The fuzzy set A SMALL


SMALL = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0 }, {10, 0 }, {11, 0}, {12, 0}}

The fuzzy set B MEDIUM


MEDIUM = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0.2}, {5, 0.5}, {6, 0.8},
{7, 1}, {8, 1}, {9, 0.7 }, {10, 0.4 }, {11, 0.1}, {12, 0}}

The fuzzy operation : Intersection


FUZZYINTERSECTION = min [SMALL ∩ MEDIUM]
SetSmallINTERSECTIONMedium = FuzzySet [{{1,0},{2,0}, {3,0}, {4,0.2},
{5,0.4}, {6,0.3}, {7,0.2}, {8, 0.1}, {9, 0},
{10, 0}, {11, 0}, {12, 0}} , UniversalSpace → {1, 12, 1}]

Membership Grade FUZZYINTERSECTON = [SMALL ∩ MEDIUM]

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X
Fig Graphic Interpretation of Fuzzy Union
FuzzyPlot [INTERSECTION]
• Difference

Let A and B be fuzzy sets defined in the space X.


The difference of A and B is denoted by A ∩ B'.
Fuzzy Difference : (A - B)(x) = min [A(x), 1- B(x)] for all x ∈X

Example : Difference of MEDIUM and SMALL

The fuzzy set A MEDIUM


MEDIUM = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0.2}, {5, 0.5}, {6, 0.8},
{7, 1}, {8, 1}, {9, 0.7 }, {10, 0.4 }, {11, 0.1}, {12, 0}}

The fuzzy set B SMALL


MEDIUM = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0.7 }, {10, 0.4 }, {11, 0}, {12, 0}}

Fuzzy Complement : Bc(x) = 1 – B(x)


The fuzzy set Bc NOTSMALL
NOTSMALL = FuzzySet {{1, 0 }, {2, 0 }, {3, 0.1}, {4, 0.4}, {5, 0.6}, {6, 0.7},
{7, 0.8}, {8, 0.9}, {9, 1 }, {10, 1 }, {11, 1}, {12, 1}}

The fuzzy operation : Difference by the definition of Difference


FUZZYDIFFERENCE = [MEDIUM ∩ SMALL']
SetMediumDIFFERECESmall = FuzzySet [{{1,0},{2,0}, {3,0}, {4,0.2},
{5,0.5}, {6,0.7}, {7,0.8}, {8, 0.9}, {9, 0.7},
{10, 0.4}, {11, 0.1}, {12, 0}} , UniversalSpace → {1, 12, 1}]

Membership Grade FUZZYDIFFERENCE = [MEDIUM ∪ SMALL' ]

.8
.6
.4
.2
0
0 1 2 3 4 5 6 7 8 9 10 11 12 X

Fig Graphic Interpretation of Fuzzy Union


FuzzyPlot [UNION]
Fuzzy Properties

Properties related to Union, Intersection, Differences are illustrated below.

• Properties Related to Union


The properties related to union are :
Identity, Idempotence, Commutativity and Associativity.

■ Identity:

A∪Φ =A
input = Equality [SMALL ∪ EMPTY , SMALL]
output = True

A∪X=X
input = Equality [SMALL ∪ UnivrsalSpace , UnivrsalSpace]
output = True
■ Idempotence :

A∪A=A
input = Equality [SMALL ∪ SMALL , SMALL]
output = True
■ Commutativity :

A∪B =B∪A
input = Equality [SMALL ∪ MEDIUM, MEDIUM ∪ SMALL]
output = True
■ Associativity:

A ∪ (B∪ C) = (A∪ B) ∪ C

input = Equality [Small ∪ (Medium ∪ Big) , (Small ∪ Medium) ∪ Big]


output = True
Fuzzy Set Small , Medium , Big

Small = FuzzySet {{1, 1 }, {2, 1 }, {3, 0.9}, {4, 0.6}, {5, 0.4}, {6, 0.3},
{7, 0.2}, {8, 0.1}, {9, 0.7 }, {10, 0.4 }, {11, 0}, {12, 0}}

Medium = FuzzySet {{1, 0 }, {2, 0 }, {3, 0}, {4, 0.2}, {5, 0.5}, {6, 0.8},
{7, 1}, {8, 1}, {9, 0 }, {10, 0 }, {11, 0.1}, {12, 0}}

Big = FuzzySet [{{1,0}, {2,0}, {3,0}, {4,0}, {5,0}, {6,0.1},


{7,0.2}, {8,0.4}, {9,0.6}, {10,0.8}, {11,1}, {12,1}}]

Calculate Fuzzy relations :

(1) Medium ∪ Big = FuzzySet [{1,0},{2,0}, {3,0}, {4,0.2}, {5,0.5},


{6,0.8},{7,1}, {8, 1}, {9, 0.6}, {10, 0.8}, {11, 1}, {12, 1}]

(2) Small ∪ Medium = FuzzySet [{1,1},{2,1}, {3,0.9}, {4,0.6}, {5,0.5},


{6,0.8}, {7,1}, {8, 1}, {9, 0.7}, {10, 0.4}, {11, 0.1}, {12, 0}]

(3) Small ∪ (Medium ∪ Big) = FuzzySet [{1,1},{2,1}, {3,0.9}, {4,0.6},


{5,0.5}, {6,0.8}, {7,1}, {8, 1}, {9, 0.7}, {10, 0.8}, {11, 1}, {12, 1}]

(4) (Small ∪ Medium) ∪ Big] = FuzzySet [{1,1},{2,1}, {3,0.9}, {4,0.6},


{5,0.5}, {6,0.8}, {7,1}, {8, 1}, {9, 0.7},{10, 0.8}, {11, 1},{12, 1}]

Fuzzy set (3) and (4) proves Associativity relation


• Properties Related to Intersection
Absorption, Identity, Idempotence, Commutativity, Associativity.

■ Absorption by Empty Set :

A∩Φ =Φ
input = Equality [Small ∩ Empty , Empty]
output = True

■ Identity :

A∩ X=A
input = Equality [Small ∩ UnivrsalSpace , Small]
output = True
■ Idempotence :

A∩ A=A
input = Equality [Small ∩ Small , Small]
output = True
■ Commutativity :

A∩ B=B∩ A
input = Equality [Small ∩ Big , Big ∩ Small]
output = True

■ Associativity :

A ∩ (B ∩ C) = (A ∩ B) ∩ C
input = Equality [Small ∩ (Medium ∩ Big), (Small ∩ Medium) ∩ Big]
output = True
• Additional Properties
Related to Intersection and Union

■ Distributivity:

A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
input = Equality [Small ∩ (Medium ∪ Big) ,
(Small ∩ Medium) ∪ (Small ∩ Big)]
output = True

■ Distributivity:

A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
input = Equality [Small ∪ (Medium ∩ Big) ,
(Small ∪ Medium) ∩ (Small ∪ Big)]
output = True
■ Law of excluded middle :

A ∪ A' = X
input = Equality [Small ∪ NotSmall , UnivrsalSpace ]
output = True
■ Law of contradiction

A ∩ A' = Φ
input = Equality [Small ∩ NotSmall , EmptySpace ]
output = True
• Cartesian Product Of Two Fuzzy Sets
■ Cartesian Product of two Crisp Sets

Let A and B be two crisp sets in the universe of discourse X and Y..
The Cartesian product of A and B is denoted by A x B
Defined as A x B = { (a , b) │ a ∈ A , b ∈ B }
Note : Generally AxB ≠BxA
Example : Graphic representation of A x B
B
Let A = {a, b, c} and B = {1, 2}
2
then A x B = { (a , 1) , (a , 2) ,
(b , 1) , (b , 2) , 1

(c , 1) , (c , 2) } A
a b c

■ Cartesian product of two Fuzzy Sets

Let A and B be two fuzzy sets in the universe of discourse X and Y.


The Cartesian product of A and B is denoted by A x B
Defined by their membership function µ A (x) and µ B (y) as

µ A x B (x , y) = min [ µ A (x) , µ B (y) ] = µ A (x) ∧ µ B (y)


or µ A x B (x , y) = µ A (x) µ B (y)
for all x ∈ X and y ∈ Y

Thus the Cartesian product A x B is a fuzzy set of ordered pair


(x , y) for all x ∈ X and y ∈ Y, with grade membership of (x , y) in
X xY given by the above equations .

In a sense Cartesian product of two Fuzzy sets is a Fuzzy Relation.


Fuzzy Relations

Fuzzy Relations describe the degree of association of the elements;


Example : “x is approximately equal to y”.

− Fuzzy relations offer the capability to capture the uncertainty and vagueness

in relations between sets and elements of a set.

− Fuzzy Relations make the description of a concept possible.

− Fuzzy Relations were introduced to supersede classical crisp relations;


It describes the total presence or absence of association of elements.

In this section, first the fuzzy relation is defined and then expressing fuzzy
relations in terms of matrices and graphical visualizations. Later the
properties of fuzzy relations and operations that can be performed with fuzzy
relations are illustrated.
3.1 Definition of Fuzzy Relation

Fuzzy relation is a generalization of the definition of fuzzy set


from 2-D space to 3-D space.

• Fuzzy relation definition


Consider a Cartesian product
A x B = { (x , y) | x ∈ A, y ∈ B}

where A and B are subsets of universal sets U1 and U2.

Fuzzy relation on A x B is denoted by R or R(x , y) is defined as the set

R = { ((x , y) , µR (x , y)) | (x , y) ∈ A x B , µR (x , y) ∈ [0,1] }

where µR (x , y) is a function in two variables called membership function.

− It gives the degree of membership of the ordered pair (x , y) in R

associating with each pair (x , y) in A x B a real number in the


interval [0 , 1].
− The degree of membership indicates the degree to which x is in
relation to y.
• Example of Fuzzy Relation
R = { ((x1 , y1) , 0)) , ((x1 , y2) , 0.1)) , ((x1 , y3) , 0.2)) ,
((x2 , y1) , 0.7)) , ((x2 , y2) , 0.2)) , ((x2 , y3) , 0.3)) ,
((x3 , y1) , 1)) , ((x3 , y2) , 0.6)) , ((x3 , y3) , 0.2)) ,
The relation can be written in matrix form as

y y1 Y2 Y3
x
x1 0 0.1 0.2
R
X2 0.7 0.2 0.3
X3 1 0.6 0.2

where symbol means ' is defined as' and


the values in the matrix are the values of membership function:

µR (x1 , y1) = 0 µR (x1 , y2) = 0.1 µR (x1 , y3) = 0.2


µR (x2 , y1) = 0.7 µR (x2, y2) = 0.2 µR (x2 , y3) = 0.3
µR (x3 , y1) = 1 µR (x3 , y2) = 0.6 µR (x3 , y3) = 0.2

Assuming x1 = 1 , x2 = 2 , x3 = 3 and y1 = 1 , y2= 2 , y3= 3 ,


the relation can be graphically represented by points in 3-D space
(X, Y, µ) as :

µ
1 Note : Since the values of the
.8
.6
membership function 0.7, 1, 0.6
.4 are in the direction of x below the
.2
1 2 3 y major diagonal (0, 0.2, 0.2) in the
0
matrix are grater than those
1
0.1, 0.2, 0.3 in the direction of y,
2
we therefore say that the relation
3
x R describes x is grater than y.

Fig Fuzzy Relation R describing


x greater than y
Forming Fuzzy Relations

Assume that V and W are two collections of objects.

A fuzzy relation is characterized in the same way as it is in a fuzzy set.

− The first item is a list containing element and membership grade pairs,

{{v1, w1}, R11}, {{ v1, w2}, R12}, ... , {{ vn, wm}, Rnm}}.
where { v1, w1}, { v1, w2}, ... , { vn, wm} are the elements of the relation
are defined as ordered pairs, and { R11 , R12 , ... , Rnm} are the membership
grades of the elements of the relation that range from 0 to 1, inclusive.
− The second item is the universal space; for relations, the universal space

consists of a pair of ordered pairs,


{{ Vmin, Vmax, C1}, { Wmin, Wmax, C2}}.

where the first pair defines the universal space for the first set and the second
pair defines the universal space for the second set.
Example showing how fuzzy relations are represented
Let V = {1, 2, 3} and W = {1, 2, 3, 4}.
A fuzzy relation R is, a function defined in the space V x W, which takes
values from the interval [0, 1] , expressed as R : V x W → [0, 1]
R = FuzzyRelation [{{{1, 1}, 1}, {{1, 2}, 0.2}, {{1, 3}, 0.7}, {{1, 4}, 0},
{{2, 1}, 0.7}, {{2, 2}, 1}, {{2, 3}, 0.4}, {{2, 4}, 0.8},
{{3, 1}, 0}, {{3, 2}, 0.6}, {{3, 3}, 0.3}, {{3, 4}, 0.5},
UniversalSpace → {{1, 3, 1}, {1, 4, 1}}]

This relation can be represented in the following two forms shown below
Membership matrix form 1 µ Graph form
.8

w w1 w2 w3 w4 .6
v .4
v1 1 0.2 0.7 0 .2
R
v2 0.7 1 0.4 0.8 0 1 2 3 4w

v3 0 0.6 0.3 0.5


1

2
3
v
Vertical lines represent membership grades

Elements of fuzzy relation are ordered pairs {vi , wj}, where vi is first and
wj is second element. The membership grades of the elements are
represented by the heights of the vertical lines.
Projections of Fuzzy Relations

Definition : A fuzzy relation on A x B is denoted by R or R(x , y) is


defined as the set
R = { ((x , y) , µR (x , y)) | (x , y) ∈ A x B , µR (x , y) ∈ [0,1] }

where µR (x , y) is a function in two variables called membership


function. The first, the second and the total projections of fuzzy
relations are stated below.

• First Projection of R : defined as

R
(1)
= {(x) , µ R(1) (x , y))}
= {(x) , max µ R (x , y)) | (x , y) ∈AxB}
Y

• Second Projection of R : defined as

R
(2)
= {(y) , µ R(2) (x , y))}
= {(y) , max µ R (x , y)) | (x , y) ∈ AxB}
X

• Total Projection of R : defined as

{µ R (x , y) | (x , y) ∈AxB}
(T) max max
R =
X Y

Note : In all these three expression

max means max with respect to y while x is considered fixed


Y

max means max with respect to x while y is considered fixed


X

The Total Projection is also known as Global projection


• Example : Fuzzy Projections
The Fuzzy Relation R together with First, Second and Total Projection
of R are shown below.
(1)
y y1 y2 y3 y4 Y5 R
x
x1 0.1 0.3 1 0.5 0.3 1

x2 0.2 0.5 0.7 0.9 0.6 0.9


R
x3 0.3 0.6 1 0.8 0.2 1

(2)
R 0.3 0.6 1 0.9 0.6 1 = R(T)

Note :

(1)
For R select max means max with respect to y while x is considered fixed
Y

For R(2) select max means max with respect to x while y is considered fixed
x

For R(T) select max with respect to R(1) and R(2)

The Fuzzy plot of these projections are shown below.

R(1) R(2)
1 1
.8 .8
.6 .6
.4 .4
.2 .2
0 x y
0
1 2 3 4 5 1 2 3 4 5
(1) (2)
Fig Fuzzy plot of 1st projection R Fig Fuzzy plot of 2nd projection R
Max-Min and Min-Max Composition

The operation composition combines the fuzzy relations in different


variables, say (x , y) and (y , z) ; x ∈ A , y∈B, z∈C.
Consider the relations :
R1(x , y) = { ((x , y) , µR1 (x , y)) | (x , y) ∈ A x B }

R2(y , z) = { ((y , y) , µR1 (y , z)) | (y , z) ∈ B x C }

The domain of R1 is A x B and the domain of R2 is B x C

• Max-Min Composition

Definition : The Max-Min composition denoted by R1 ο R2 with membership

function µ R1 ο R2 defined as
R1 ο R2 = { ((x , z) , max(min (µR1 (x , y) , µR2 (y , z))))} ,
Y
(x , z) ∈AxC, y ∈B

Thus R1 ο R2 is relation in the domain A x C

An example of the composition is shown in the next slide.


• Example : Max-Min Composition
Consider the relations R1(x , y) and R2(y , z) as given below.

y y1 y2 y3 z z1 z2 z3
x y
R1 x1 0.1 0.3 0 y1 0.8 0.2 0
R2
x2 0.8 1 0.3 y2 0.2 1 0.6

y3 0.5 0 0.4

Note : Number of columns in the first table and second table are equal.
Compute max-min composition denoted by R1 ο R2 :
Step -1 Compute min operation (definition in previous slide).
Consider row x1 and column z1 , means the pair (x1 , z1) for all yj ,
j = 1, 2, 3, and perform min operation

min (µR1 (x1 , y1) , µR2 (y1 , z1)) = min (0.1, 0.8) = 0.1,

min (µR1 (x1 , y2) , µR2 (y2 , z1)) = min (0.3, 0.2) = 0.2,

min (µR1 (x1 , y3) , µR2 (y3 , z1)) = min ( 0, 0.5) = 0,

Step -2 Compute max operation (definition in previous slide).

For x = x1 , z = z1 , y = yj , j = 1, 2, 3,
Calculate the grade membership of the pair (x1 , z1) as
{ (x1 , z1) , max ( (min (0.1, 0.8), min (0.3, 0.2), min (0, 0.5) )

i.e. { (x1 , z1) , max(0.1, 0.2, 0) }


i.e. { (x1 , z1) , 0.2 }
Hence the grade membership of the pair (x1 , z1) is 0.2 .

Similarly, find all the grade membership of the pairs


(x1 , z2) , (x1 , z3) , (x2 , z1) , (x2 , z2) , (x2 , z3)

The final result is


z z1 z2 z3
x
R1 ο R2 = x1 0.1 0.3 0

x2 0.8 1 0.3

Note : If tables R1 and R2 are considered as matrices, the operation


composition resembles the operation multiplication in matrix calculus linking
row by columns. After each cell is occupied max-min value (the product is
replaced by min, the sum is replaced by max).
• Example : Min-Max Composition
The min-max composition is similar to max-min composition with the
difference that the roll of max and min are interchanged.

Definition : The max-min composition denoted by R1 R2 with membership


function µ R1 R2 is defined by
R1 R2 = { ((x , z) , min (max (µR1 (x , y) , µR2 (y , z))))} ,
y
(x , z) ∈ AxC, y ∈ B

Thus R1 R2 is relation in the domain A x C

Consider the relations R1(x , y) and R2(y , z) as given by the same


relation of previous example of max-min composition, that is

y y1 y2 y3 z z1 z2 z3
x y
R1 x1 0.1 0.3 0 y1 0.8 0.2 0
R2
x2 0.8 1 0.3 y2 0.2 1 0.6
y3 0.5 0 0.4

After computation in similar way as done in the case of max-min


composition, the final result is

z z1 z2 z3
x
R1 R2 = x1 0.3 0 0.1

x2 0.5 0.4 0.4

• Relation between Max-Min and Min-Max Compositions


The Max-Min and Min-Max Compositions are related by the formula

R1 ο R2 = R1 R2
Fuzzy Systems

What are Fuzzy Systems ?

• Fuzzy Systems include Fuzzy Logic and Fuzzy Set Theory.

• Knowledge exists in two distinct forms :


− the Objective knowledge that exists in mathematical form is used in
engineering problems; and
− the Subjective knowledge that exists in linguistic form, usually
impossible to quantify.
Fuzzy Logic can coordinate these two forms of knowledge in a logical way.

• Fuzzy Systems can handle simultaneously the numerical data and


linguistic knowledge.

• Fuzzy Systems provide opportunities for modeling of conditions which


are inherently imprecisely defined.

• Many real world problems have been modeled, simulated, and


replicated with the help of fuzzy systems.

• The applications of Fuzzy Systems are many like : Information retrieval


systems, Navigation system, and Robot vision.

• Expert Systems design have become easy because their domains are
inherently fuzzy and can now be handled better;
examples : Decision-support systems, Financial planners, Diagnostic
system, and Meteorological system.
Introduction

Any system that uses Fuzzy mathematics may be viewed as Fuzzy system.

The Fuzzy Set Theory - membership function, operations, properties and the
relations have been described in previous lectures. These are the
prerequisites for understanding Fuzzy Systems. The applications of Fuzzy set
theory is Fuzzy logic which is covered in this section.

Here the emphasis is on the design of fuzzy system and fuzzy controller in a
closed–loop. The specific topics of interest are :
− Fuzzification of input information,
− Fuzzy Inferencing using Fuzzy sets ,

− De-Fuzzification of results from the Reasoning process, and

− Fuzzy controller in a closed–loop.

Fuzzy Inferencing, is the core constituent of a fuzzy system. A block schematic


of Fuzzy System is shown in the next slide. Fuzzy Inferencing combines the
facts obtained from the Fuzzification with the fuzzy rule base and
conducts the Fuzzy Reasoning Process.
• Fuzzy System
A block schematic of Fuzzy System is shown below.

Fuzzy
Rule Base

Input output
variables variables

X1 Fuzzy Y1
X2 Y2
Fuzzification Inferencing Defuzzification
Xn Ym

Membeship Function

Fig. Elements of Fuzzy System


Fuzzy System elements

T
− Input Vector : X = [x1 , x2, . . . xn ] are crisp values, which are
transformed into fuzzy sets in the fuzzification block.
T
− Output Vector : Y = [y1 , y2, . . . ym ] comes out from the
defuzzification block, which transforms an output fuzzy set back to
a crisp value.
− Fuzzification : a process of transforming crisp values into grades of

membership for linguistic terms, "far", "near", "small" of fuzzy sets.


− Fuzzy Rule base : a collection of propositions containing linguistic
variables; the rules are expressed in the form:
If (x is A ) AND (y is B ) ...... THEN (z is C)
where x, y and z represent variables (e.g. distance, size) and
A, B and Z are linguistic variables (e.g. `far', `near', `small').
− Membership function : provides a measure of the degree of similarity

of elements in the universe of discourse U to fuzzy set.


− Fuzzy Inferencing : combines the facts obtained from the Fuzzification

with the rule base and conducts the Fuzzy reasoning process.
− Defuzzyfication: Translate results back to the real world values.
Fuzzy Logic

A simple form of logic, called a two-valued logic is the study of "truth tables"
and logic circuits. Here the possible values are true as 1, and false as 0.

This simple two-valued logic is generalized and called fuzzy logic which treats
"truth" as a continuous quantity ranging from 0 to 1.

Definition : Fuzzy logic (FL) is derived from fuzzy set theory dealing with
reasoning that is approximate rather than precisely deduced from classical
two-valued logic.

− FL is the application of Fuzzy set theory.

− FL allows set membership values to range (inclusively) between 0 and 1.

− FL is capable of handling inherently imprecise concepts.

− FL allows in linguistic form, the set membership values to imprecise concepts

like "slightly", "quite" and "very".


Classical Logic

Logic is used to represent simple facts. Logic defines the ways of putting
symbols together to form sentences that represent facts. Sentences are
either true or false but not both are called propositions.
Examples :
Sentence Truth value Is it a Proposition ?
"Grass is green" "true" Yes
"2 + 5 = 5" "false" Yes
"Close the door" - No
"Is it hot out side ?" - No
"x > 2" - No (since x is not defined)
"x = x" - No
(don't know what is "x" and "="
mean; "3 = 3" or say "air is equal
to air" or "Water is equal to water"
has no meaning)

• Propositional Logic (PL)


A proposition is a statement - which in English is a declarative sentence
and Logic defines the ways of putting symbols together to form
sentences that represent facts. Every proposition is either true or false.
Propositional logic is also called boolean algebra.

Examples: (a) The sky is blue., (b) Snow is cold. , (c) 12 * 12=144

Propositional logic : It is fundamental to all logic.

‡ Propositions are “Sentences”; either true or false but not both.

‡ A sentence is smallest unit in propositional logic

‡ If proposition is true, then truth value is "true"; else “false”

‡ Example ; Sentence "Grass is green";


Truth value “ true”;
Proposition “yes”
■ Statement, Variables and Symbols

Statement : A simple statement is one that does not contain any


other statement as a part. A compound statement is one that has
two or more simple statements as parts called components.

Operator or connective : Joins simple statements into compounds,


and joins compounds into larger compounds.

Symbols for connectives

assertion P "p is true"


nagation ¬p ~ ! NOT "p is false"

conjunction p∧q · && & AND "both p and q are true"


disjunction P v q || ‫׀‬ OR "either p is true,
or q is true,
or both "

implication p→ q ⊃ ⇒ if . . then "if p is true, then q is true"


" p implies q "

equivalence ↔ ≡ ⇔ if and only if "p and q are either both true


or both false"

■ Truth Value

The truth value of a statement is its truth or falsity ,


p is either true or false,
~p is either true or false,
pvq is either true or false, and so on.

"T" or "1" means "true". and


"F" or "0" means "false"
Truth table is a convenient way of showing relationship between several
propositions. The truth table for negation, conjunction, disjunction,
implication and equivalence are shown below.

p q ¬p ¬q p ∧ q p v q p→q p↔q q→p


T T F F T T T T T
T F F T F T F F T
F T T F F T T F F
F F T T F F T T T
■ Tautology

A Tautology is proposition formed by combining other propositions


(p, q, r, . . .) which is true regardless of truth or falsehood of p, q,
r, . . . .
The important tautologies are :
(p→q) ↔ ¬ [p ∧ (¬q)] and (p→q) ↔ (¬p) ∨ q

A proof of these tautologies, using the truth tables are given below.
Tautologies (p→q) ↔ ¬ [p ∧ (¬q)] and (p→q) ↔ (¬p) ∨ q
Table 1: Proof of Tautologies
p q p→q ¬q p ∧ (¬q) ¬ [p ∧ (¬q)] ¬p (¬p) ∨ q
T T T F F T F T
T F F T T F F F
F T T F F T T T
F F T T F T T T

Note :
1. The entries of two columns p→q and ¬ [p ∧ (¬q)] are identical,
proves the tautology. Similarly, the entries of two columns p→q and
(¬p) ∨ q are identical, proves the other tautology.
2. The importance of these tautologies is that they express the
membership function for p→q in terms of membership functions of
either propositions p and ¬q or ¬p and q.
■ Equivalences

Between Logic , Set theory and Boolean algebra.

Some mathematical equivalence between Logic and Set theory and


the correspondence between Logic and Boolean algebra (0, 1) are
given below.

Logic Boolean Algebra (0, 1) Set theory


T 1
F 0
∧ x ∩ , ∩
∨ + ∪ , U
¬ ′ ie complement (―)
↔ =
p, q, r a, b, c
■ Membership Functions obtain from facts

Consider the facts (the two tautologies)


(p→q) ↔ ¬ [p ∧ (¬q)] and (p→q) ↔ (¬p) ∨ q

Using these facts and the equivalence between logic and set theory, we
can obtain membership functions for µp→ q (x , y) .
From 1st fact : µp→q (x , y) = 1 - µ p ∩ q (x , y)
= 1 – min [µ p(x) , 1 - µ q (y)] Eq (1)

From 2nd fact : µp→q (x , y) = 1 - µ p Uq (x , y)

= max [ 1 - µ p (x) , µ q (y)] Eq (2)

Boolean truth table below shows the validation membership functions


Table-2 : Validation of Eq (1) and Eq (2)

µ p(x) µ q(y) 1 - µ p (x) 1 - µ q (y) max [ 1 - µ p (x) , 1 – min [µ p(x) ,


µ q (y)] 1 - µ q (y)]
1 1 0 0 1 1
1 0 0 1 0 0
0 1 1 0 1 1
0 0 1 1 1 1

Note :
1. Entries in last two columns of this table-2 agrees with the entries in
table-1 for p→q , the proof of tautologies, read T as 1 and F as 0.
2. The implication membership functions of Eq.1 and Eq.2 are not
the only ones that give agreement with p→q. The others are :
µp→q (x , y) = 1 - µ p (x) (1 - µ q (y)) Eq (3)

µp→q (x , y) = min [ 1, 1 - µ p (x) + µ q (y)] Eq (4)


■ Modus Ponens and Modus Tollens

In traditional propositional logic there are two important inference


rules, Modus Ponens and Modus Tollens.
Modus Ponens
Premise 1 : " x is A "
Premise 2 : " if x is A then y is B " ; Consequence : " y is B "
Modus Ponens is associated with the implication " A implies B " [A→B]
In terms of propositions p and q, the Modus Ponens is expressed as
(p ∧ (p → q)) → q
Modus Tollens
Premise 1 : " y is not B "
Premise 2 : " if x is A then y is B " ; Consequence : " x is not A "
In terms of propositions p and q, the Modus Tollens is expressed as
(¬ q ∧ (p → q)) → ¬ p
Fuzzy Logic

Like the extension of crisp set theory to fuzzy set theory, the extension of
crisp logic is made by replacing the bivalent membership functions of the
crisp logic with the fuzzy membership functions.

In crisp logic, the truth value acquired by the proposition are 2-valued,
namely true as 1 and false as 0.

In fuzzy logic, the truth values are multi-valued, as absolute true, partially
true, absolute false etc represented numerically as real value between
0 to 1.

Note : The fuzzy variables in fuzzy sets, fuzzy propositions, fuzzy relations
~
etc are represented usually using symbol ~ as P but for the purpose of
easy to write it is always represented as P .
• Recaps
01 Membership function µ A (x) describes the membership of the elements x of
the base set X in the fuzzy set A .
02 Fuzzy Intersection operator ∩ ( AND connective ) applied to two fuzzy sets A

and B with the membership functions µ A (x) and µ B (x) based on min/max
operations is µ A ∩ B = min [ µ A (x) , µ B (x) ] , x ∈ X (Eq. 01)
03 Fuzzy Intersection operator ∩ ( AND connective ) applied to two fuzzy sets A

and B with the membership functions µ A (x) and µ B (x) based on algebraic
product is µA ∩ B = µ A (x) µ B (x) , x ∈ X (Eq. 02)
04 Fuzzy Union operator U ( OR connective ) applied to two fuzzy sets A and B
with the membership functions µ A (x) and µ B (x) based on min/max
operations is µ A U B = max [ µ A (x) , µ B (x) ] , x ∈ X (Eq. 03)

05 Fuzzy Union operator U ( OR connective ) applied to two fuzzy sets A and B

with the membership functions µ A (x) and µ B (x) based on algebraic sum is
µA UB = µ A (x) + µ B (x) - µ A (x) µ B (x) , x ∈ X (Eq. 04)
06 Fuzzy Compliment operator ( ―
) ( NOT operation ) applied to fuzzy set A
with the membership function µ A (x) is µ A= 1 - µ A (x) , x ∈ X (Eq. 05)
07 Fuzzy relations combining two fuzzy sets by connective "min operation" is an

operation by cartesian product R : X x Y → [0 , 1].


µ R(x,y) = min[µ A (x), µ B (y)] (Eq. 06) or
Y V h-m m
x
µ R(x,y) = µ A (x) µ B (y) (Eq. 07) G 1 0.5 0.0
R
Example : Relation R between fruit colour x Y 0.3 1 0.4
R 0 0.2 1
and maturity grade y characterized by base set
linguistic colorset X = {green, yellow, red}
maturity grade as Y = {verdant, half-mature, mature}

08 Max-Min Composition - combines the fuzzy relations

variables, say (x , y) and (y , z) ; x ∈ A , y ∈ B , z ∈ C .


consider the relations :
R1(x , y) = { ((x , y) , µR1 (x , y)) | (x , y) ∈ A x B }
R2(y , z) = { ((y , y) , µR1 (y , z)) | (y , z) ∈ B x C }
The domain of R1 is A x B and the domain of R2 is B x C
max-min composition denoted by R1 ο R2 with membership function µ R1 ο R2
R1 ο R2 = { ((x , z) , max (min (µR1 (x , y) , µR2 (y , z))))} ,
y (x , z) ∈ A x C , y ∈ B (Eq. 08)
Thus R1 ο R2 is relation in the domain A x C
• Fuzzy Propositional
A fuzzy proposition is a statement P which acquires a fuzzy truth
value T(P) .
Example :
P : Ram is honest
T(P) = 0.8 , means P is partially true.
T(P) = 1 , means P is absolutely true.

• Fuzzy Connectives

The fuzzy logic is similar to crisp logic supported by connectives.


Table below illustrates the definitions of fuzzy connectives.
Table : Fuzzy Connectves
Connective Symbols Usage Definition
Nagation ¬ ¬P 1 – T(P)
Disjuction ∨ P∨ Q Max[T(P) , T(Q)]

Conjuction ∧ P∧ Q min[T(P) , T(Q)]

Implication ⇒ P⇒ Q ¬P ∨ Q = max (1-T(P), T(Q)]

Here P , Q are fuzzy proposition and T(P) , T(Q) are their truth values.
− the P and Q are related by the ⇒ operator are known as antecedents

and consequent respectively.


− as crisp logic, here in fuzzy logic also the operator ⇒ represents

IF-THEN statement like,

IF x is A THEN y is B, is equivalent to
R = (A x B) U (¬ A x Y)
the membership function of R is given by
µR (x , y) = max [min (µA (x) , µB (y)) , 1 − µA (x)]
− For the compound implication statement like

IF x is A THEN y is B, ELSE y is C is equivalent to


R = (A x B) U (¬ A x C)
the membership function of R is given by
µR (x , y) = max [min (µA (x) , µB (y)) , min (1 − µA (x), µC (y))]
Example 1 : (Ref : Previous slide)

P : Mary is efficient , T(P) = 0.8 ,

Q : Ram is efficient , T(Q) = 0.65 ,

¬P : Mary is efficient , T(¬ P) = 1 − T(P) = 1− 0.8 = 0.2

P ∧ Q : Mary is efficient and so is Ram, i.e.

T(P ∧ Q) = min (T(P), T(Q)) = min (0.8, 0.65)) = 0.65

P ∨ Q : Either Mary or Ram is efficient i.e.

T(P ∨ Q) = max (T(P), T(Q)) = max (0.8, 0.65)) = 0.8

P ⇒ Q : If Mary is efficient then so is Ram, i.e.

T(P ⇒ Q) = max (1− T(P), T(Q)) = max (0.2, 0.65)) = 0.65

Example 2 : (Ref : Previous slide on fuzzy connective)

Let X = {a, b, c, d} ,
A = {(a, 0) (b, 0.8) (c, 0.6) (d, 1)}
B = {(1, 0.2) (2, 1) (3, 0.8) (4, 0)}
C = {(1, 0) (2, 0.4) (3, 1) (4, 0.8)}
Y = { 1, 2, 3, 4} the universe of discourse could be viewed as
{ (1, 1) (2, 1) (3, 1) (4, 1) }
i.e., a fuzzy set all of whose elements x have µ(x) = 1

Determine the implication relations


(i) If x is A THEN y is B
(ii) If x is A THEN y is B Else y is C
Solution
To determine implication relations (i) compute :
The operator ⇒ represents IF-THEN statement like,

IF x is A THEN y is B, is equivalent to R = (A x B) U (¬ A x Y) and


the membership function R is given by
µR (x , y) = max [min (µA (x) , µB (y)) , 1 − µA (x)]
Fuzzy Intersection A x B is defined as : Fuzzy Intersection ¬A x Y is defined as :
for all x in the set X, for all x in the set X
(A ∩ B)(x) = min [A(x), B(x)], (¬A ∩ Y)(x) = min [A(x), Y(x)],

B 1 2 3 4 y 1 2 3 4
A A
a 0 0 0 0 a 1 1 1 1
b 0.2 0.8 0.8 0 ¬A x Y = b 0.2 0.2 0.2 0.2
AxB =
c 0.2 0.6 0.6 0 c 0.4 0.4 0.4 0.4
d 0.2 1 0.8 0 d 0 0 0 0

Fuzzy Union is defined as (A ∪ B)(x) = max [A(x), B(x)] for all x ∈X


Therefore R = (A x B) U (¬ A x Y) gives

y 1 2 3 4
x
a 1 1 1 1
b 0.2 0.8 0.8 0
R =
c 0.4 0.6 0.6 0.4
d 0.2 1 0.8 0

This represents If x is A THEN y is B ie T(A ⇒ B) = max (1- T(A), T(B))

To determine implication relations (ii) compute : (Ref : Previous slide)


Given X = {a, b, c, d} ,
A = {(a, 0) (b, 0.8) (c, 0.6) (d, 1)}
B = {(1, 0.2) (2, 1) (3, 0.8) (4, 0)}
C = {(1, 0) (2, 0.4) (3, 1) (4, 0.8)}

Here, the operator ⇒ represents IF-THEN-ELSE statement like,

IF x is A THEN y is B Else y is C, is equivalent to


R = (A x B) U (¬ A x C) and
the membership function of R is given by
µR (x , y) = max [min (µA (x) , µB (y)) , min(1 − µA (x), µC (y)]
Fuzzy Intersection A x B is defined as : Fuzzy Intersection ¬A x Y is defined as :
for all x in the set X, for all x in the set X
(A ∩ B)(x) = min [A(x), B(x)], (¬A ∩ C)(x) = min [A(x), C(x)],
B 1 2 3 4 y 1 2 3 4
A A
a 0 0 0 0 a 0 0.4 1 0.8

AxB =
b 0.2 0.8 0.8 0 ¬A x C = b 0.2 0.2 0.2 0.2
c 0.2 0.6 0.6 0 c 0.4 0.4 0.4 0.4
d 0.2 1 0.8 0 d 0 0 0 0

Fuzzy Union is defined as (A ∪ B)(x) = max [A(x), B(x)] for all x ∈X


Therefore R = (A x B) U (¬ A x C) gives

y 1 2 3 4
x
a 1 1 1 1
b 0.2 0.8 0.8 0
R =
c 0.4 0.6 0.6 0.4
d 0.2 1 0.8 0

This represents If x is A THEN y is B Else y is C

• Fuzzy Quantifiers
In crisp logic, the predicates are quantified by quantifiers.
Similarly, in fuzzy logic the propositions are quantified by quantifiers.
There are two classes of fuzzy quantifiers :
− Absolute quantifiers and

− Relative quantifiers

Examples :

Absolute quantifiers Relative quantifiers

round about 250 almost


much greater than 6 about
some where around 20 most
Fuzzification

The fuzzification is a process of transforming crisp values into grades of


membership for linguistic terms of fuzzy sets.
The purpose is to allow a fuzzy condition in a rule to be interpreted.

• Fuzzification of the car speed


Example 1 : Speed X0 = 70km/h
Fig below shows the fuzzification of the car speed to characterize a
low and a medium speed fuzzy set.

Low Medium Given car speed value X0=70km/h :


1 µ
.8
µA µB grade µA(x0) = 0.75 belongs to

.6 fuzzy low, and grade µB(x0) = 0.25


.4 belongs to fuzzy medium
.2

0
20 40 60 80 100 120 140
Speed X0 = 70km/h

Characterizing two grades, low and


medium speed fuzzy set

Example 2 : Speed X0 = 40km/h

Given car speed value X0=40km/h :


Medium
µ V Low Low High V High grade µA(x0) = 0.6 belongs to fuzzy
1
low, and grade µB(x0) = 0.4 belongs
.8

.6 to fuzzy medium.
.4

.2

0
10 20 30 40 50 60 70 80 90 00
Speed X0 = 40km/h

Characterizing five grades, Very low,


low, medium, high and very high
speed fuzzy set
Fuzzy Inference

Fuzzy Inferencing is the core element of a fuzzy system.


Fuzzy Inferencing combines - the facts obtained from the fuzzification with the
rule base, and then conducts the fuzzy reasoning process.

Fuzzy Inference is also known as approximate reasoning.


Fuzzy Inference is computational procedures used for evaluating linguistic
descriptions. Two important inferring procedures are
− Generalized Modus Ponens (GMP)

− Generalized Modus Tollens (GMT)

• Generalized Modus Ponens (GMP)

This is formally stated as


If x is A THEN y is B
x is ¬A
y is ¬B
where A , B , ¬A , ¬B are fuzzy terms.

Note : Every fuzzy linguistic statements above the line is analytically known
and what is below the line is analytically unknown.

To compute the membership function ¬B , the max-min composition


of fuzzy set ¬A with R(x , y) which is the known implication relation
(IF-THEN) is used. i.e. ¬B = ¬A ο R(x, y)
In terms of membership function

µ ¬B (y) = max (min ( µ ¬A (x) , µR (x , y))) where


µ ¬A (x) is the membership function of ¬A ,
µR (x , y) is the membership function of the implication relation and
µ ¬B (y) is the membership function of ¬B
• Generalized Modus Tollens (GMT)
This is formally stated as
If x is A THEN y is B
y is ¬B
x is ¬A
where A , B , ¬A , ¬B are fuzzy terms.

Note : Every fuzzy linguistic statements above the line is analytically known
and what is below the line is analytically unknown.

To compute the membership function ¬A , the max-min composition


of fuzzy set ¬B with R(x , y) which is the known implication relation
(IF-THEN) is used. i.e. ¬A = ¬B ο R(x, y)

In terms of membership function

µ ¬A (y) = max (min ( µ ¬B (x) , µR (x , y))) where


µ ¬B (x) is the membership function of ¬B ,
µR (x , y) is the membership function of the implication relation and
µ ¬A (y) is the membership function of ¬A

Example :

Apply the fuzzy Modus Ponens rules to deduce Rotation is quite slow?
Given :
(i) If the temperature is high then then the rotation is slow.
(ii) The temperature is very high.
Let H (High) , VH (Very High) , S (Slow) and QS (Quite Slow) indicate the
associated fuzzy sets.
Let the set for temperatures be X = {30, 40, 50, 60, 70, 80, 90, 100} , and
Let the set of rotations per minute be Y = {10, 20, 30, 40, 50, 60} and
H = {(70, 1) (80, 1) (90, 0.3)}
VH = {(90, 0.9) (100, 1)}
QS = {10, 1) (20, 08) }
S = {(30, 0.8) (40, 1) (50, 0.6)

To derive R(x, y) representing the implication relation (i) above, compute


R (x, y) = max (H x S , ¬ H x Y)
10 20 30 40 50 60 10 20 30 40 50 60

30 0 0 0 0 0 0 30 1 1 1 1 1 1
40 0 0 0 0 0 0 40 1 1 1 1 1 1
50 0 0 0 0 0 0 50 1 1 1 1 1 1
60 0 0 0 0 0 0 60 1 1 1 1 1 1
HxS= 70 0 0 0.8 1 0.6 0 H x Y = 70 0 0 0 0 0 0
80 0 0 0.8 1 0.6 0 80 0 0 0 0 0 0
90 0 0 0.3 0.3 0.3 0 90 0.7 0.7 0.7 0.7 0.7 0.7
100 0 0 0 0 0 0 100 1 1 1 1 1 1

10 20 30 40 50 60

30 1 1 1 1 1 1
40 1 1 1 1 1 1
50 1 1 1 1 1 1
60 1 1 1 1 1 1
R(x,Y) = 70 0 0 0.8 1 0.6 0
80 0 0 0.8 1 0.6 0
90 0.7 0.7 0.7 0.7 0.7 0.7
100 1 1 1 1 1 1

To deduce Rotation is quite slow, we make use of the composition rule

QS = VH ο R (x, y)
10 20 30 40 50 60

30 1 1 1 1 1 1
40 1 1 1 1 1 1
50 1 1 1 1 1 1
60 1 1 1 1 1 1
= [0 0 0 0 0 0 0.9 1] x
70 0 0 0 0 0 0
80 0 0 0 0 0 0
90 0.7 0.7 0.7 0.7 0.7 0.7
100 1 1 1 1 1 1

= [1 1 1 1 1 1 ]
Fuzzy Rule Based System

The fuzzy linguistic descriptions are formal representation of systems made


through fuzzy IF-THEN rule. They encode knowledge about a system in
statements of the form :

IF (a set of conditions) are satisfied THEN (a set of consequents) can be inferred.


IF (x1 is A1, x2 is A2, xn is An ) THEN (y1 is B1, y2 is B2, yn is Bn)
where linguistic variables xi, yj take the values of fuzzy sets Ai and Bj
respectively.
Example :
IF there is "heavy" rain and "strong" winds
THEN there must "severe" flood warnings.
Here, heavy , strong , and severe are fuzzy sets qualifying the variables rain,
wind, and flood warnings respectively.

A collection of rules referring to a particular system is known as a fuzzy


rule base. If the conclusion C to be drawn from a rule base R is the conjunction
of all the individual consequents C i of each rule , then
C = C1 ∩ C2 ∩ . . . ∩ Cn where
µc (y ) = min ( µc1(y ), µc2(y ) , µcn(y )) , ∀y∈ Y
where Y is universe of discourse.
On the other hand, if the conclusion C to be drawn from a rule base R is the
disjunction of the individual consequents of each rule, then
C = C1 U C2 U . . . U Cn where
µc (y ) = max ( µc1 (y ), µc2(y ) , µcn (y )) , ∀ y ∈ Y where
Y is universe of discourse.
Defuzzification

In many situations, for a system whose output is fuzzy, it is easier to take a


crisp decision if the output is represented as a single quantity. This
conversion of a single crisp value is called Defuzzification.

Defuzzification is the reverse process of fuzzification.

The typical Defuzzification methods are


− Centroid method,

− Center of sums,

− Mean of maxima.

Centroid method
It is also known as the "center of gravity" of area method.
It obtains the centre of area (x*) occupied by the fuzzy set .
For discrete membership function, it is given by

n
Σ xi µ (xi)
i=1
x* = where
n
Σ µ (xi)
i=1

n represents the number elements in the sample, and


xi are the elements, and
µ (xi) is the membership function.

You might also like