Lecture Note
Lecture Note
PROGRAMME – BCA
SEMESTER- IV
DISCRETE MATHEMATICS (BCA-401 )
UNIT I
Set Theory: Introduction, Combination of sets, Multisets,
Ordered pairs. Proofs of some general identities on sets.
Unit Structure
3.0 Objectives
3.1 Introduction
3.2. Definitions and Representation of sets
3.3 Diagrammatic Representation of a set
3.4 The Algebra of sets
3.5 The Computer representation of sets
3.6 Relations
3.7 Representation of Relations
3.8 Types of Relations
3.9 Relations and Partition
3.10 Unit End Exercise
3.0 OBJECTIVES:
3.1 INTRODUCTION:
Now we shall discuss various operations on sets. For this discussion, let U
be universal set and let A and B be two subsets of U.
Definition 3.2.9: Set of all elements, that are in A, but not in B, is called as
difference between A and B and denoted by
A – B. E.g. If A = {1, 4,7,8,9} and B = {4,9,11,13} then, A – B = {1,7, 8}.
Definition 3.2.13: Let A and B be two sets. The product set of A and B (or
Cartesian product of A and B), denoted by
A B, is set of all ordered pairs from A and B. Thus,
A B = {(a, b): a A, b B}.
E.g. Let A = { 1, 2, 3 } and B = { 4, 5} then
A B = {(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)}.
3.3 DIAGRAMMATIC REPRESENTATION OF A SET:
British mathematician, John Venn, devised a simple way to
represent set theoretic operations diagrammatically. These diagrams are
named after him as Venn Diagrams.
Figure 3.2: A⊆ B
AC
Figure 3.4: AC, the shaded region
A–B B
3.6 RELATIONS:
Example 3.2: Suppose we say that two countries are adjacent if they have
some part of their boundaries common. Then, “is adjacent to”, is a relation
R on the countries on the earth. Thus, we have, (India, Nepal) R, but
(Japan, Sri Lanka) R.
Example 3.4: Let A be any set. Then A A and are subsets of A A and
hence they are relations from A to A. These are known as universal
relation and empty relation, respectively.
Definition 3.6.2: Let R be any relation from a set A to set B. The inverse
of R, denoted by R–1, is the relation from B to A which consists of those
ordered pairs, when reversed, belong to R. That is:
R–1 = {(b, a) : (a, b) R}
Example 3.5: Inverse relation of the relation in example 1.1 is, R–1 = {(x,
1), (x, 2), (y, 3), (z, 3)}.
Matrices and graphs are two very good tools to represent various
algebraic structures. Matrices can be easily used to represent relation in
any programming language in computer. Here we discuss the
representation of relation on finite sets using these tools.
Fig 3.2
Thus, two ovals represent sets A and B respectively and we draw an arrow
from a A to b B, if a R b.
If the relation is from a finite set to itself, there is another way of pictorial
representation, known as diagraph.
Fig 3.3
The directed graphs are very important data structures that have
applications in Computer Science (in the area of networking).
a
x
b
c y
d z
Fig 3.4
Thus, from the definition of composite relation and also from Fig 3.4, RS
will be given as below.
Example 3.18: Relation “is less than ( < )”, defined on the set of all real
numbers, is an asymmetric relation.
Example 3.21: Consider the set L of lines in the Euclidean plane. Two
lines in the plane are said to be related, if they are parallel to each other.
This relation is an equivalence relation.
Example 3.23 : Let A 2, 3, 4, 5and let R 2, 3, 3, 3, 4, 5 , 5,1 .
Is R symmetric, asymmetric or antisymmetric?
Solution :
a) R is not symmetric, since 2, 3 R , but 3, 2 R ,
b) R is not asymmetric since 3, 3 R
c) R is antisymmetric since if a b either
a, b R or b, a R
23 3, 2 R
3 4 3, 4 R
45 5, 4 R
2 2, 5 R
Example 3.24 : Determine whether the relation R on a set A is reflenive,
irreflenire, symmetric, asymmetric antisymmetric or transitive.
Solution :
1) R is reflexive because a a 0 2, a A
2) R is not irreflexive because 11 0 2 for 1 A (A is the set
of all positive integers.)
3) R is symmetric because a b 2 b a 2 a R b b R a
4) R is not asymmetric because 5 4 2 and we have 4 5 2
5 R 4 4 R 5
5) R is not antisymmetric because 1 R 2 & 2 R 1 1 R 2 1 2 2 &
2 R 1 2 1 2 . But 1 2
6) R is not transitive because 5 R 4, 4 R 2 but 5 2
Solution :
As per above example we can prove that R is not reflexive, R is
irrflexive, symmetric, not asymmetric, not antisymmetric & not transitive
1) R is reflexive because a a 1 a | A .
2) R is not irreflexive because 0 0 1 for .
3) R is not symmetric because for 2 5 1 does not imply 5 2 1.
4) R is not asymmetric because for (2,3) R and also (3,2) R.
5) R is not antisymmetric because 5 R 4 and 4 R 5 but 4 5 .
6) R is not transitive because (6,45) R, (5,4) R but (6,47) R.
Example 3.23: Let A = {1, 2, 3, 4, 5}. The following sets form a partition
of A, as A = A1 A2 A3 and
A1 Α A1 Α and A2 Α
A1 = {1, 2}; A2 = {3, 5}; A3 = {4}.
Example 3.24: Let A = {1, 2, 3, 4, 5, 6}. The following sets do not form a
partition of A, as A = A1 A2 A3 but
A2 Α
A1 = {1, 2}; A2 = {3, 5}; A3 = {4, 5, 6}.
Example 3.27: Let A = {1, 2, 3, 4} and R = {(1, 1), (1, 2), (2, 1), (2, 2), (3,
4), (4, 3), (3, 3), (4, 4)}. We observe that R(1) = R(2) and R(3) = R(4) and
hence P = { {1, 2}, {3, 4} }.