DMS 1 Set Theory
DMS 1 Set Theory
DMS 10CS34
PART – A
m
Sets and Subsets,
Set Operations and the Laws of Set Theory,
.co
Counting and Venn Diagrams,
A First Word on Probability,
Countable and
Uncountable Sets
cs
vtu
w.
ww
DMS 10CS34
DISRETE MATHEMATICAL
STRUCTURES
UNIT I 6 Hours
Set Theory
m
Sets: A set is a collection of objects, called elements of the set. A set can be
presented by listing its elements between braces: A = {1, 2, 3, 4, 5}. The symbol e is
.co
used to express that an element is (or belongs to) a set. For instance 3 e A. Its
negation is represented by /e, e.g. 7 /e A. If the set Is finite, its number of elements
is represented |A|, e.g. if A = {1, 2, 3, 4, 5} then |A| = 5
1.
2.
3.
4.
Q = the set of rational numbers.
R = the set of real numbers.
cs
N = {0, 1, 2, 3, · · · } = the set of natural numbers.
Z = {· · · , −3, −2, −1, 0, 1, 2, 3, · · · } = the set of integers.
vtu
5. C = the set of complex numbers.
Set-builder notation: An alternative way to define a set, called set- builder notation, is
by stating a property (predicate) P (x) verified by exactly its elements, for instance
A = {x e Z | 1 ≤ x ≤ 5} = ―set of integers x such that 1 ≤ x ≤ 5‖—i.e.: A = {1, 2, 3,
4, 5}. In general: A = {x e U | p(x)}, where U is the universe of discourse in which
the predicate P (x) must be interpreted, or A = {x | P (x)} if the universe of discourse
for P (x) is implicitly understood. In set theory the term universal set is often used in
place of ―universe of discourse‖ for a given predicate.
DMS 10CS34
Principle of Extension: Two sets are equal if and only if they have the same
elements, i.e.: A = B ≡ ∀x (x e A ↔ x e B) .
m
Proper subset: A is a proper subset of B, represented ―A ⊂ B‖, if A ⊆ B
but A = B, i.e., there is some element in B which is not in A.
.co
Empty Set: A set with no elements is called empty set (or null set,
or void set ), and is represented by ∅ or {}.
Note that nothing prevents a set from possibly being an element of another set (which
is not the same as being a subset!). For i n stance
if A = {1, a, {3, t}, {1, 2, 3}} and B= {3, t}, then obviously B is an element of A,
i.e., B e A.
cs
Power Set: The collection of all subsets of a set A is called the power set of A,
and is represented P(A). For instance, if A = {1, 2, 3}, then
vtu
P(A) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, A} .
Multisets: Two ordinary sets are identical if they have the same elements, so for
instance, {a, a, b} and {a, b} are the same set because they have exactly the same
elements, namely a and b. However, in some applications it might be useful to
allow repeated elements in a set. In that case we use multisets, which are
w.
mathematical entities similar to sets, but with possibly repeated elements. So, as
multisets, {a, a, b} and {a, b} would be considered different, since in the first one the
element a occurs twice and in the second one it occurs only once.
Set Operations:
ww
DMS 10CS34
3. Complement : The set of elements (in the universal set) that do not belong to a
given set:
A = {x e U | x /e A} .
4. Difference or Relative Complement : The set of elements that belong to a set but
not to another:
A − B = {x | (x e A) ∧ (x /e B)} = A ∩ B .
m
5. Symmetric Difference : Given two sets, their symmetric differ- ence is the set of
elements that belong to either one or the other set but not both.
A ⊕ B = {x | (x e A) ⊕ (x e B)} .
.co
It can be expressed also in the following way:
A ⊕ B = A ∪ B − A ∩ B = (A − B) ∪ (B − A) .
cs
A Venn diagram with n sets intersecting in the most general way divides the plane
into 2n regions. If we have information about the number of elements of some portions
of the diagram, then we can find the number of elements in each of the regions and
use that information for obtaining the number of elements in other portions of the
vtu
plane.
Example : Let M , P and C be the sets of students taking Mathe- matics courses,
Physics courses and Computer Science courses respec- tively in a university. Assume
|M | = 300, |P | = 350, |C | = 450,
|M ∩ P | = 100, |M ∩ C | = 150, |P ∩ C | = 75, |M ∩ P ∩ C | = 10. How
many students are taking exactly one of those courses? (fig. 2.7)
w.
taking Physics courses only (185) and taking Computer Science courses only (235).
The sum 60 + 185 + 235 = 480 is the number of students taking exactly one of those
courses.
DMS 10CS34
m
Venn Diagrams:
.co
Venn diagrams are graphic representa- tions of sets as enclosed areas in the plane.
For instance, in figure 2.1, the rectangle represents the universal set (the set of all
elements con- sidered in a given problem) and the shaded region represents a set A.
The other figures represent various set operations.
cs
vtu
w.
ww
DMS 10CS34
m
.co
Laws of set theory:The set operations verify the following
properties:
cs
vtu
w.
ww
DMS 10CS34
m
.co
cs
vtu
w.
ww
DMS 10CS34
Analogously, their intersection is the set of elements that belong to all the sets
simultaneously:
These definitions can be applied to infinite collections of sets as well. For instance
m
assume that Sm = {kn | k = 2, 3, 4, . . . } = set of multiples of n greater than n. Then
.co
Partitions: A partition of a set X is a collection S of non overlapping non empty
subsets of X whose union is the whole X . For instance a partition of X = {1, 2, 3, 4, 5,
6, 7, 8, 9, 10} could be
S = {{1, 2, 4, 8}, {3, 6}, {5, 7, 9, 10}} .
cs
Given a partition S of a set X , every element of X belongs to exactly one member of
S.
vtu
Example : The division of the integers Z into even and odd numbers is a partition: S =
{E, O}, where E = {2n | n e Z}, O = {2n + 1 | n e Z}.
Given two sets A, B, their Cartesian product A × B is the set of all ordered pairs (a, b)
such that a e A and b e B:
A × B = {(a, b) | (a e A) ∧ (b e B)} .
Analogously we can define triples or 3-tuples (a, b, c), 4-tuples (a, b, c, d),
. . . , n-tuples (a1 , a2 , . . . , am ), and the corresponding 3-fold, 4-fold,. . . ,
n-fold Cartesian products:
A1 × A2 × · · · × Am =
DMS 10CS34
m
Introduction: Assume that we perform an experiment such as tossing a coin or
rolling a die. The set of possible outcomes is called the sample space of the experiment.
An event is a subset of the sample space. For instance, if we toss a coin three times,
the sample space is
.co
S — {H H H, H H T , H T H, H T T , T H H, T H T , T T H, T T T } .
The event ―at least two heads in a row‖ would be the subset
E — {H H H, H H T , T H H } .
If all possible outcomes of an experiment have the same likelihood of occurrence, then
cs
the probability of an event A ⊂ S is given by Laplace‘s rule:
vtu
For instance, the probability of getting at least two heads in a row in
the above experiment is 3/8.
w.
ww
DMS 10CS34
m
.co
THE CONCEPT OF PROBALITY:
cs
Pr(A)=|A| / |S| where |A| is an event and |S| is sample space
Pr(A)=|A| / |S|=(|S|-|A|)/|S|= 1- (|A|/|S|)= 1-Pr(A).
Pr(A)=0 if and only if Pr(A)=1 and Pr(A)=1 if and only if
Pr(A)=0
vtu
ADDITION THEROM:
Suppose A and B are 2 events is a sample space S then A UB is an event in S consisting of
outcomes that are in A or B or both and A ∩ B is an event is S consisting of outcomes
thatarecommon to A and B. accordingly by the principle of addition we have
|AUB|=|A|+|B|-|A ∩B| and formula 1 gives
w.
Pr(AUB)=|AUB|/|S|=(|A|+|B|-|A ∩B|)/|S|
= |A|/|S| + |B|/|S| - |A ∩ B| / |S|
Pr(AUB) =Pr(A)+Pr(B)-Pr(A ∩ B)
ww
CONDITIONAL PROBABILITY:
DMS 10CS34
If E is an event in a finite sample S with Pr(E)>0 then the probability that an event A in S
occurs when E has already occurred is called the probability of A relative to E or the
conditional probability of A , given E
This probability, denoted by Pr(A|E) is defined by
Pr(A|E)=|A∩ E|/ |E| from this |A∩ E|=|E| . Pr(A|E)
Pr(A∩ E)= |A∩ E|/ S=|=|E|/|S| . Pr(A|E)=Pr(E) . Pr(A|E)
Example : Find the probability of obtaining a sum of 10 after rolling two fair dice. Find
m
the probability of that event if we know that at least one of the dice shows 5 points.
Answer : We call E — ―obtaining sum 10‖ and F — ―at least one of the dice shows 5
points‖. The number of possible outcomes is 6 × 6 —
.co
36. The event ―obtaining a sum 10‖ is E — {(4, 6), (5, 5), (6, 4)}, so
|E| — 3. Hence the probability is P (E) — |E|/|S| — 3/36 — 1/12.
Now, if we know that at least one of the dice shows 5 points then the
sample space shrinks to
F — {(1, 5), (2, 5), (3, 5), (4, 5), (5, 5), (6, 5), (5, 1), (5, 2), (5, 3), (5, 4), (5, 6)} ,
so |F | — 11, and the ways to obtain a sum 10 are E n F — {(5, 5)},
cs
|E n F | — 1, so the probability is P (E | F ) — P (E n F )/P (F ) — 1/11.
1. The probability that the shooter does not hit the target in one shot.
2. The probability that the shooter does not hit the target three times in a row.
3. The probability that the shooter hits the target at least once after shooting three
times.
Answer :
DMS 10CS34
0.973.
m
THE ADDITION PRINCIPLE:
• |AUB|=|A|+|B|-|A∩ B| is the addition principle rule or the principle of inclusion –
exclusion.
.co
• |A-B|=|A|-|A∩ B|
• |A ∩ B|=|U|-|A|-|B| +|A∩ B|
• |AUBUC|=|A|+|B|+|C|-|A ∩B|-|B ∩ C|-|A ∩ C|+|A ∩ B ∩ C| is extended addition
principle
• NOTE: |A ∩ B ∩ C|=|AUBUC|
=|U|-|AUBUC|
cs
= |U|-|A|-|B| -|C|+|B ∩C|+|A ∩B|+|A ∩C|- |A ∩B ∩C|
|A-B-C|=|A|-|A ∩ B|-|A ∩ C|+|A ∩ B ∩ C|
vtu
w.
ww