Set_theory_and_Mathematical_Induction_Chapter1_[2]
Set_theory_and_Mathematical_Induction_Chapter1_[2]
Set_theory_and_Mathematical_Induction_Chapter1_[2]
Course Code:14B14MA211
Chapter 1
SET THEORY & MATHEMATICAL
INDUCTION
What is a set?
A set is a well defined collection of “objects”
People in a class: { Abhishek, Kunal, Chetna }
Courses offered by a department: { CI 101, CI 202, … }
Colors of a rainbow: {violet, indigo, red, orange, yellow, green, blue }
States of matter { solid, liquid, gas, plasma }
States in the US: { Alabama, Alaska, Virginia, … }
Sets can contain non-related elements: { 3, a, red, Virginia }
Although a set can contain (almost) anything, we will most often use sets
of numbers
All positive numbers less than or equal to 5: {1, 2, 3, 4, 5}
A few selected real numbers: { 2.1, π, 0, -6.32, e }
Order does not matter
We often write them in order because it is easier for
humans to understand it that way
{1, 2, 3, 4, 5} is equivalent to {3, 5, 2, 4, 1}
Set properties
Sets do not have duplicate elements
Consider the set of vowels in the alphabet.
It makes no sense to list them as {a, a, a, e, i, o, o, o, o, o, u}
What we really want is just {a, e, i, o, u}
Note that a list is like a set, but order does matter and
duplicate elements are allowed
We won’t be studying lists much in this class
Sets can contain other sets
S = { {1}, {2}, {3} }
T = { {1}, {{2}}, {{{3}}} }
V = { {{1}, {{2}}}, {{{3}}}, { {1}, {{2}}, {{{3}}} } }
Note that 1 ≠ {1} ≠ {{1}} ≠ {{{1}}}
They are all different
Specifying a set 1
Sets are usually represented by a capital letter (A, B,
S, etc.)
Infinite sets
Examples:
Z = {x | x is an integer} = {…, -3, -2, -1, 0, 1, 2, 3,…}
S
Subsets: review
X is a proper subset of Y
Power sets 1
Given the set S = {0, 1}. What are all the possible
subsets of S?
They are: (as it is a subset of all sets), {0}, {1}, and {0,
1}
The power set of S (written as P(S)) is the set of all the
subsets of S
P(S) = { , {0}, {1}, {0,1} }
Note that |S| = 2 and |P(S)| = 4
Power sets 2
Let T = {0, 1, 2}. The P(T) = { , {0}, {1}, {2},
{0,1}, {0,2}, {1,2}, {0,1,2} }
Note that |T| = 3 and |P(T)| = 8
P() = { }
Note that || = 0 and |P()| = 1
If a set has n elements, then the power set will have 2n
elements
If |A|=n, then |P(A)|=2n.
n n n n
2 n , for n 0
0 1 2 n
Set operations:
Union and Intersection
Given two sets A and B
The union of A and B is defined
as the set
A U B = { x | x A or x B }
{1, 2} ∩ =
Any set intersection with the empty set yields the empty
set
Set Operations: Relative
Complement
The relative complement (difference) of two
sets is the set defined as:
A — B = { x | x A and x B }
Given: A = {a, b, c, d} and B = {a, c, f, g}
A — B = {b, d} B — A = {f, g}
The difference of any set S with the empty set will be the set
(assuming U = Z)
Complement of {1, 2, 3} = { …, -2, -1, 0, 4, 5, 6, … }
XY=
XY=
X–Y=
Y–X=
X Δ Y = (how else can you write this?)
Example
If X={1, 4, 7, 10}, Y={1, 2, 3, 4, 5}
X Y = {1, 2, 3, 4, 5, 7, 10}
X Y = {1, 4}
X – Y = {7, 10}
Y – X = {2, 3, 5}
X Δ Y = (X Y) – (X Y) = {2, 3, 5, 7, 10}
Properties of Set operations
Properties of the union operation
AU=A Identity law
AUU=U Domination law
AUA=A Idempotent law
AUB=BUA Commutative
law
A U (B U C) = (A U B) U C Associative law
Properties of the intersection operation
A∩U=A Identity law
A∩= Domination law
A∩A=A Idempotent law
A∩B=B∩A Commutative
law
Properties contd…
Properties of complement sets
A=A Complementation law
¯
A
¯ UA=U Complement law
A∩A ¯ = Complement law
Properties of set operations (1)
Theorem 2.1.10: Let U be a universal set, and A,
B and C subsets of U. The following
properties hold:
a) Associativity: (A B) C = A (B
C)
(A B) C = A (B C)
b) Commutativity: A B = B A
c) Distributive laws:
AB=BA
A(BC) = (AB)(AC)
A(BC) = (AB)(AC)
d) Identity laws:
AU=A A = A
Properties of set operations (2)
(e) Complement laws:
AAc = U AAc =
f) Idempotent laws:
AA = A AA = A
g) Bound laws:
AU = U A =
h) Absorption laws:
A(AB) = A A(AB) = A
Properties of set operations (3)
i) Involution law: (Ac)c = A
j) 0/1 laws: c = U Uc =
k) De Morgan’s laws for sets:
(AB)c = AcBc
(AB)c = AcBc
Computer representation of sets 1
Assume that U is finite (and reasonable!)
Let U be the alphabet i.e. set of letters.
(iii) The universal set U is the disjoint union of all such fundamental
products.
Classic Boolean Model
Illustrates the 8 possible relations
between Sets, A, B and C
Region Relationship
1 ABC
2 ABC
3 ABC
4 ABC
5 ABC
6 ABC
7 ABC
8 ABC
Principle of Duality:
E dual of E (E*)
U
U
•Theorem (The Principle of Duality) Let E denote a theorem
dealing with the equality of two set expressions. Then E* is also
a theorem.
Duality contd:
For example
The dual of (U A) ( B A) A is ( A) ( B A) A.
Thus if E is an identity, then its dual E* is also an identity .
What is the dual of A B ?
Since A B A B B . The dual of A B is the dual of
A B B , which is A B B . That is, B A.
Counting Principle:
A B
| A B | | A| | B | | A B |
20 10 15
Examples:
2.
Given 100 B
samples 12
11 4
set A: with D1 3 7
set B: with D2 5
A
set C: with D3 15 C
how many samples
| A B |7, | A C |8, | B C |10,
have defects?
with |A|=23, |B|=26, |C|
B C |3
| A=30,
| A B C || A | | B | | C | | A B | | A C | | B C | | A B C |
, Ans:57
Partition of a set:
Let S be a nonempty set. A partition of S is a subdivision of S into
non-overlapping, non-empty subsets. i.e. a partition of S is a
collection { Ai } of non-empty subsets of S such that
(i) Each a S a Ai for some i
(ii) the sets { Ai } are mutually disjoint
i.e. Ai A j for i j
The subsets in a partition are
called cells. A1 A5
Example: Let S = { 1,2,3,….9} A2
A1 ={1,2} A2={5,6,7} A3 ={8}
A4 ={3,4} and A5 ={9} A3 A4 S
Then
A 5
i i 1 { A1 , A2 ,...... A5 } is a partition of S.
Example
X = { 1, 2, 3, 4, 5}
and S = X
Mathematical Induction
Let P(n) be the predicate
nn 1
Pn 1 2 3 n
2
This is true for particular values of n, e.g:
2(2 1)
1 2 3
2
3(3 1)
1 2 3 6
2
4(4 1)
1 2 3 4 10
2
Want to show that P(n) is true for all
integers n
i.e.: n:P(n)
The easiest way to prove such a statement
is to use the method of proof by induction
• The principle of mathematical induction is a
useful tool for proving that a certain
predicate is true for all natural numbers.