You are on page 1of 31

Chapter 1

Set Theory

Set Theory
1.1 Sets and Subsets
A set is a well-defined collection of objects
finite sets, infinite sets, cardinality of a set, subset
A={1,3,5,7,9}
1 A,1 B ,1 C
B={x|x is odd integer} = {x|x integer ganjil}
C={1,3,5,7,9,...}
cardinality of A=5, no of elements= n(A)=5
A B
A is a proper subset of B.
CB
C is a subset of B.
2

Set Theory
1.1 Sets and Subsets
Elements of a set defined as members of a set.
Capital letters A , B , , Z - to represent sets.
Lowercase letters a , b , c ,, z to represent elements.
Equal set two sets are equal if and only if they have the same
elements.

Set Theory
1.1 Sets and Subsets
Eg: Elements of a set
A={1,3,5,7,9}
1 A , 3 A
2 A

Set Theory
1.1 Sets and Subsets
Def: Subset
If C , D are sets from a universe U , we say that C is a subset of D and we
write C D or D C , if every element of C is an element of D.

In addition, D contains an elements that is not in C , then C is called a


proper subset of D , and this is denoted by C D or D C.

Set Theory
1.1 Sets and Subsets
Eg: Let A = { 1 , 2 , 3 , 4 , 5} , C = {1 , 2} , D = {1 , 2}
C is a subset of D -

C D or D C

But C is not a proper subset of D -- C D.


C is a proper subset of A --- C A
D is a proper subset of A --- D A

C is equal to D --- C = D

Set Theory
1.1 Sets and Subsets
Eg: Negate x [ x A x B ]
Soln: x [ x A x B ]

Set Theory
1.1 Sets and Subsets
If A = B then A B B A
If A B then [A B B A]

[A B B A]
(A B) (B A)
(A B) (B A)

Set Theory
1.1 Sets and Subsets

A B x[ x A x B ]
A B x[ x A x B ]
subsets

x[ ( x A) x B )]
x[ x A x B ]
C D ( C D) ( D C )

set equality

C D (C D D C )
C D D C
9

Set Theory
1.1 Sets and Subsets

null set or empty set : { } ,


universal set, universe: U
power set of A: the set of all subsets of A
Eg. A={1}, then P(A)={{ }, {1}}
Eg. B={1,2}, then P(B)={{ }, {1}, {2}, {1,2}}
Eg. C={1,2,3}, then P(C)={{ }, {1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}}
If n(A)=n, then n(P(A)) = 2n.
10

Set Theory
1.1 Sets and Subsets

Eg: Let U = { 1 , 2 , 3 , 4 , 5 , 6 , x , y ,{1,2},{1,2,3},{1,2,3,4}}


And n(U) = 11.
If A = {1,2,3,4} then n(A) = 4. The following statements are TRUE :

a)

AU

d) {A} U

b) {A} U

c) A U

e) AU

f) {A} U

If B = {5 , 6 , x , y, A} ={5 , 6 , x , y, {1,2,3,4}} then n(B) = 5.


The following statements are TRUE :
a)

A B

d) {A} B

b) {A} B

c) {A} B

e) A B

f) A B
11

Set Theory
1.1 Sets and Subsets

common notations

(a) Z=the set of integers={0,1,-1,2,-1,3,-3,...}


(b) N=the set of nonnegative integers or natural numbers
(c) Z+=the set of positive integers
(d) Q=the set of rational numbers={a/b| a,b is integer, b not zero}
(e) Q+=the set of positive rational numbers
(f) Q*=the set of nonzero rational numbers
(g) R=the set of real numbers
(h) R+=the set of positive real numbers
(i) R*=the set of nonzero real numbers
(j) C=the set of complex numbers
12

Set Theory
1.1 Sets and Subsets

common notations
(k) C*=the set of nonzero complex numbers
(l) For any n in Z+, Zn={0,1,2,3,...,n-1}
(m) For real numbers a,b with a<b,
[ a, b] {x R | a x b}
closed
interval
( a, b) {x R | a x b}
open interval
[ a, b) {x R | a x b}
( a, b] {x R | a x b}

half-open interval

13

Set Theory
1.1 Sets and Subsets

Eg: Let U = {1,2,3,4,5,6,7,8,9,10} , A = {1,2,3,4,5} , B = {3,4,5,6,7}, C = {7,8,9}


Find the elements of the following sets:
a)

AB

b) A B

c) B C

d)

AC

e) A B

f) A C

Soln:

14

Set Theory
1.2 Set Operations and the Laws of Set Theory

For A,B U
A B {x | x A x B}
union
A B {x | x A x B}
intersection
AB {x | x A B x A B} symmetric difference
A B
Def: mutually disjoint
A U A {x | x U x A}
Def: complement

Def:
a)
b)
c)

Def: relative complement of A in B


B A {x | x B x A}
15

Set Theory
1.2 Set Operations and the Laws of Set Theory
Theorem: Let A , B, C U
a)If A B and B C, then A C
b) If A B and B C, then A C
c) If A B and B C, then A C
d) If A B and B C, then A C

16

Set Theory
1.2 Set Operations and the Laws of Set Theory
Theorem: For any universe U and any set A,B in U, the
following statements are equivalent:
a)
b)
c)
d)

A B
A B B
A B A
B A

reasoning process
(a) (b), (b) (c),
(c) (d), and (d) (a)

17

Set Theory
1.2 Set Operations and the Laws of Set Theory

The Laws of Set Theory


(1) A A
Law of Double Complement
(2) A B A B

Demorgan' s Laws

A B A B
(3) A B B A

Commutative Laws

A B B A
(4) A ( B C ) ( A B ) C
A ( B C ) ( A B) C

Associative Laws

(5) A ( B C ) ( A B ) ( A C ) Distributive Laws


A ( B C ) ( A B) ( A C )
18

Set Theory
1.2 Set Operations and the Laws of Set Theory
The Laws of Set Theory
(6) A A A, A A A Idempotent Laws
(7) A A, A U A Identity Laws
(8) A A U , A A
(9) A U U , A =
(10) A ( A B ) A

Inverse Laws
DominationLaws
Absorption Laws

A( A B ) A
19

Set Theory
1.2 Set Operations and the Laws of Set Theory

Ex : Negate A B.
A B { x | x A x B} A B
A B A B A B
De morgan on intersection

20

Set Theory
1.2 Set Operations and the Laws of Set Theory
Ex : Negate AB.
AB {x | x A B x A B}
( A B) ( A B) ( A B) ( A B)
AB ( A B ) ( A B ) A B ( A B )
( A B ) ( A B ) [( A B ) A] [( A B ) B ]
( B A) ( A B ) ( A B ) ( A B )
AB A B

21

Set Theory
1.2 Set Operations and the Laws of Set Theory

Def :

Ai {x | x Ai for at least one i I }, and

iI

Ai {x | x Ai for every i I }
iI
I: index set

Theorem: Generalized DeMorgan's Laws


Ai Ai

iI

iI

Ai Ai

iI

iI

22

Set Theory
1.2 Set Operations and the Laws of Set Theory
Eg: For each n+ , let An ={123,, n-1,n}. Determine
7

a)

An

n=1

11

b) An
n=1

c) An

d) An

n=1

n=1

Soln:

23

Set Theory
1.2 Set Operations and the Laws of Set Theory

Membership table to establish set equality:

A B

AB

0
0
1
1

0
1
0
1

0
0
0
1

0
1
1
1

0
1

1
0

24

Set Theory
1.2 Set Operations and the Laws of Set Theory
Eg: Use membership table to establish each of the following
a)

AB = AB

b) A A = A

c)

A (A B) = A

d) (A B) (A C) = (A B) (A C)

Soln:

25

Set Theory
1.2 Set Operations and the Laws of Set Theory
Eg: Simplify the expression (AB) C B
Soln:

26

Set Theory
1.2 Set Operations and the Laws of Set Theory
Eg: Express A B in terms of and

Soln:

A-B = {X|x A and x B} = A B

27

Set Theory
1.3 Counting and Venn Diagrams

Ex: In a class of 50 college freshmen, 30 are studying


BASIC, 25 studying PASCAL, and 10 are studying both. How
many freshmen are studying either computer language?
U

B
| A B | | A| | B | | A B |

20

10

15

28

Set Theory
1.3 Counting and Venn Diagrams

12
Ex: Defect types of an AND gate:
4
11
D1: first input stuck at 0
43
3 7
D2: second input stuck at 0
5
A
D3: output stuck at 1
15
C
Given 100 samples
set A: with D1
| A B C | | A| | B | | C | | A B |
set B: with D2
| A C | | B C | | A B C |
set C: with D3
with |A|=23, |B|=26, |C|=30,
| A B | 7, | A C | 8, | B C | 10,
| A B C | 3 , how many samples have defects?
Ans:57
29

Set Theory
1.3 Counting and Venn Diagrams

Ex:There are 3 games. In how many ways can one play one game each
day so that one can play each of the three at least once during 5 days?
set A: without playing game 1
set B: without playing game 2
set C: without playing game 3
| A| | B | | C | 2 5
| A B | | B C | | C A| 15
| A B C| 0
| A B C | 3 2 5 3 15 0 93
Ans 35 93 150

balls
1
2
3
4
5

containers
g1
g2
g3

30

End Chapter 1 set theory

31