× back

Fuzzy Sets

Fuzzy Logic

Crisp Logic vs Fuzzy Logic

Crisp Set

Fuzzy Set

Cardinality of Fuzzy Sets

The cardinality of a fuzzy set is a measure of the size or "total membership" of the set. It is calculated by summing the membership values of all elements in the fuzzy set.

Mathematical Definition

Let \( A \) be a fuzzy set defined on a universal set \( X \), with membership function \( \mu_A(x) \). The cardinality of \( A \), denoted as \( |A| \), is given by:

\[ |A| = \sum_{x \in X} \mu_A(x) \]

Example

Consider a fuzzy set \( A \) representing "tall people" defined on the universal set \( X = \{x_1, x_2, x_3\} \), where:

\[ A = \{ (x_1, 0.6), (x_2, 0.8), (x_3, 0.4) \} \]

The membership values are:

  • \( \mu_A(x_1) = 0.6 \)
  • \( \mu_A(x_2) = 0.8 \)
  • \( \mu_A(x_3) = 0.4 \)

Now, calculate the cardinality:

\[ |A| = 0.6 + 0.8 + 0.4 = 1.8 \]

Hence, the cardinality of the fuzzy set \( A \) is \( 1.8 \).

Fuzzy Set Operations

If fuzzy sets are given to us, for example, set A and set B, various operations can be performed on them. These operations help us manipulate and analyze fuzzy sets effectively.

Union: (A ⋃ B)

  • When the union of A and B is performed, the new set is generated based on a specific rule. A key principle to remember is that while performing operations like union or intersection, the elements in the set do not change, only their associated membership values are modified.
  • μ(A ⋃ B)(x) = max ( μA(x), μB(x) )
    This means, for the same element in sets A and B, the maximum membership value is chosen for the union. For example, if an element has membership values 0.9 in set A and 0.1 in set B, the resulting membership value in the union will be 0.9.

Intersection: (A ⋂ B)

  • μ(A ⋂ B)(x) = min ( μA(x), μB(x) )
    In the intersection, for the same element in sets A and B, the minimum membership value is chosen.

Example:

A = {(x1, 0.6), (x2, 0.7), (x3, 0.4)}
B = {(x1, 0.3), (x2, 0.2), (x3, 0.5)}

  • (A ⋃ B) = {(x1, 0.6), (x2, 0.7), (x3, 0.5)}
  • (A ⋂ B) = {(x1, 0.3), (x2, 0.2), (x3, 0.4)}

Complement (Ac)

  • μ(Ac) = 1 - μA(x)
  • here also only the membership value will be changed
  • Example:
    A = {(x1, 0.6), (x2, 0.7), (x3, 0.4)}
    B = {(x1, 0.3), (x2, 0.2), (x3, 0.5)}
  • Ac = {(x1, (1 - 0.6)), (x2, (1 - 0.7)), (x3, (1- 0.4))}
    = {(x1, 0.4), (x2, 0.3), (x3, 0.6)}
  • Bc = {(x1, (1 - 0.3)), (x2, (1 - 0.2)), (x3, (1- 0.5))}
    = {(x1, 0.7), (x2, 0.8), (x3, 0.4)}

Fuzzy Set Properties

Fuzzy Relations

\[ \mu_R(X, Y) = \begin{pmatrix} a & 0.2 & 0.5 \\ b & 0.5 & 0.6 \\ c & 0.4 & 0.4 \end{pmatrix} \]

Cartesian Product

Consider the two fuzzy sets:
A = {0.4/x1 + 0.3/x2 + 0.2/x3}
B = {0.3/y1 + 0.5/y2}
The Cartesian product of two fuzzy sets is calculated by finding the minimum value of the membership grades of their corresponding elements. For each pair (x, y), we compute:
μR(xi, yj) = min(μA(xi), μB(yj))

Let us calculate for all pairs:
1. μR(x1, y1) = min(0.4, 0.3) = 0.3
2. μR(x1, y2) = min(0.4, 0.5) = 0.4
3. μR(x2, y1) = min(0.3, 0.3) = 0.3
4. μR(x2, y2) = min(0.3, 0.5) = 0.3
5. μR(x3, y1) = min(0.2, 0.3) = 0.2
6. μR(x3, y2) = min(0.2, 0.5) = 0.2

Now, we can represent the Cartesian product in matrix form:

\[ \mu_R(X, Y) = \begin{pmatrix} & y_1 & y_2 \\ x_1 & 0.3 & 0.4 \\ x_2 & 0.3 & 0.3 \\ x_3 & 0.2 & 0.2 \end{pmatrix} \]

Here:

  • The rows correspond to elements of set A: x1, x2, x3.
  • The columns correspond to elements of set B: y1, y2.
  • Each cell represents the membership value calculated using the "min" operation.

Operations on Fuzzy Relations

Previously, we learned about operations on fuzzy sets. Now, we explore operations between two fuzzy relations.

  1. Union: μR⋃S(X, Y) = max(μR(X, Y), μS(X, Y))
    Example:

    \[ \mu_R(X, Y) = \begin{pmatrix} & a & b \\ a & 0.2 & 0.2 \\ b & 0.5 & 0.6 \\ c & 0.4 & 0.4 \end{pmatrix} \]

    \[ \mu_S(X, Y) = \begin{pmatrix} & a & b \\ a & 0.3 & 0.5 \\ b & 0.1 & 0.4 \\ c & 0.3 & 0.6 \end{pmatrix} \]

    \[ \mu_{R \cup S}(X, Y) = \begin{pmatrix} & a & b \\ a & 0.3 & 0.5 \\ b & 0.5 & 0.6 \\ c & 0.4 & 0.6 \end{pmatrix} \]

  2. Intersection: μR∩S(X, Y) = min(μR(X, Y), μS(X, Y))
    Example:

    \[ \mu_R(X, Y) = \begin{pmatrix} & a & b \\ a & 0.2 & 0.2 \\ b & 0.5 & 0.6 \\ c & 0.4 & 0.4 \end{pmatrix} \]

    \[ \mu_S(X, Y) = \begin{pmatrix} & a & b \\ a & 0.3 & 0.5 \\ b & 0.1 & 0.4 \\ c & 0.3 & 0.6 \end{pmatrix} \]

    \[ \mu_{R \cap S}(X, Y) = \begin{pmatrix} & a & b \\ a & 0.2 & 0.2 \\ b & 0.1 & 0.4 \\ c & 0.3 & 0.4 \end{pmatrix} \]

  3. Complement: μRc(X, Y) = 1 - μR(X, Y)
    Example:

    \[ \mu_R(X, Y) = \begin{pmatrix} & a & b \\ a & 0.2 & 0.2 \\ b & 0.5 & 0.6 \\ c & 0.4 & 0.4 \end{pmatrix} \]

    \[ \mu_{R^c}(X, Y) = \begin{pmatrix} & a & b \\ a & 0.8 & 0.8 \\ b & 0.5 & 0.4 \\ c & 0.6 & 0.6 \end{pmatrix} \]

Fuzzy Composition

  • Fuzzy composition is the operation performed on two compatible fuzzy relations to produce a single fuzzy relation.
  • Let \( R \) be a fuzzy relation from universe \( X \) to \( Y \) (\( R: X \rightarrow Y \)), and \( S \) be a fuzzy relation from universe \( Y \) to \( Z \) (\( S: Y \rightarrow Z \)). The composition of \( R \) and \( S \) represents a fuzzy relation from \( X \) to \( Z \) (\( R \circ S: X \rightarrow Z \)).
  • There are two common types of composition in fuzzy relations:
    1. Fuzzy Max-Min Composition:
      The membership value of the resulting relation \( \mu_{R \circ S}(x, z) \) is determined by taking the maximum value of the minimum membership values between \( R(x, y) \) and \( S(y, z) \) for all \( y \) in \( Y \).

      \(\mu_{R \circ S}(x, z) = \max_{y \in Y} \big(\min(\mu_R(x, y), \mu_S(y, z))\big)\)

    2. Fuzzy Max-Product Composition:
      The membership value of the resulting relation \( \mu_{R \circ S}(x, z) \) is determined by taking the maximum value of the product of the membership values \( R(x, y) \) and \( S(y, z) \) for all \( y \) in \( Y \).

      \(\mu_{R \circ S}(x, z) = \max_{y \in Y} \big(\mu_R(x, y) \cdot \mu_S(y, z)\big)\)

  • Key Notes:
    • Fuzzy relations must be compatible for composition, meaning the output universe of \( R \) (e.g., \( Y \)) matches the input universe of \( S \).
    • Fuzzy composition helps in modeling complex systems by linking intermediate relations.

Example Question: Fuzzy Max-Min Composition

\[ R_{x,y} = \begin{pmatrix} & y1 & y2 \\ x1 & 0.6 & 0.3 \\ x2 & 0.2 & 0.9 \end{pmatrix} \]

\[ S_{y,z} = \begin{pmatrix} & z1 & z2 & z3 \\ y1 & 1 & 0.5 & 0.3 \\ y2 & 0.8 & 0.4 & 0.7 \end{pmatrix} \]

\[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & ? & ? & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

Now we will find each element of the resulting fuzzy relation using the formula for max-min composition:

\(\mu_{R \circ S}(x, z) = \max_{y \in Y} \big(\min(\mu_R(x, y), \mu_S(y, z))\big)\)

  • For (x1, z1):

    \(\mu_{R∘S}(x_1, z_1) = \max\big(\min(\mu_R(x_1, y_1), \mu_S(y_1, z_1)), \min(\mu_R(x_1, y_2), \mu_S(y_2, z_1))\big)\)


    = \(\max\big(\min(0.6, 1), \min(0.3, 0.8)\big)\)
    = \(\max(0.6, 0.3)\)
    = 0.6

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & ? & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x1, z2):

    \(\mu_{R∘S}(x_1, z_2) = \max\big(\min(\mu_R(x_1, y_1), \mu_S(y_1, z_2)), \min(\mu_R(x_1, y_2), \mu_S(y_2, z_2))\big)\)


    = \(\max\big(\min(0.6, 0.5), \min(0.3, 0.4)\big)\)
    = \(\max(0.5, 0.3)\)
    = 0.5

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.5 & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x1, z3):

    \(\mu_{R∘S}(x_1, z_3) = \max\big(\min(\mu_R(x_1, y_1), \mu_S(y_1, z_3)), \min(\mu_R(x_1, y_2), \mu_S(y_2, z_3))\big)\)


    = \(\max\big(\min(0.6, 0.3), \min(0.3, 0.7)\big)\)
    = \(\max(0.3, 0.3)\)
    = 0.3

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.5 & 0.3 \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x2, z1):

    \(\mu_{R∘S}(x_2, z_1) = \max\big(\min(\mu_R(x_2, y_1), \mu_S(y_1, z_1)), \min(\mu_R(x_2, y_2), \mu_S(y_2, z_1))\big)\)


    = \(\max\big(\min(0.2, 1), \min(0.9, 0.8)\big)\)
    = \(\max(0.2, 0.8)\)
    = 0.8

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.5 & 0.3 \\ x2 & 0.8 & ? & ? \end{pmatrix} \]

  • For (x2, z2):

    \(\mu_{R∘S}(x_2, z_2) = \max\big(\min(\mu_R(x_2, y_1), \mu_S(y_1, z_2)), \min(\mu_R(x_2, y_2), \mu_S(y_2, z_2))\big)\)


    = \(\max\big(\min(0.2, 0.5), \min(0.9, 0.4)\big)\)
    = \(\max(0.2, 0.4)\)
    = 0.4

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.5 & 0.3 \\ x2 & 0.8 & 0.4 & ? \end{pmatrix} \]

  • For (x2, z3):

    \(\mu_{R∘S}(x_2, z_3) = \max\big(\min(\mu_R(x_2, y_1), \mu_S(y_1, z_3)), \min(\mu_R(x_2, y_2), \mu_S(y_2, z_3))\big)\)


    = \(\max\big(\min(0.2, 0.3), \min(0.9, 0.7)\big)\)
    = \(\max(0.2, 0.7)\)
    = 0.7

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.5 & 0.3 \\ x2 & 0.8 & 0.4 & 0.7 \end{pmatrix} \]

Example Question: Max-Product Composition

\[ R_{x,y} = \begin{pmatrix} & y1 & y2 \\ x1 & 0.6 & 0.3 \\ x2 & 0.2 & 0.9 \end{pmatrix} \] \[ S_{y,z} = \begin{pmatrix} & z1 & z2 & z3 \\ y1 & 1 & 0.5 & 0.3 \\ y2 & 0.8 & 0.4 & 0.7 \end{pmatrix} \] \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & ? & ? & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

Now we will find each element of the resulting fuzzy relation using the formula for max-product composition:

\(\mu_{R \circ S}(x, z) = \max_{y \in Y} \big(\mu_R(x, y) \cdot \mu_S(y, z)\big)\)

  • For (x1, z1):

    \(\mu_{R∘S}(x_1, z_1) = \max\big((\mu_R(x_1, y_1) \cdot \mu_S(y_1, z_1)), (\mu_R(x_1, y_2) \cdot \mu_S(y_2, z_1))\big)\)


    = \(\max\big((0.6 \cdot 1), (0.3 \cdot 0.8)\big)\)
    = \(\max(0.6, 0.24)\)
    = 0.6

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & ? & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x1, z2):

    \(\mu_{R∘S}(x_1, z_2) = \max\big((\mu_R(x_1, y_1) \cdot \mu_S(y_1, z_2)), (\mu_R(x_1, y_2) \cdot \mu_S(y_2, z_2))\big)\)


    = \(\max\big((0.6 \cdot 0.5), (0.3 \cdot 0.4)\big)\)
    = \(\max(0.3, 0.12)\)
    = 0.3

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.3 & ? \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x1, z3):

    \(\mu_{R∘S}(x_1, z_3) = \max\big((\mu_R(x_1, y_1) \cdot \mu_S(y_1, z_3)), (\mu_R(x_1, y_2) \cdot \mu_S(y_2, z_3))\big)\)


    = \(\max\big((0.6 \cdot 0.3), (0.3 \cdot 0.7)\big)\)
    = \(\max(0.18, 0.21)\)
    = 0.21

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.3 & 0.21 \\ x2 & ? & ? & ? \end{pmatrix} \]

  • For (x2, z1):

    \(\mu_{R∘S}(x_2, z_1) = \max\big((\mu_R(x_2, y_1) \cdot \mu_S(y_1, z_1)), (\mu_R(x_2, y_2) \cdot \mu_S(y_2, z_1))\big)\)


    = \(\max\big((0.2 \cdot 1), (0.9 \cdot 0.8)\big)\)
    = \(\max(0.2, 0.72)\)
    = 0.72

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.3 & 0.21 \\ x2 & 0.72 & ? & ? \end{pmatrix} \]

  • For (x2, z2):


    \(\mu_{R∘S}(x_2, z_2) = \max\big((\mu_R(x_2, y_1) \cdot \mu_S(y_1, z_2)), (\mu_R(x_2, y_2) \cdot \mu_S(y_2, z_2))\big)\)


    = \(\max\big((0.2 \cdot 0.5), (0.9 \cdot 0.4)\big)\)
    = \(\max(0.1, 0.36)\)
    = 0.36

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.3 & 0.21 \\ x2 & 0.72 & 0.36 & ? \end{pmatrix} \]

  • For (x2, z3):

    \(\mu_{R∘S}(x_2, z_3) = \max\big((\mu_R(x_2, y_1) \cdot \mu_S(y_1, z_3)), (\mu_R(x_2, y_2) \cdot \mu_S(y_2, z_3))\big)\)


    = \(\max\big((0.2 \cdot 0.3), (0.9 \cdot 0.7)\big)\)
    = \(\max(0.06, 0.63)\)
    = 0.63

    \[ \mu_{R \circ S} = \begin{pmatrix} & z1 & z2 & z3 \\ x1 & 0.6 & 0.3 & 0.21 \\ x2 & 0.72 & 0.36 & 0.63 \end{pmatrix} \]

Reference