05Set_10

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

This preview shows pages 1–5. 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 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
ENGG1007 FCS 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. The 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. {
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2011 for the course ENGG 1007 taught by Professor Unknown during the Spring '11 term at HKU.

Page1 / 14

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

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

View Full Document
Ask a homework question - tutors are online