05Set_10

# 05Set_10 - ENGG1007 Foundations of Computer Science Sets...

This preview shows pages 1–6. Sign up to view the full content.

1 ENGG1007 Foundations of Computer Science Sets Sets Prof. Francis Chin, Dr SM Yiu Sept 20/22, 2010 (Chapter 2.1, 2.2)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 ENGG1007 FCS Sets Sets Definition & Notation Definition & Notation A set is a collection of objects . Example: A = {apple, orange, mango, pear} ; apple ‘apple’ B = {policeman, fireman, manager, doctor, lawyer} C= {1 , 2 } D = {1, house, john, apple, salmon} E = {1, 2, C} = {1, 2, {1, 2}} F= {F , 1 }
3 ENGG1007 FCS Elements of a Set Elements of a Set The objects are called elements elements or members members of the set. A set is said to contain contain its elements. Notations: x S : x is an element of the set S. ) 2 { 5, 7, π , “apple”, 2, 2.718 } ) {1} { {1}, {a, b}, a, 1 } ) Given F = {F, 1}, F F ? x x S : x is not an element of the set S. ) apple { 5, 7, π , “apple”, 2, 2.718 } ) b { {1}, {a, b}, a, 1 }

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 ENGG1007 FCS The Empty Set & The Universal Set The Empty Set & The Universal Set • The set that has no elements is called the empty set empty set or the null set null set , and is denoted by { } { } or . ¾ Note that mathematically, there is only one empty set. •T h e universal set universal set is the set containing all elements under consideration. A question A question : Is this, { { } , the empty set? ¾ Answer: No, this is a set containing 1 element, the empty set. • A set with 1 element is called a singleton singleton . ) e.g. { x }, { 1 }
5 ENGG1007 FCS Finite and Infinite Sets Finite and Infinite Sets S is a finite set finite set : S contains exactly n elements ( n 0) | S | is the cardinality

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 14

05Set_10 - ENGG1007 Foundations of Computer Science Sets...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online