## Introduction

G. Cantor, a German mathematician, introduced the idea of sets. He identified a set as a compendium of definite and distinguishable objects chosen using specific rules or descriptions.

Set theory is the foundation of many other fields of study, including counting theory, relations theory, graph theory, and finite state machines. we will talk more about sets in this blog.

### Definition of Set

A set is an unsorted collection of various elements. A set can be explicitly written by listing its elements inside a set bracket. If the sequence of the elements is altered or any element of a set is reiterated, the set remains unchanged.

Some Sets Examples

- A set of all positive integers.
- A set of all negative integers.
- A set of all capital letters of the alphabet.
- A group of players in a cricket team.

Let us understand this concept with an example.

Consider the following scenario. You decided to take notes on the names of cafes on your way to school from home. The cafes were listed in the following order: C1, C2, C3, and C4. The previous list is a collection of objects. It is also well-defined. By well-defined, we mean that anyone should be able to tell whether or not an object belongs to a specific collection. A library, for example, cannot be classified as a cafe. A set is a collection of objects that is well-defined. The objects in a set are regarded as set elements. A set's elements can be finite or infinite.

You wanted to be sure of the list you had made earlier on your way back from school. You wrote the list in the sequence in which the restaurants arrived this time. C4, C3, C2, and C1 were added to the list.

This is an entirely different list. Is it, however, a different set? No, it does not. Because the order of the elements in a set is irrelevant, it is still the same set.

### Representation of set

There are two ways to represent a set:

- Tabular or roster form
- Set Builder Form

#### Roaster form

All of the set's elements are listed in roster form, isolated by commas and enclosed by curly braces.

Set of vowels in the English alphabet, A = {a,e,i,o,u}

Set of even numbers less than 10, B = {2,4,6,8}

The elements between the braces are now written in ascending order. This could be in descending or random order. As previously stated, the order of a set defined in the Roster Form is irrelevant.

#### Set Builder Form

All elements in Set Builder Form share a common property. This property does not apply to objects that do not belong to a set.

**For example:** If set S contains all elements that are even prime numbers, it is defined as S= { x: x is an even prime number}

where ‘x’ is a symbolic representation that is used to describe the elements of the set.

':' denotes ‘ such that ‘.

{} means ‘ the entire set ‘.

Another example can be

The set { 2,4,6,8 } is written as −

B = { x : 1 ≤ x < 10 and (x % 2) = 0 }

## Types of Set

The sets are further classified into various types based on the elements or types of elements. the different types of sets are following:

**Finite set:**A finite number of elements. For example S={x|x∈N and 100>x>60}**Infinite set:**There are an infinite number of elements. For example S={x|x∈N and x>15}**Empty set:**An empty set has no elements. For example S={x|x∈N and 10<x<9}=∅**Singleton set:**It contains only one element. For example S={x|x∈N, 8<x<10} = {9}**Equal set:**Two sets are equal if their elements are the same. For example, If A={4,1,5} and B={5,1,4}, they are equal as every element of set A is an element of set B and every element of set B is an element of set A.**Equivalent set:**If two sets have the same number of elements, they are equivalent. For example, If A={5,1,4} and B={10,11,,13}, they are equivalent as the cardinality of A is equal to the cardinality of B. i.e. |A|=|B|=3-
**Power set:**A collection of all possible subsets including the empty set. The cardinality of a power set of a set S of cardinality n is 2^n. The power set is represented as P(S). For example, let us compute the subsets of a set S={a,b,c,d}.

Subsets with single element − {a},{b},{c},{d}

Subsets with two elements − {a,b},{a,c},{a,d},{b,c},{b,d},{c,d}

Subsets with three elements − {a,b,c},{a,b,d},{a,c,d},{b,c,d}

Subsets with four elements − {a,b,c,d}

Hence, P(S)= {{∅},{a},{b},{c},{d},{a,b},{a,c},{a,d},{b,c},{b,d},{c,d},{a,b,c},{a,b,d},{a,c,d},{b,c,d},{a,b,c,d}}

|P(S)|=2^4=16 **Universal set:**Any set that contains all of the sets under given consideration. For example, U can be defined as the set of all humans on the planet. In this case, the set of all women is a subset of U.**Subset:**A set is a subset of all of its elements belonging to another set. For example, Let X={1,2,3,4,5,6} and Y={5,6}. Here set Y is a subset of set X as all the elements of set Y are in set X. Hence, we can write Y⊆X.-
**Disjoint set:**If two sets A and B have no elements in common, they are said to be disjoint. As a result, disjoint sets do have the following characteristics:

→ n(A∩B)=∅

→ n(A∪B)=n(A)+n(B)**For example:**Suppose A={ 3,5,7} and B={8,9,10} have no common element; thus, these sets are overlapping.