Crisp set operations

We can perform wide range of operations on crisp set. Before you explore the operations on crisp set, it is recommended to understand what crisp set is?

Suggested Reading: Introduction to Crisp Sets

Let us understand various operations on set with the help of example. We will consider following data to execute various operations:

X  = {1, 2, 3, 4, 5, 6, 7, 8, 9}

A = {1, 2, 3, 4, 5}

B = {3, 4, 5, 6}

C = {6, 7, 8, 9}

Union

Union of sets is the collection of all the elements which are either in A or in B. Common elements from both the sets are considered only once. Mathematically, we can represent union operation as follow:

A ∪ B = { x | x ∈ A or x ∈ B }

For the given data

A ∪ B={1, 2, 3, 4, 5, 6}

Graphically, we can describe union operation as shown below. The gray region represents the output of operation.

Union of crisp sets
Union of crisp sets

If there are n sets, called A1, A2, A3, …, An, we can find the union of all by taking unique elements from each set, i.e. A = A1 ∪ A2 ∪ A3 ∪ … ∪ An

In shortened notation,

A = \bigcup_{i=1}^{n} A_i

Intersection

Intersection of sets is the collection of all the common elements from set A and B. Mathematically, we can represent union operation as follow:

A ∩ B = { x | x ∈ A and x ∈ B }

For the given data

A ∩ B = {3, 4, 5}

Graphically, we can describe intersection operation as shown below. The gray region represents the output of operation.

Intersection of crisp sets
Intersection of crisp sets

If there are n sets, called A1, A2, A3, …, An, we can find the intersection of all by taking common elements from each set, i.e. A = A1 ∩ A2 ∩ A3 ∩ … ∩ An

In shortened notation,

A = \bigcap_{i=1}^{n} A_i

Complement

Complement operation is always represented with respect to some set. If complement is performed with respect to universal set, then it is called absolute complement.

Complement of set A is collection of all the elements which are not in A but are in the universal set.

Mathematically,

A’ = Ac = X – A = { x | x ∈ X and x ∉ A }

Complement of set A is often represented as A’ or Ac or \bar{A} . We will be using any notation interchangeably in our discussion.

For the given data

A’ = {6, 7, 8, 9}

Graphically, we can describe complement operation as shown below. The gray region represents the output of operation.

Complement of crisp set
Complement of crisp set

Difference

Difference of set A with respect to set B is collection of all the elements in A but not in B. It is also known as relative complement.

Here the reference set is not the universal set, rather it is some set derived from the universe of discourse

Mathematically,

A – B = { x | x ∈ A and x ∉ B }

For the given data

A – B = {1, 2}

Graphically, difference operation can be represented as,

Difference of crisp sets
Difference of crisp sets

De Morgan’s Law

De Morgan’s law is very popular in set operations and it is quite useful in simplifying many complex computation. It is also useful in reducing process of some proof techniques. De Morgan’s law enjoys special place in crisp set operations. There are two laws of De Morgan.

Law 1: (A ∪ B)’ = A’ ∩ B’

For the given data:

A ∪ B = {1, 2, 3, 4, 5, 6}

(A ∪ B)’ = {7, 8, 9} → LHS

A’ = {6, 7, 8, 9}

B’ = {1, 2, 7, 8, 9}

A’ ∩ B’ = {7, 8, 9} → RHS

Graphically,

De Morgan's Law - 1
De Morgan’s Law – 1

Law 2: (A ∩ B)’ = A’ ∪ B’

For the given data:

A ∩ B={3, 4, 5}

(A ∩ B)’ = {1, 2, 6, 7, 8, 9} → LHS

A’ = {6, 7, 8, 9}

B’ = {1, 2, 7, 8, 9}

A’ ∪ B’ = {1, 2, 6, 7, 8, 9} → RHS

Graphically,

De Morgan's Law - 2
De Morgan’s Law – 2

Following video summarizes the various crisp set operations.

Watch on YouTube: operations on crisp set

operations-on-crisp-sets-on-youtube

Disjoint sets:

Two sets A and B are said to be disjoint, if they do not have any common element in them, i.e. A ∩ B = { }. For sets

A = Set of even numbers = {2, 4, 6, 8, …} and

B = Set of odd numbers = {1, 3, 5, 7, …}

A ∩ B = { }, so here A and B are disjoint sets

Graphically, it can be represented as,

disjoint sets
Disjoint sets

Partition of the set

If we consider country as an universal set, each state represents one set such that all sets are disjoint and the union of all those sets forms universal set. Let A1, A2, A3, …, An represents the n states in the country and set A represents the country.

As per the definition,

\bigcup_{i=1}^{n} A_i = A

Each Ai is called partition of set A

Graphically,

Partition of set A

Test Your Knowledge:

Consider the use case of university, in which a class is having 10 students. University is to offer elective subjects to the students. Instructor got following response from the students:

A represents the enrollment number of students who chose Image Processing

B represents the enrollment number of students who chose Machine Learning

C represents the enrollment number of students who chose Cloud computing

Let,

A = {1, 4, 7, 9}

B = {2, 5, 7, 9}

C = {1, 6, 8, 9}

Perform various crisp set operations and find the elements of following sets:

x1 = {Set of students who either Image Processing or Machine Learning }

x2 = {Set of students who does not selected Machine Learning }

x3 = {Set of students who selected all three subjects }

x4 = {Set of students who selected at least any one subject }

x5 = {Set of students who did not select any subject }

Please post your answers / queries / feedback in comment box below !