0% found this document useful (0 votes)
34 views6 pages

Discrete Math

Uploaded by

Himal Bhattarai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views6 pages

Discrete Math

Uploaded by

Himal Bhattarai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

SETS

Set: Set is a well defined collection of objects called elements or members of the set. Capital letters are
used to denote sets whereas lowercase letters denote elements of sets. They can be represented in two
ways i.e. set builder form and roaster form.

REPRESENTATION OF SETS:

Set builder form:

The general form is, A = { x : property }

Example: Write the following sets in set builder form: A = {2, 4, 6, 8}

Solution:

2=2x1

4=2x2

6=2x3

8=2x4

So, the set builder form is A = {x: x=2n, n ∈ N and 1 ≤ n ≤ 4}

Roaster form:

In Roster form, all the elements of a set are listed and are separated by comma.

For example, the set of natural numbers less than 5.

Natural Number = 1, 2, 3, 4, 5, 6, 7, 8 ,……….

Natural Number less than 5 = 1, 2, 3, 4

Therefore, the set is N = { 1 , 2, 3, 4 }

Properties of Set:
1. It is a common practice of mathematics to put a slanted line or vertical line through a symbol to
indicate negative meaning of symbol.

2. The statement A⊆B doesnot exclude the property A=B. For every set A we have A⊆A. If A⊆B and
A≠B, we say A is the proper subset of B.

3. Suppose every element A belongs to B and every element of B belongs to C. Then every element
also belongs to B. i.e. A⊆B⊆C, then A⊆C.
TYPES OF SETS
Empty Set
A set which does not contain any element is called an empty set or void set or null set. It is denoted by {
} or Ø.

A set of apples in the basket of grapes is an example of an empty set because in a grapes basket there
are no apples present.

Singleton Set
A set which contains a single element is called a singleton set.

Example: There is only one apple in a basket of grapes.

Finite set
A set which consists of a definite number of elements is called a finite set.

Example: A set of natural numbers up to 10.

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

Infinite set
A set which is not finite is called an infinite set.

Example: A set of all natural numbers.

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

Equivalent set
If the number of elements is the same for two different sets, then they are called equivalent sets. The
order of sets does not matter here. It is represented as:

n(A) = n(B) , where A and B are two different sets with the same number of elements.

Example: If A = {1,2,3,4} and B = {Red, Blue, Green, Black}

In set A, there are four elements and in set B also there are four elements. Therefore, set A and set B are
equivalent.

Equal sets
The two sets A and B are said to be equal if they have exactly the same elements, the order of elements
do not matter.
Example: A = {1,2,3,4} and B = {4,3,2,1} A=B

Disjoint Sets
The two sets A and B are said to be disjoint if the set does not contain any common element.

Example: Set A = {1,2,3,4} and set B = {5,6,7,8} are disjoint sets, because there is no common element
between them.

Subsets
A set ‘A’ is said to be a subset of B if every element of A is also an element of B, denoted as A ⊆ B. Even
the null set is considered to be the subset of another set. In general, a subset is a part of another set.

Example: A = {1,2,3}

Then {1,2} ⊆ A.

Similarly, other subsets of set A are: {1},{2},{3},{1,2},{2,3},{1,3},{1,2,3},{}.

Note: The set is also a subset of itself.

If A is not a subset of B, then it is denoted as A⊄B.

Proper Subset
If A ⊆ B and A ≠ B, then A is called the proper subset of B and it can be written as A⊂B.

Example: If A = {2,5,7} is a subset of B = {2,5,7} then it is not a proper subset of B = {2,5,7}

But, A = {2,5} is a subset of B = {2,5,7} and is a proper subset also.

Superset
Set A is said to be the superset of B if all the elements of set B are the elements of set A. It is
represented as A ⊃ B.

For example, if set A = {1, 2, 3, 4} and set B = {1, 3, 4}, then set A is the superset of B.

Universal Set
A set which contains all the sets relevant to a certain condition is called the universal set. It is the set of
all possible values.

Example: If A = {1,2,3} and B {2,3,4,5}, then universal set here will be:

U = {1,2,3,4,5}
Operations on Sets
In set theory, the operations of the sets are carried when two or more sets combine to form a single set
under some of the given conditions. The basic operations on sets are:

 Union of sets
 Intersection of sets
 A complement of a set
 Cartesian product of sets.
 Set difference

 Union of Sets : If set A and set B are two sets, then A union B is the set that contains all the
elements of set A and set B. It is denoted as A ∪ B.

 Intersection of Sets : If set A and set B are two sets, then A intersection B is the set that
contains only the common elements between set A and set B. It is denoted as A ∩ B.

 Complement of Sets : The complement of any set, say P, is the set of all elements in the
universal set that are not in set P. It is denoted by P’.

 Cartesian Product of sets: If set A and set B are two sets then the cartesian product of set A
and set B is a set of all ordered pairs (a,b), such that a is an element of A and b is an element of
B. It is denoted by A × B.

 Set difference: If set A and set B are two sets, then set A difference set B is a set which has
elements of A but no elements of B. It is denoted as A – B.

 Symmetric difference: It is denoted by A⊕B and it consists of those elements which belong to
A or B but not both.

 PROBLEM SOLVING:

1. Write a program to find the Cartesian products of two sets.

2. Write a menu based program for two sets to find union, intersection, difference, symmetrical
difference.

Solutions:
CONCLUSION:
Form this lab, we got familiar with the sets, their types and their operations. We got to perform
programs related to Cartesian products of the sets and finding the union, intersection, difference, etc.

You might also like