This preview shows pages 1–8. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Harvard CS121 and CSCI E207 Lecture 2: Mathematical Preliminaries Harry Lewis September 8, 2009 Reading: Sipser, Chapter 0 Harvard CS 121 & CSCI E207 September 8, 2009 Sets Sets are defined by their members A = B means that for every x , x A iff x B Example: N = { , 1 , 2 ,... } Cardinality Sets can be finite (e.g. { 1 , 3 , 5 } ) or infinite (e.g. N ). Q: Is {N} finite? If A is finite ( A = { a 1 ,...,a n } for some n N ), then its cardinality (or size )  A  is the number of elements in A . The empty set has cardinality 0. Cardinality of infinite sets to be discussed later! 1 Harvard CS 121 & CSCI E207 September 8, 2009 Set Operations union { a,b } { b,c } = { a,b,c } intersection { a,b } { b,c } = { b } difference { a,b }  { b,c } = { a } A and B are disjoint iff A B = The power set of S = P ( S ) = { X : X S } e.g. P ( { a,b } ) = { , { a } , { b } , { a,b }} Q: What is  P ( S )  ? The Cartesian product of sets A,B A B = { ( a,b ) : a A,b B } triples, . . . 2 Harvard CS 121 & CSCI E207 September 8, 2009 Set Operations union { a,b } { b,c } = { a,b,c } intersection { a,b } { b,c } = { b } difference { a,b }  { b,c } = { a } A and B are disjoint iff A B = The power set of S = P ( S ) = { X : X S } e.g. P ( { a,b } ) = { , { a } , { b } , { a,b }} Q: What is  P ( S )  ? The Cartesian product of sets A,B A B = { ( a,b ) : a A,b B } triples, . . . 3 Harvard CS 121 & CSCI E207 September 8, 2009 Set Operations union { a,b } { b,c } = { a,b,c } intersection { a,b } { b,c } = { b } difference { a,b }  { b,c } = { a } A and B are disjoint iff A B = The power set of S = P ( S ) = { X : X S } e.g. P ( { a,b } ) = { , { a } , { b } , { a,b }} Q: What is  P ( S )  ? The Cartesian product of sets A,B A B = { ( a,b ) : a A,b B } triples, . . . 4 Harvard CS 121 & CSCI E207 September 8, 2009 Functions A function f : S T maps each element s S to (exactly one) element of T , denoted f ( s ) . For example, f ( n ) = n 2 is a function from Z N ( Z = all integers) 5 Harvard CS 121 & CSCI E207 September 8, 2009 Special varieties of functions S T 11: s 1 6 = s 2 f ( s 1 ) 6 = f ( s 2 ) S T Onto: For every t T there is an s S such that f ( s ) = t S T Bijection: 11 and onto 11 Correspondence Formal definition of cardinality:...
View Full
Document
 Fall '09

Click to edit the document details