19
Chapter 2 - Sets CSNB 143 Discrete Mathematical Structures

CSNB 143 Discrete Mathematical Structures

Embed Size (px)

DESCRIPTION

CSNB 143 Discrete Mathematical Structures. Chapter 2 - Sets. Sets. OBJECTIVES Student should be able to identify sets and its important components. Students should be able to apply set in daily lives. Students should know how to use set in its operations. What, which, where, when. - PowerPoint PPT Presentation

Citation preview

Page 1: CSNB 143   Discrete Mathematical Structures

Chapter 2 - Sets

CSNB 143 Discrete Mathematical

Structures

Page 2: CSNB 143   Discrete Mathematical Structures

SetsOBJECTIVESStudent should be able to identify sets and

its important components.Students should be able to apply set in

daily lives.Students should know how to use set in its

operations.

Page 3: CSNB 143   Discrete Mathematical Structures

What, which, where, when1. Basics of set (Clear / Not

Clear )2.Terms used in setEqual sets (Clear / Not Clear)Empty (Clear / Not Clear)

Disjoint / Joint (Clear / Not Clear)Finite / Infinite (Clear / Not Clear)Cardinality (Clear / Not Clear)Subset (Clear / Not Clear)Power set (Clear / Not Clear)

Page 4: CSNB 143   Discrete Mathematical Structures

3. Operations on setsUnion (Clear / Not Clear)Intersection (Clear / Not

Clear)Complement (Clear / Not Clear)Symmetric Difference (Clear / Not Clear)

4. Venn DiagramInformation Searching (Clear / Not

Clear)

Page 5: CSNB 143   Discrete Mathematical Structures

SETA collection of data or objects.Each entity is called element or member,

defined by symbol .Order is not important.Repeated element is not important. One way to describe set is to listing all the

elements, in curly bracket.

Page 6: CSNB 143   Discrete Mathematical Structures

Ex 1:A = {1, 2, 3, 4, 5} B = {2, 3, 1, 4,

5)C = {1, 2, 1, 3, 4, 5}Thus we said, sets A and B are equal. A =

B 1 A, 2 A, but 7 A

How about A and C? How about B and C?

Page 7: CSNB 143   Discrete Mathematical Structures

Ex 2:P = {p, q, r} Q = {p, q, r, s}R = {q, r, s}

So, p P, q P, r P,

q Q, r R

Page 8: CSNB 143   Discrete Mathematical Structures

Other way to describe set:A = {x| 1 x 5}A = {x| x is an integer from 1 to 5, both

included}A = {x| x + 1 ; 0 x < 5}

If the set has no element, it is called the empty set, denoted by {} or .

Let D = {6, 7, 8} So, A and D are called Disjoint Sets. Why?

What is the example of joined set?

Page 9: CSNB 143   Discrete Mathematical Structures

A set A is called finite if it has n distinct elements, where n N (nonnegative number).

Ex 3: A = {x| 1 x 5}

The number of its elements, n is called the cardinality of A, denoted by |A|= 5.

A set that is not finite is called infinite. Ex 4: A = {x| x ≥ 1}

Page 10: CSNB 143   Discrete Mathematical Structures

SubsetIf every element of A is also an element of B,

that is, if whatever x A then x B, we say that A is a subset of B or that A is contained in B, written as A B (some books use symbol ).

Sets that all its elements are part or overall of other set.

Ex 5:A = {1, 2, 3, 4, 5}B = {1, 3, 5}C = {1, 2, 4, 6}, Thus,B A, but C AB A but A B

Page 11: CSNB 143   Discrete Mathematical Structures

Consider Ex 1. A = {1, 2, 3, 4, 5} B = {2, 3, 1, 4,

5)C = {1, 2, 1, 3, 4, 5}

Is A B? Is B A? Is A C? Is B C?

Page 12: CSNB 143   Discrete Mathematical Structures

Power SetIf A is a set, then the set of all subsets of A

is called the power set of A, denoted by P (A).

A set that contains all its subset as its element. Ex 6: A = {1, 2}

P (A) = {{1}, {2}, {1, 2}, } |P (A)| = 4

Page 13: CSNB 143   Discrete Mathematical Structures

Operation on setsUnion Let say A and B are sets. Their union is a set

consisting of all elements that belong to A OR B and denoted by A B.

A B = {x|x A or x B}

IntersectionsLet say A and B are sets. Their intersection is

a set consisting of all elements that belong to both A AND B and denoted by A B.

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

Page 14: CSNB 143   Discrete Mathematical Structures

Operation on setsComplementLet say set U is a universal set. U – A is called

the complement of A, denoted by A’ (some book use A)A’ = { x|x A}

If A and B are two sets, the complement of B with respect to A is a set that contain all elements that belong to A but not to B, denoted by A – B. Try Ex 5. Find A – B, A – C, C – A, C – B.

Page 15: CSNB 143   Discrete Mathematical Structures

Symmetric DifferenceLet say A and B are two sets. Their

symmetric difference is a set that contain all elements that belong to A OR B but not to both A and B, denoted by A B.

A B = {x|(x A and x B) or (x B and x A)}Try Ex 2. Find P R.

Page 16: CSNB 143   Discrete Mathematical Structures

Venn DiagramExercise : A BA BA B CA B CA – B B – AA B

Page 17: CSNB 143   Discrete Mathematical Structures

TheoremsCommutativeA B = B A A B = B

AAssociativeA (B C) = (A B) CA (B C) = (A B) CDistributiveA (B C) = (A B) (A C)A (B C) = (A B) (A C)IdempotentA A = A A A = A

Page 18: CSNB 143   Discrete Mathematical Structures

ComplementA’’ = A A A’ = UA A’ = ’ = U U’ = (A B)’ = A’ B’(A B)’ = A’ B’Universal SetA U = U A U = AEmpty SetA = A A =

Page 19: CSNB 143   Discrete Mathematical Structures

2 disjoint sets|A B| = |A| + |B|2 joint sets|A B| = |A| + |B| - |A B|3 disjoint sets|A B C| = |A| + |B| + |C|3 joint sets|A B C| = |A| + |B| +|C| - |A B| - |A

C| - |B C| + |A B C|