Mathematics For Computing - I: Sets (07 HRS.)
Mathematics For Computing - I: Sets (07 HRS.)
Mathematics For Computing - I: Sets (07 HRS.)
Instructional Objectives
Illustrate properties of set algebra using Venn-diagrams. Prove various useful results of set algebra.
Main Reference
Schaums Outline series: Discrete Mathematics, 2nd Edition by Seymour Lipshutz & Marc Lipson, Tata McGrawHill India, 2003, Chapter 01.
Introduction to Sets
George Cantor (1845-1915), in 1895, was the first to define a set formally. Definition - Set
A set is a unordered collection of zero of more distinct well defined objects.
Specifying Sets
There are two ways to specify a set
1. If possible, list all the members of the set.
E.g. A = {a, e, i, o, u}
The members of a set can be anything. In a set the same member does not appear more than once.
F = {a, e, i, o, a, u} is incorrect since the element a repeats.
6
Some Notation
Consider the set A = {a, e, i, o, u} then We write a is a member of A as:
aA
Venn Diagrams
A pictorial way of representing sets. The universal set is represented by the interior of a rectangle and the other sets are represented by disks lying within the rectangle.
E.g. A = {a, e, i, o, u}
a u i e o
10
11
Cardinality of a Set
The number of elements in a set is called the cardinality of a set. Let A be any set then its cardinality is denoted by |A| E.g. A = {a, e, i, o, u} then |A| = 5.
12
Subsets
Set A is called a subset of set B if and only if every element of set A is also an element of set B. We also say that A is contained in B or that B contains A. It is denoted by A B or B A. In other words we can say:
(A B) (x, x A x B)
13
Subset ctd
If A is not a subset of B then it is denoted by A B or B A
E.g. A = {1, 2, 3, 4, 5} and B = {1, 3} and C = {2, 4, 6} then B A and C A
B 5 1 3 2 4 6 A C
14
15
Proper Subsets
Notice that when we say A B then it is even possible to be A = B. We say that set A is a proper subset of set B if and only if A B and A B. We denote it by A B or B A. In other words we can say:
(A B) (x, xA xB AB)
16
If A B then the disc showing B may overlap with the disc showing A where in this case it is actually A = B
17
Power Set
The set of all subsets of a set S is called the power set of S. It is denoted by P(S) or 2S. In other words we can say: P(S) = {x : x S} E.g. A = {1, 2, 3} then
P(A) = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}