Legacy Documentation

Fuzzy Logic (2004)

This is documentation for an obsolete product.
Current products and services

 Documentation /  Fuzzy Logic /  Demonstration Notebooks /

Sets Versus Fuzzy SetsFuzzy Relations

2.2 Standard Operations

2.2.1 Introduction

This notebook deals with fuzzy operations defined in the same universal space. Professor Lotfi A. Zadeh [Zadeh 1965] formulated a fuzzy set theory in the terms of the standard operations: complement, union, intersection, and difference.

In this notebook, we present a graphical interpretation [Stachowicz and Kochanska, 1982] of the standard fuzzy set terms using standard Mathematica functions and functions from Fuzzy Logic.

This loads the package.

In[1]:=

With the necessary routines loaded, we are ready to investigate fuzzy set theory.

2.2.2 Fuzzy Operations

Inclusion

Let X and Y be fuzzy sets defined in the same universal space U. We say that the fuzzy set X is included in the fuzzy set Y if and only if:

For every u in the set U we have X(u) LessEqual Y(u)

To illustrate inclusion of fuzzy sets, we consider the space U and fuzzy sets defined in U. We demonstrate this property in the following example.

In[2]:=

Out[2]=

In[3]:=

Out[3]=

In[4]:=

In[5]:=

VERYSMALL is included in SMALL as defined by the previous definition of inclusion. This inclusion will be directly seen in the next figure.

In[6]:=

Out[6]=

In[7]:=

It should also be noted that each fuzzy set X defined in the universal space U is a fuzzy subset of the fuzzy set U. We have U(u) = 1, and X(u) is contained in the interval [0, 1] for each element u in the set U, hence X(u) LessEqual U(u). Similarly the empty set is a fuzzy subset of all other fuzzy sets.

In[8]:=

In[9]:=

In[10]:=

Out[10]=

In[11]:=

Out[11]=

In[12]:=

Out[12]=

Comparability

Two fuzzy sets A and B are said to be comparable if the following condition holds:

A Subset B or B Subset A

That is, if one of the fuzzy sets is a subset of the other set, they are comparable. The two sets A and B are said to be incomparable in the following case.

A NotSubset B and B NotSubset A

Example 2.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.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

In mathematics, many statements can be proven to be true by the use of previous definitions or assumptions. Here we prove a theorem of fuzzy sets using the definition of inclusion.

Theorem:

If A Subset B and B Subset C then A Subset C.

Proof:

Notice that we must show that     

A(u) LessEqual C(u)     for all u in the set U.

Since A Subset B then

A(u) LessEqual B(u)     for all u in the set U.

By hypothesis, B Subset C; hence

B(u) LessEqual C(u)     for all u in the set U.

So, we have shown that for all u in the set U, if A(u) Subset B(u) Subset C(u), then accordingly A Subset C.

Equality

Let X and Y be fuzzy sets defined in the same space U. We say that sets X and Y are equal, which is denoted X = Y if and only if for all u in the set U, X(u) = Y(u).

We demonstrate this property in the following example.

In[13]:=

In[14]:=

In[15]:=

We see that by definition, SMALL = STILLSMALL.

If equality X(u) = Y(u) is not satisfied even for one element u in the set U, then we say that X is not equal to Y.

Complementation

Let X be a fuzzy set defined in the space U. We say that the fuzzy set Y is a complement of the fuzzy set X, if and only if, for all u in the set U, Y(u) = 1 - X(u).

The complement of the fuzzy set X is often denoted by X'. For example, the complement of the fuzzy set SMALL in the space U is a fuzzy set NOTSMALL. We show both SMALL and NOTSMALL in the following graph.

In[16]:=

Out[16]=

In[17]:=

We see that there are many elements that can have some nonzero grades of membership in both a fuzzy set, SMALL, and its complement, NOTSMALL.

The empty set and the universal set, treated as fuzzy sets, are complements of one another.

    EmptySet' = U    

    U' = EmptySet

In[18]:=

Union

Let X and Y be fuzzy sets defined in the space U. We define the union of those sets as the smallest (in the sense of the inclusion) fuzzy set that contains both X and Y. The union of X and Y will be denoted by X Union Y. Thus the following relation must be satisfied for the union operation.

For all u in the set U, (X Union Y)(u) = Max(X(u), Y(u)).

For example, for fuzzy sets SMALL and MEDIUM, which we define here, the Union returns the following.

In[20]:=

In[21]:=

Out[21]=

In[22]:=

Example

Thus, if at a point u = 6, the following is true

SMALL(6) = 0.3 and MEDIUM(6) = 0.8

then at u = 6, the union is 0.8.

As in the case of non-fuzzy sets, the notion of the union is closely related to that of the connective "or." Thus, if A is a class of "Young" men, B is a class of "Bald" men, and "David is Young" or "David is Bald," then David is associated with the union of A and B.

David is a member of set A or David is a member of set B implies David is a member of A Union B.

Properties Related to Union

A collection of the properties related to union follow. We demonstrate each property using some of the fuzzy sets we have created in this notebook and with functions from Fuzzy Logic.

Identity:

X UnionEmptySet = X

In[23]:=

Out[23]=

Identity:

X Union U = U

In[24]:=

Out[24]=

Idempotence:

X Union X = X

In[25]:=

Out[25]=

Commutativity:

X Union Y= Y Union X            

In[26]:=

Out[26]=

Associativity:

X Union (Y Union Z) = (X Union Y) Union Z

In[27]:=

In[28]:=

Out[28]=

Intersection

Let X and Y be fuzzy sets in the space U. The intersection of those sets, denoted by X Intersection Y, is defined as the greatest (in the sense of the inclusion) fuzzy set included both in X and Y. Thus the relation the intersection must satisfy the following property.

For all u in the set U, (X Intersection Y)(u) = Min(X(u), Y(u)).

For the sets SMALL and MEDIUM from the previous example, we find the intersection is the following manner.

In[29]:=

Out[29]=

In[30]:=

Additional Properties Related to Intersection and Union

This section contains a collection of additional properties related to fuzzy intersection and union.

Absorption by Empty Set:

X IntersectionEmptySet = EmptySet

In[31]:=

Out[31]=

Identity:

X Intersection U = X

In[32]:=

Out[32]=

Idempotence:

X Intersection X = X

In[33]:=

Out[33]=

Commutativity:

X Intersection Y = Y Intersection X

In[34]:=

Out[34]=

Associativity:

X Intersection (Y Intersection Z) = (X Intersection Y) Intersection Z

In[35]:=

Out[35]=

Distributivity:

X Intersection (Y Union Z) = (X Intersection Y) Union (X Intersection Z)

In[36]:=

Out[36]=

Distributivity:

X Union (Y Intersection Z) = (X Union Y) Intersection (X Union Z)

In[37]:=

Out[37]=

For crisp sets, we have the following properties.

Law of excluded middle:

A Union A' = U

Law of contradiction:

A Intersection A' = EmptySet

In fuzzy logic these properties do not apply.

X Union X' NotEqual U

X Intersection X' NotEqualEmptySet

This is demonstrated in the following graphs.

In[38]:=

In[39]:=

In[40]:=

In[41]:=

The theory of fuzzy sets was formulated in terms of the standard complement, union, and intersection operators. These original operators possess particular significance. When the range of grade of membership is restricted to the set {0,1}, these functions perform like the corresponding operators for Cantor's sets.

If any error e is associated with the grade of membership A(u) and B(u), then the maximum error associated with the grade of membership of u in A', A Union B, and A Intersection B remains e.

Difference

The difference of two fuzzy sets is defined as the intersection of the minuend and the complement of the subtrahend.

X - Y = X Intersection Y'

For the difference, each of the elements u in the set U satisfies the following relation.

For all u in the set U, (X - Y)(u) = Min(X(u), 1 - Y(u)).

For our sets SMALL and MEDIUM, we have the following results.

In[42]:=

Out[42]=

In[43]:=

Properties Related to Difference

This section contains properties related to the fuzzy difference. Properties are demonstrated using previously defined fuzzy sets and functions from Fuzzy Logic.

X - Y Union Z = (X - Y) Union (X - Z)

In[44]:=

Out[44]=

X - Y Union Z = (X - Y) Union (X - Z)

In[45]:=

Out[45]=

X - Y Union Z = (X - Y) - Z

In[46]:=

Out[46]=

For crisp sets we have the following properties.

X Union (Y - X) = X Union Y

X - (X - Y) = X Union Y

With fuzzy sets, this is not the case. For fuzzy sets, we have these properties.

X Union (Y - X) = X Union (Y Intersection X') = (X Union Y) Intersection (X Union X')

X - (X - Y) = X - X Intersection Y' = X Intersection (X Union Y')' = X Intersection (X Union Y) = (X Union X') Intersection (X Union Y)

You can restore the default settings of Fuzzy Logic for FuzzySet and FuzzyPlot.

In[47]:=

In[48]:=

References

G. J. Klir and T. A. Folger, Fuzzy Sets, Uncertainty, and Information, Prentice Hall, Englewood Cliffs, NJ, 1988.

M. S. Stachowicz and M. E. Kochanska, Graphic interpretation of fuzzy sets and fuzzy relations, Mathematics at the Service of Man. Edited by A. Ballester, D. Cardus, and E. Trillas, based on materials of Second World Conference, Universidad Politecnica Las Palmas, Spain, 1982.

L. A. Zadeh, Fuzzy sets, Information and Control, vol. 8, pp. 338-353, 1965.

H. J. Zimmermann, Fuzzy Set Theory and Its Applications, 2nd ed., Kluwer Academic Publishers, Boston, MA, 1991.

Sets Versus Fuzzy SetsFuzzy Relations