10
CSNB143 – Discrete Structure Topic 1 - Set

CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Embed Size (px)

Citation preview

Page 1: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

CSNB143 – Discrete Structure

Topic 1 - Set

Page 2: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsLearning Outcomes

– 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.

Page 3: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1- SetIntroduction• A 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 list all the elements, in curly brackets.

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

Page 4: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsExample :

Work this out :

P = {p, q, r} Q = {p, q, r, s} R = {q, r, s}

Statement True or False?

q Q, T/Fr R T/Fs P, T/Fp P T/F

Statement True or False?

q Q, T/Fp R T/Fs P, T/Fs Q T/F

Page 5: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - Sets• 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} , A and D are called then Disjoint Sets. Why? What is the

example of joined set?• Set A is called finite if it has n distinct elements, where n N (nonnegative

number).Example : R = {x| 1 x 5}

• The number of its elements, n is called the cardinality of R, denoted by |R|= 5.• A set that is not finite is called infinite.

Example : C = {x| x ≥ 1}

Page 6: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsSubsets

• If every element of A is also an element of 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.• Example :

A = {1, 2, 3, 4, 5}B = {1, 3, 5}C = {1, 2, 4, 6}

Thus, B A, but C A, B A but A B

• Work this outIs A B? Is B A? Is A C? Is B C?

Page 7: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsPower set

• If 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.

• Example:

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

Page 8: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsOperations on Sets

Union • 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}

Intersections• Let 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 9: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - SetsOperations on Sets

Complement• Let 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.

Find A – B, A – C, C – A, C – B

Symmetric Difference• Let 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)}

Find P R

Page 10: CSNB143 – Discrete Structure Topic 1 - Set. Topic 1 - Sets Learning Outcomes – Student should be able to identify sets and its important components. –

Topic 1 - Sets

Venn Diagram• Diagram that is used to show the relations between sets. • Example : Given set A = {1, 2, 3, 4} and B = {1, 3, 5, 7, 9}

• Show using Venn diagram:a) A B and A Bb) A B = A B – (A B)c) A’ and B’d) A – B and B - A