# Set theory and types of set in Discrete Mathematics

In this article, we will learn about the **introduction of sets and the different types of set which is used in discrete mathematics**.

Submitted by Prerana Jain, on August 11, 2018

## Set theory

The **set** is a well-defined collection of definite objects of perception or thought and the Georg Cantor is the father of set theory. A set may also be thought of as grouping together of single objects into a whole. The objects should be distinct from each other and they should be distinguished from all those objects that do not from the set under consideration. Hence an st may be a bunch of grapes, a tea set or it may consist of geometrical points or straight lines.

A **set** is defined as an unordered collection of distinct elements of the same type where type is defined by the writer of the set.

Generally, a set is denoted by a capital symbol and the master or elements of a set are separated by an enclosed in { }.

1 E A → 1 belong to A 1 E/ A → 1 does not belong to A

## Types of set

There are many types of set in the set theory:

**1. Singleton set**

If a set contains only one element it is called to be a singleton set.

Hence the set given by **{1}, {0}, {a}** are all consisting of only one element and therefore are singleton sets.

**2. Finite Set**

A set consisting of a natural number of objects, i.e. in which number element is finite is said to be a finite set. Consider the sets

**A = { 5, 7, 9, 11} and B = { 4 , 8 , 16, 32, 64, 128}**

Obviously, **A**, **B** contain a finite number of elements, i.e. 4 objects in **A** and 6 in **B**. Thus they are finite sets.

**3. Infinite set**

If the number of elements in a set is finite, the set is said to be an infinite set.

Thus the set of all natural number is given by **N = { 1, 2, 3, ...}** is an infinite set. Similarly the set of all rational number between ) and 1 given by

**A = {x:x E Q, 0 <x<1} is an infinite set.**

**4. Equal set**

Two set **A** and **B** consisting of the same elements are said to be equal sets. In other words, if an element of the **set A** sets the **set A** and **B** are called equal i.e. **A = B**.

**5. Null set/ empty set**

A null set or an empty set is a valid set with no member.

**A = { } / phie cardinality of A is 0.**

There is two popular representation either **empty curly braces { }** or a **special symbol phie**. This **A** is a set which has null set inside it.

**6. Subset**

A subset **A** is said to be subset of **B** if every elements which belongs to **A** also belongs to **B**.

A = { 1, 2, 3} B = { 1, 2, 3, 4} A subset of B.

**7. Proper set**

A set is said to be a proper subset of **B** if **A** is a subset of **B**, **A** is not equal to **B** or **A** is a subset of **B** but **B** contains at least one element which does not belong to **A**.

**8. Improper set**

Set **A** is called an improper subset of **B** if and Only if **A = B**. Every set is an improper subset of itself.

**9. Power set**

Power set of a set is defined as a set of every possible subset. If the cardinality of **A** is **n** than Cardinality of power set is **2^n** as every element has two options either to belong to a subset or not.

**10. Universal set**

Any set which is a superset of all the sets under consideration is said to be universal set and is either denoted by **omega** or **S** or **U**.

Let A = {1, 2, 3} C = { 0, 1} then we can take S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} as universal set.

TOP Interview Coding Problems/Challenges

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions

**Ad:**
Are you a blogger? Join our Blogging forum.