Discrete Math
Discrete Math
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:
Solution:
2=2x1
4=2x2
6=2x3
8=2x4
Roaster form:
In Roster form, all the elements of a set are listed and are separated by comma.
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.
Finite set
A set which consists of a definite number of elements is called a finite set.
A = {1,2,3,4,5,6,7,8,9,10}
Infinite set
A set which is not finite is called an infinite set.
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.
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.
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.
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:
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.