Chapter 2: The Basic Concepts of Set Theory Sets A set is a collection of distinguishable objects (called elements) •Can define in words •Can list elements explicitly •Can use set-builder notation Sets must be well-defined. Sets of Numbers •Natural/Counting numbers {1, 2, 3,…} •Whole Numbers {0,1, 2, 3,…} •Integers {…, -2, -1, 0, 1, 2, … } •Rationals {p/q | p,q are integers and q≠0} •Reals {x | x is a number that can be written as a decimal} (For now we won’t focus on the rationals and reals, we will come back to them in Chapter 6) Some Notation and Terminology • Sets are denoted by A,B,C, etc, elements are often a,b,c,… • x Î A means x is an element of A • x Ï A means x is not an element of A • n(A)= number of distinct elements in A, called the cardinal number of A. If n(A) is a whole number then A is a finite set. Otherwise it is an infinite set. • The empty set: or { } • The universal set U Equality, Complements and Subsets •The complement of a set A within U, denoted A’, is the set of all elements of U that are not in A: A’= {x|x Î U and x ÏA} •A is a subset of B if every element of A is also an element of B: A Í B •A is equal to B if every element of A is in B and every element of B is in A. A=B means A Í B and B Í A. Proper Subsets and Number of Subsets • A is a proper subset of B if A Í B and A ≠ B, denoted by A Ì B. So every element of A is in B and B contains something that is not in A. • Number of subsets of a set with n elements is 2n • Number of proper subsets is 2n-1 Operations on Sets The intersection of A and B is A Ç B = {x | x ÎA and x Î B} The union of A and B is A È B = {x | x Î A or x Î B} The difference of A and B is A – B = {x | x Î A and x Ï B} Some Useful Results Cardinal number formula: n(A È B) = n(A) + n(B) – n(A Ç B) De Morgan’s Laws: (A Ç B)’ = A’ È B’ (A È B)’ = A’ Ç B’ Ordered Pairs and Cartesian Product In the ordered pair (a,b), a is called the first component and b is called the second component. In general, (a,b) ≠ (b,a). The Cartesian product of A and B is A x B = { (a,b) | a Î A and b ÎB}. We have: n(A x B) = n(A) x n(B) #21, page 81 The following list shows the preferences of 102 people at a wine-tasting party: •99 like Spanada •96 like Ripple •99 like Boone’s •95 like Spanada and Ripple •94 like Ripple and Boone’s •96 like Spanada and Boone’s •93 like all three #23, page 81 Country-Western Songs Songs are about three themes: love, prison and trucks. Survey of local ratio: • 12 songs about a truck driver in love while in prison • 13 about a prisoner in love • 28 about a person in love • 18 about truck driver in love • 3 about a truck driver in prison who is not in love • 2 about people in prison who are not in love and don’t drive trucks • 8 about people who are out of prison, are not in love and do not drive trucks • 16 about truck drivers who are not in prison #23 continued • How many songs were surveyed? • Find the number of songs about Truck drivers Prisoners Truck drivers in prison People not in prison People not in love Equivalent sets and Infinite Sets Sets with the same cardinality can be put in a one-to-one correspondence. If n(A) = n(B), then A and B are equivalent, and we write A ~ B. A set is infinite if it can be placed in one-toone correspondence with a proper subset of itself. Countability The set of counting numbers is infinite and has cardinality À0. (aleph-null) A set is countable if it is finite or has cardinal number À0. The set of reals is uncountable and has cardinality c. (so there are different infinities!) Achilles and the Tortoise Achilles, if he starts out behind a tortoise, can never overtake the tortoise even if he runs faster: Suppose Tortoise has a head start of one meter and goes one-tenth as fast as Achilles. When Achilles reaches the point where the tortoise started, Tortoise is then one-tenth meter ahead. When Achilles reaches that point, Tortoise is onehundredth meter ahead. And so on. Achilles gets closer but he can never catch up!