Chapter 2 Sets and Functions Section 2.2 Operations on Two Sets As we have seen before when we were talking about logic the real interesting and useful things happen when two categories of things are being discussed at once. We will give a more detailed way to show how two categories of things can interact. I want to start by going back to a previous example. Let: J = Months that begin with the letter J = {January, June, July} Y = Months that end with the letter Y = {January, February, May, July} U = Universal Set (All months) = {Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec} Intersection Union The intersection of two sets is marked with the symbol . It represents the elements that are common to both sets at the same time. The union of two sets is marked with the symbol . It represents what you get by putting together the elements in both sets (i.e. the set containing all the elements in both sets). J Y = {January, July} J Y = {January, February, May, June, July} Venn Diagrams To represent two different sets in a Venn Diagram we put all the elements in the diagram (only once!)in the correct region for the set(s) they are in. For example J = {January, June, July} Y = {January, February, May, July} U = {January, February, March, April, May, June, July, August, September, October, November, December} U March J Y January May August June July April February November December September October J = {May, February, March, April, August, September October, November, December} Y = {June, March, April, August, September October, November, December} Various regions in the Venn Diagram can be referred to symbolically by combining the set operations intersection (), union () and complement (¯). U March J Y January May August June July April February November December September October J Y = Elements in J and at the same time not in Y = {June} J Y = Elements not in J and at the same time in Y = {May, February} J Y = Elements in neither J nor Y = {March, April, August, September, October, November, December} Numerical Information About Sets We can construct the Venn Diagrams to include the number of elements in various components of sets. Rather than listing all the elements in a set we would just put in the number in that region. U A B horse mouse dog bird cat rat pig U A frog B snake fish 3 2 2 cow 4 The number in set A is: 5 The number in set B is: 4 The number in AB is: 2 (This is how many are in both A and B.) The number in AB is: 7 (This is how many are in either A or B.) The number in A B is: 3 (This is how many are in A but not in B (i.e. just A).) The number in A B is: 4 (This is how many are in neither A nor B) Numerical Problems with Sets Given some numerical information about sets of things and how they are related we can extract more information based on what we know about sets. Consider the following problem: A survey of 100 people at the DMV asked them if they owned a car or a truck. The results were that 78 people said they owned a car and 46 people said they owned a truck. Of the 46 people who said they owned a truck 29 said they also owned a car. Answer each of the following questions: How many own both a truck and car? 29 How many own either a truck or a car? 95 The idea here is to think in terms of sets and fill in the corresponding numbers in the Venn Diagram. How many own just a truck? 17 Let the set C = Car Owners How many own just a car? 49 Let the set T = Truck Owners How many own neither a truck nor a car? 5 How many do not own a car? 22 How many do not own a truck? 54 U C T 49 29 17 5 Numerical Information in Tables Another way that information about the number of items in a set can be collected is in the form of a table. Lets look at the following problem. A survey is taken of 200 students in a dorm asking if they were: male, female, democrat, republican or independent. The results are given in the table below. Democrat (D) Republican (R) Independent (I) Female (F) 54 32 7 Male (M) 41 46 20 Each category is represented by a set. D = Set of Democrats F = Set of Females R = Set of Republicans M = Set of Males I = Set of Independents We can ask some more complicated questions about these categories of people. Democrat (D) Republican (R) Independent (I) Female (F) 54 32 7 Male (M) 41 46 20 1. How many males are there? (i.e. The number in the set M) 41 + 46 + 20 = 107 2. How many Democrats are there? (i.e. The number in the set D) 54 + 41 = 95 3. How many are both male and democrat? (i.e. The number in the set MD) 41 4. How many are either female or independent? (i.e. The number in the set FI) 54 + 32 + 7 + 20 = 113 5. How many are not republican? 54 + 41 + 7 + 20 = 122 (i.e. The number in the set R )