# Fuzzy operations – Explained with examples

Fuzzy operations are performed on fuzzy sets, whereas crisp operations are performed on crisp sets. Fuzzy operations are very useful in the design of a Fuzzy Logic Controller. It allows the manipulation of fuzzy variables by different means.

### Union:

In the case of the union of crisp sets, we simply have to select repeated elements only once. In the case of fuzzy sets, when there are common elements in both the fuzzy sets, we should select the element with the **maximum membership value**.

The **union **of two fuzzy sets A and B is a fuzzy set C , written as ** ** C = A ∪ B

C = A ∪ B = {(x, μ_{A ∪ B} (x)) | ∀x ∈ X}

μ_{C}(x) = μ_{A ∪ B} (x) = μ_{A}(x) ∨ μ_{B}(x)

= max( μ_{A}(x), μ_{B}(x) ), ∀x ∈ X

Graphically, we can represent union operations as follows: Red and Blue membership functions represent the fuzzy value for elements in sets A and B, respectively. Wherever these fuzzy functions overlap, we have to consider the point with maximum membership value.

### Example of Fuzzy Union:

C = A ∪ B = {(x, μ_{A ∪ B} (x)) | ∀x ∈ X}

A = { (x_{1}, 0.2), (x_{2}, 0.5), (x_{3}, 0.6), (x_{4}, 0.8), (x_{5}, 1.0) }

B = { (x_{1}, 0.8), (x_{2}, 0.6), (x_{3}, 0.4), (x_{4}, 0.2), (x_{5}, 0.1) }

μ_{A ∪ B} (x_{1}) = max( μ_{A}(x_{1}), μ_{B}(x_{1}) ) = max { 0.2, 0.8 } = 0.8

μ_{A ∪ B} (x_{2}) = max( μ_{A}(x_{2}), μ_{B}(x_{2}) ) = max { 0.5, 0.6 } = 0.6

μ_{A ∪ B} (x_{3}) = max( μ_{A}(x_{3}), μ_{B}(x_{3}) ) = max { 0.6, 0.4 } = 0.6

μ_{A ∪ B} (x_{4}) = max( μ_{A}(x_{4}), μ_{B}(x_{4}) ) = max { 0.8, 0.2 } = 0.8

μ_{A ∪ B} (x_{5}) = max( μ_{A}(x_{5}), μ_{B}(x_{5}) ) = max { 1.0, 0.1 } = 1.0

So, A ∪ B = { (x_{1}, 0.8), (x_{2}, 0.6), (x_{3}, 0.6), (x_{4}, 0.8), (x_{5}, 1.0) }

### Intersection:

In the case of the intersection of crisp sets, we simply have to select common elements from both sets. In the case of fuzzy sets, when there are common elements in both the fuzzy sets, we should select the element with **minimum membership value**.

The **intersection **of two fuzzy sets A and B is a fuzzy set C , written as ** ** C = A ∩ B

C = A ∩ B = {(x, μ_{A ∩ B} (x)) | ∀x ∈ X}

μ_{C}(x) = μ_{A ∩ B} (x) = μ_{A}(x) ⋀ μ_{B}(x)

= min( μ_{A}(x), μ_{B}(x) ), ∀x ∈ X

Graphically, we can represent the intersection operation as follows: Red and blue membership functions represent the fuzzy value for elements in sets A and B, respectively. Wherever these fuzzy functions overlap, we have to consider the point with the minimum membership value.

### Example of Fuzzy Intersection:

C = A ∩ B = {(x, μ_{A ∩ B} (x)) | ∀x ∈ X}

A = { (x_{1}, 0.2), (x_{2}, 0.5), (x_{3}, 0.6), (x_{4}, 0.8), (x_{5}, 1.0) }

B = { (x_{1}, 0.8), (x_{2}, 0.6), (x_{3}, 0.4), (x_{4}, 0.2), (x_{5}, 0.1) }

μ_{A ∩ B} (x_{1}) = min( μ_{A}(x_{1}), μ_{B}(x_{1}) ) = max { 0.2, 0.8 } = 0.2

μ_{A ∩ B} (x_{2}) = min( μ_{A}(x_{2}), μ_{B}(x_{2}) ) = max { 0.5, 0.6 } = 0.5

μ_{A ∩ B} (x_{3}) = min( μ_{A}(x_{3}), μ_{B}(x_{3}) ) = max { 0.6, 0.4 } = 0.4

μ_{A ∩ B} (x_{4}) = min( μ_{A}(x_{4}), μ_{B}(x_{4}) ) = max { 0.8, 0.2 } = 0.2

μ_{A ∩ B} (x_{5}) = min( μ_{A}(x_{5}), μ_{B}(x_{5}) ) = max { 1.0, 0.1 } = 0.1

So, A ∩ B = { (x_{1}, 0.2), (x_{2}, 0.5), (x_{3}, 0.4), (x_{4}, 0.2), (x_{5}, 0.1) }

### Complement:

Fuzzy complement is identical to crisp complement operation. Membership value of every element in the fuzzy set is complemented with respect to 1, i.e. it is subtracted from 1.

The **complement **of fuzzy set A, is denoted by A^{C}, is defined as

A^{C} = {(x, μ_{A}^{C} (x)) | ∀x ∈ X}

A^{C} (x) = 1 – μ_{A}(x)

### Example of Fuzzy Complement:

A^{C} (x) = 1 – μ_{A}(x)

A = { (x_{1}, 0.2), (x_{2}, 0.5), (x_{3}, 0.6), (x_{4}, 0.8), (x_{5}, 1.0) }

A^{C} = { (x_{1}, 0.8), (x_{2}, 0.5), (x_{3}, 0.4), (x_{4}, 0.2), (x_{5}, 0.0) }

A ⋃ A^{C} = { (x_{1}, 0.8), (x_{2}, 0.5), (x_{3}, 0.6), (x_{4}, 0.8), (x_{5}, 1.0) } ≠ X

A ∩ A^{C} = { (x_{1}, 0.2), (x_{2}, 0.5), (x_{3}, 0.4), (x_{4}, 0.2), (x_{5}, 0.0) } ≠ Φ

Unlike crisp sets, fuzzy sets do not hold the law of contradiction and law of excluded middle.

## Watch on YouTube: Fuzzy operations

## Test Your Knowledge:

For following fuzzy sets, perform union, complement and intersection operations.

A = { (x_{1}, 0.4), (x_{2}, 0.5), (x_{3}, 0.2), (x_{4}, 0.4), (x_{5}, 0.8) }

B = { (x_{1}, 1.0), (x_{2}, 0.3), (x_{3}, 0.5), (x_{4}, 0.7), (x_{5}, 0.1) }

**Please post your answer / query / feedback in comment section below !**

helpful article.

Noted with thanks

Excellent explanation

Thanks…

Graphically we can represent union operation as follow. this sentence has a mistake please correct it . it should be “intersection ” in the place of “Union”

Thank you very much for your input. Appreciated and corrected.

How to show union is associative in fuzzy set

Its similar to crisp set instead of union, you shall consider max of membership value in fuzzy set.

Please tell me how we prove that union is associtive

Properties of sets are explained in videos with example here: https://www.youtube.com/playlist?list=PLUVnh0w_cCjJ50vH6505Bk7Zv-2f8rltw

You will find your answer

sir please suggest me if the parameter are fuzzy number then how to find minimum weight

Your question is not clear to me. Can you plz rephrase it?