You are on page 1of 37

Set Theory A Set is a collection of objects.

A set must be well-defined, that is, it must be possible to determine whether or not an object is a member of the set.

Examples:

a bag of colored marbles a collection of Elizabethan dolls a collection of baseball cards from the 1956 season the possible outcomes, 1 through 6, when rolling a die

In contrast, a group of young children is not a set unless we specify what we mean by young children. For example, if we say children between the ages 2 years and 7 years, then we have a set. Members of a set are called elements and are represented with lower case letters.

{ }'s are used to enclose the elements of the set with each element separated by a comma.

A capital letter is used to name the set.

For example: L = { a, b, c, d, e, f }

L is the set which contains elements which are the lower case letters a through f of the English alphabet. For now we will list the elements of a set. Later we'll use the more concise set builder notation which is advanced and should be used at the Algebra level or later. A set can contain repeated elements, however, it is to be understood that the elements shown are unique. That is instead of: A = {1,2,2,3,4,4,5}, we write A = {1,2,3,4,5}. For our remaining discussion we'll assume that sets do not contain repeated elements.

To state that the element a is a member of the set L we use the notation: aL

Likewise, we can state that g is not an element of L using the notation: gL

The number of elements of a set is the size of the set.

The size of the set is the cardinality of the set.

The size of L is written two ways: |L| and n(L)

n(L) = 6 L is a finite set; there are only 6 elements. The set of Natural numbers N is not a finite set; it is an in-finite set, that is, an infinite set. N = {1, 2, 3, 4, 5, ...}. The ellipsis '...' following the 5 means "continue the sequence of numbers with no limit." There is always one more element. There is no number that is the cardinality of N however, there is a symbol used to describe it, 0, spoken "aleph null," to distinguish it from the unlimited nature of the set of real numbers R, which is named with 1, spoken "aleph 1." A set with cardinality 0 is countably unlimited while a set with cardinality 1 is not countably unlimited. We can continue counting every member of N without stopping, but we cannot begin to count every member of R. Between two consecutive elements of N, say 3 and 4, there are no elements, so we can count from 3 to 4 and move along. There are no consecutive elements in R so we cannot count from one to the other. For example, say 3 and 4 are consecutive elements. But 3.5 lies between 3 and 4, as does 3.6, as does 3.0001, etc. These elements cannot be counted.

Special Sets

{}

The empty set, the set with no elements. Also the empty set, the set with no elements. {} =

{}

The set that contains one element which is the empty set.

Word of caution: it is customary to write when we mean zero to distinguish zero from the letter O. When we talk about sets this convention no longer applies. no longer means zero, it means the empty set. 0 means zero.

is NOT the same as { } since { } = {{}}. {0} is the set with one element, the number 0. Every set (except ) contains as a member. We usually don't write it as a member but understand that it is a member. Also, sets can contain other sets as members. These sets are called power sets. For now we will consider sets that do not contain other sets, except for the member . Comparing Sets A set is a collection of objects. There is no order required for these objects. Sets can contain common elements and sets can contain elements that are not found in other sets. Sets may be identical, that is equal, and sets may have no members in common, in which case, they are unequal. First we need a frame of reference for the objects in the sets we discuss. This frame of reference is itself a set that is larger than or equal to the sets being discussed. This set is called the Universal set U. U contains all of the elements of the sets we will compare.

Examples A = {0, 1, 2, 3, 4, 5} B = {a, e, i, o, u, w, y} C = {1, 2, 3, 4, 5, 6} A is the set of whole numbers from 0 to 5. B is the set of lower case vowels (in the English alphabet). C is the set of natural numbers from 1 to 6.

A universal set U for set A is the set of whole numbers W = {0, 1, 2, 3, 4, 5, ... }. U is an infinite set. A universal set U for set B is the set of the lower case letters of the English alphabet, {a, b, c, ..., z}. U is a finite set. nU = |U| = 26. A universal set U for set C is the set of natural numbers N = {1, 2, 3, ...}. U is an infinite set.

Remember when we use the word infinite we mean unlimited.

Subsets

If the elements of J are also in K then J is a subset of K. Mathematically we write this fact as: J K.

Infrequently you will see K J, which means the set K contains the set J.

Examples 1. G = {1, 2} H = {2, 1, 3} G H. All of the elements of G are in H. H G.

2. G = {a, b, d} H = {a, b, c}

d H and c G so neither are a subset of the other. show they do have common elements.

Later we'll have a way to

3. G = {3, 2, 1, 4, 5} H = {1, 2, 3, 4, 5} 4. G = {1, 2, a, b, d} H = {a, b, d}

G H and H G, so G = H. Remember, element order makes no difference.

H G.

G H since elements a and b and d of H are in G.

In the last example notice that G has more elements than H. Whenever this is the case we say that H is a propersubset of G and we write: H G. Likewise in the first example G H. When we draw a line through and to get and we negate their meanings to "is not a subset" and "does not contain." And this of course leads to the following symbols , , and , which mean "not a proper subset," "properly contains," and "does not properly contain" respectively.

A set is always a subset of itself, that is A A. It is not a proper subset of itself, that is A A. In this case the subset and the set are the same sets, that is, they have the same number of elements. A proper subset must always have fewer elements.

Sets G and H are equal if G H and H G. The only way two sets can be subsets of each other is if they contain the same elements. In this case we write G = H.

G H means the set G and H are unequal. However, they may have some elements in common (examples 1, 2 and 4 above). If they have no elements in common then we say G and H are disjoint sets.

Examples G = {1, 2, 3} H = {2, 1, 3} Sets G and H contain the same elements 1, 2, and 3 so G = H. G. G H and H

G = {a, b, d} H = {a, b, c}

Sets G and H contain different elements, d and c respectively, so G H. However tehy are not disjoint since they share the elements a and b.

G = {1, 2, a, b, d} H = {c, e, 5}

G and H are not subsets of each other and they have no common elements so G H and further, they are disjoint sets.

The set of all distinct elements taken from one or more sets is called the union of these sets.

The operator is used to write the union of sets G and H like so:

G H.

Examples G = {1, 2, 3} H = {2, 1, 3} G = {a, b, d} H = {a, b, c} G = {1, 2, a, b, d} H = {a, b, d} G H = {1, 2, 3}.

G H = {a, b, c, d}.

G H = {1, 2, a, b, d}.

The union of a set with itself is that set. The union of any set A with is the set A.

AA=A A=A

The set of elements that are common to one or more sets is called the intersection of these sets. The operator is used to write intersections. G H is the intersection of sets G and H.

Examples G = {1, 2, 3} H = {2, 1, 3} G = {a, b, d} H = {a, b, c} G = {1, 2, a, b, d} H = {a, b, d} G = {1, 2, 3, 4} H = {a, b, c} G H = {1, 2, 3}.

G H = {a, b}.

G H = {a, b, d}.

GH=

Notice that we did not write repeated elements in the unions or intersections of these sets. We're interested in the distinct elements only.

The intersection of a set with itself is that set, as the first example directly above demonstrates. A A = A The intersection of any set A with is . Remember that is a member of every set. A =

The set of the elements in the universal set U that are not in a given set A is called the complement of A and is written A. Important: to even speak of the complement of set A we must know its containing set U. The definition of U usually comes from, or is implied by, the definition of the set itself. In the last example H = {a, b, d}. H does not make sense unless we, for example, restrict H to be the set of lower case letters of the English alphabet which precede the letter f. U = {a, b, c, d, e}. In this case, H = {c, e}. U can also be the set of lower case letters of the English alphabet, or U can be the English Alphabet. How ever U is specified it must contain the elements of the sets being discussed.

U is and is U.

Also, the complement of A is the set of elements in U that results from taking out (or subtracting) the elements in A from U. To write this you'll see two notations: U A and the older notation U \ A.

You may have noticed an odd role that plays. Since is a member of all sets, including U, then U must be the set of all elements of U removed, including . But this set with no elements by definition is . persists. This seems logically inconsistent but this definition is convenient for set operations.

What follows is the concise notation to name the elements of a set. This notation is appropriate for Algebra and later levels. For lower levels concentrate on the diagrams and forgo this notation. Reinforce the concepts involved using physical objects appropriate to the age of the student.

Set Builder Notation A = { x | x satisfies property P} "The set A contains those elements x that satisfy property P." The name of the set is A. The equal sign indicates the equality of A with the set defined by the braces {}. these braces we name the element, x, and clearly state the property P which x has. Example: S = { x | x is a state that borders Mexico} S = {California, Arizona, Texas} We speak this like so: "S is the set whose elements x are states that border Mexico." Or we can read this as "S is all x such that x is a state that borders Mexico." Example: T = { v | v N and v < 6} T = {1, 2, 3, 4, 5} "T is all v such that v is a natural number and v is less than 6." In

Instead of writing the elements within the braces, we write a general expression after the vertical bar that describes how the elements can be members of the set. U is usually implied. The property for set S uses the word "state" and also mentions the phrase "that borders Mexico." One implication of the phrasing is a "state" must be a member of the United States. Infrequently countries are referred to as states in the general sense. In this case the property is vague, it could mean the "Southern border of Mexico." We should take care and be as precise as possible. Venn diagrams are a good way to show set relationships. Visualization is the goal; however, it helps to include elements of the sets being compared in their correct regions for lower levels. These diagrams are named after John Venn who introduced them to conceptualize statements in logic. He was a logician and lived from 1834-1923.

In the following examples, note the words and and or and how they relate to the diagrams.

Example 1 This square represents the universal set U, sometimes called the "universe," of all objects that can be elements of the sets being discussed.

Example 2 Sets are represented as circles and labeled with their names. Here we have set A with hatch marks. These lines are useful to visualize how sets intersect one another and to indicate the elements of interest. The element of any set A must also be an element U. { x | x A and x U} U is understood so we drop x U and write { x | x A}

Example 3 Here we have U hatched but not A. All of these elements are not in A but in U. We know this to be the complement of set A. A = { x | x A }

Example 4 Sets A and B are shown. Here we illustrate that A and B are disjoint sets. No hatching is shown, there are no elements of interest. AB = For example if A and B were subsets of the Natural numbers where A contained the even numbers and B contained the odd numbers then A and B would have no numbers in common, they'd be disjoint sets.

Example 5 This diagram illustrates that B is a proper subset of A. BA AB=B { x | x B and A B = B } Instead of the word and you will often see a comma like this { x | x B, A B = B } Or we could also write { x | x B, B A }

Example 6 Here he have the two sets A and B overlapping. The hatching of each set cross precisely where they overlap. So in this case we are talking about the elements in A that are also in B. We know this to be the definition of intersection. The next diagram clearly shows this intersection colored in light blue.

Example 7 The blue region is the set A B = { x | x A and x B} In the remaining examples the blue shaded regions are the sets of interest.

Example 8 Now we have everything blue except the intersection of A and B. By definition this is the complement of the intersection of A with B. (A B) = { x | x (A B) } { x | x A or x B}

Be careful of the wordor. Everything outside of A includes the portion of B not intersecting with A. Likewise, everything outside of B includes those elements of A not intersecting B. So, the shaded region of A is caused by the complement of B and the shaded region of B is caused by the complement of A. The word orbrings both of these regions into the resulting set.

Example 9 A and B overlap. This time the hatching is in the same direction, which indicates all elements from both sets. By definition this is the union of A with B. AB = { x | x A or x B} Compare this example with the previous example noting the word 'or'.

Here is the region colored in blue.

Example 10 Now, shown in blue is everything but the elements in A and also the elements in B. This is U minus the union of A with B. We have the complement of the union of sets A with B. (A B) = { x | x A and x B } Compare this example with example 8. Note the difference of the words and and or.

Example 11 Here we have three sets A, B, and C all of which overlap. Notice how the hatching of the three sets combine in the center. The set represented is the intersection of all three sets with one another. Mathematically we write: ABC {x| x A and x B and x C}

Normally we would shade the region as shown in blue.

Example 12 This region is the complement of the intersection of the sets A, B, and C. (A B C) = { x | x A or x B or x C } Compare this example with example 8.

This diagram shows the full hatching of the above.The complement of each set is hatched, vertical green for C, 45 degree slant black for A and 135 degree slant red for B. Notice the only area without hatching is the same in the previous Venn diagram.

Here is another look. This example shows the contributions of the complement of A first, then the complement of B and finally the complement of C.

Example 13 A, B, and C have hatching in the same direction, so we are talking about the elements in A or in B or in C. This is the union of the sets A, B, and C. ABC = { x | x A or x B or x C}

Example 14 The blue region represents the complement of the previous example. (A B C) = {x | x A and x B and x C}

Example 15 The blue region occurs in the intersection of A with B, also in the intersection of B with C and finally in the intersection of A with C. The region is the union of these three intersections. (A B) (B C) (A C) = {x | (x A and x B) or (x B and x C) or (x A and x C) }

The diagrams on the left show the intersections of each set, A B, A C and B C, and the contributions each intersection make to the final set.

Example 16 The blue region is the complement of the previous example. ((A B) (B C) (A C)) (A B) (B C) (A C) {x | x (A B) and x (B C) and x (A C) }

In all of the previous examples, or means union and and means intersection.

The circles for each set create regions in U. The following diagrams will explain.

Region 1 contains the elements in A. Region 2 contains the elements notin A.

Region 1 contains the elements in A. Region 2 contains the elements in B. Region 3 contains the elements notin A and not in B.

Region 1 contains the elements in A only. Region 2 contains the elements in in B. (also in A since A contains B) Region 3 contains the elements notin A. (also not in B since A contains B)

Region 1 contains the elementsonly in A. Region 2 contains the elementsonly in B. Region 3 contains the elements inboth A and B. Region 4 contains the elements notin A nor in B.

Region 1 contains the elementsonly in A. Region 2 contains the elementsonly in C. Region 3 contains the elementsonly in B. Region 4 contains the elements inboth A and B only. Region 5 contains the elements inboth A and C only. Region 6 contains the elements inboth C and B only. Region 7 contains the elements that are in all three sets A and B and C. Region 8 contains the elements not in all of the sets A, B and C.

Applications

1. Twelve students in a classroom have pencils. students in the classroom. a) How many do not have a pencil?

Six students have pens. Four students have both.

There are 20

b) How many have neither a pen nor a pencil? c) How many have a pen but not a pencil?

First we create a Venn diagram, labeling the regions with the supplied information, then answer the questions.

U = number of students in the classroom, 20. We have two sets, pencils and pens. We draw two intersecting sets and label them pens and pencils respectively. We are told that 4 students have both so the number 4 is written in the region which is the intersection of these. Since 6 students have pens where 4 of these 6 have both then 6 - 4 = 2 students have only a pen. So we write this 2 in the pens set. Likewise, 12 students have pencils where 4 of these 12 students have both. This means that 12 - 4 = 8 only have pencils. This 8 is written inside the pencils set.

a) How many do not have a pencil? The number of students that do not have a pencil is the number of students not in the pencils set. The complement of the pencils set is this number, that is U pencils = 20 (8 + 4) = 20 12 = 8 students do not have a pencil.

b) How many have neither a pen nor a pencil? Such a student is outside these sets. A student who has one or the other or both would be in the union of these sets. We want the complement of this union. The union of these sets is (2 + 4) with pens + (8 + 4) with pencils which is 6 + 12 = 18 students; however, we counted those with both twice. So we need to subtract 4 from 18 to get 18 - 4 = 14 students. 20 14 = 6 students who have neither a pencil nor a pen.

b) How many have a pen but not a pencil? Reading from shaded region the answer is 2 students have only a pen. Using set notation we would write: |pens| |pens pencils| = 6 4 = 2 students who have a pen but not a pencil.

2) 80 students were interviewed to determine what sports they played, if any, and we found that

28 21 30 12

play basketball play hockey do not play football play basketball but not hockey

12 play hockey and football 15 play basketball and football 10 play all three sports

a) how many students play none of these sports? b) how many students only play basketball? c) how many play hockey or basketball but not football? At first look this problem may seem impossible to solve. It's daunting. However, using Venn diagrams is the approach to take. College aptitude/entrance exams have problems involving logic that are solved in this manner. The goal is to answer the questions a, b, and c. The strategy is to read the answers from a Venn diagrams. The method is to take each fact one at a time and place it in the Venn diagram in the correct location. Oftentimes, more than one fact must be used together. Also the order of the facts given is usually not the order to label the diagram. Setting up the diagram is the difficult part. So let's proceed.

We know that 80 students were interviewed, so U = 80. We also know that 3 sports are being discussed so our sets are these sports, football, basketball and hockey. And we know that 10 students play all three sports, so the number 10 is placed in the intersection of these sets.

15 students play football and basketball. Since 10 of these play all three this means that 15 - 10 = 5 play football and basketball alone. The shaded region below represents these 5 students that play basketball and

football only.

12 students play football and hockey. Since 10 of these play all three this means that 12 - 10 = 2 play football and hockey alone. The shaded region below represents these 2 students that play hockey and football only.

So far so good. 12 students play basketball but not hockey. These twelve must not lie within the hockey circle but must be within the basketball circle (the 10 is therefore not used since it lies in the hockey circle.) This region is the basketball circle minus the hockey intersection. 5 of these 12 students are already accounted for. This leaves 12 - 5 = 7 students who play basketball only.

28 students play basketball. We already have 7 + 5 + 10 = 22 students accounted for who play basketball. 28 22 = 6 students who must play hockey and basketball but not football. This is the shaded region below. All students who play basketball are now accounted for.

21 students play hockey. We already have 2 + 6 + 10 = 18 students accounted for who play hockey. 21 18 = 3students who must play hockey only. This is the shaded region below. All students who play hockey are now accounted for.

30 students do not play football. 80 30 = 50 students who play football. From the diagram we already know that 2 + 10 + 5 = 17 students play football, so 50 17 = 33 play football alone. All students who play football are now accounted for.

Now we need to check if we've covered all 80 students. From the Venn diagram we add starting with 3 and moving clockwise, 3 + 2 + 33 + 5 + 7 + 6 + 10 = 66 students who play sports. 80 students minus these 66 students leaves 14 students who do not play a sport. 14 is written outside the sets since it does not belong to any of the sets but is part of the 80 students interviewed. We have our finished Venn diagram.

Now we're ready to answer the questions. a) how many students play none of these sports? Directly from our diagram the answer is 14 students do not play any of these sports. (This is the complement of the union of all three sets.) b) how many students only play basketball? Directly from the diagram we have 7 students who play only basketball. c) how many play hockey or basketball but not football? We need the numbers not in the football set but in either or both the hockey and basketball sets, which is 3 + 6 + 7 = 16 students play hockey or basketball but not football.

At a costume party there were

110 girls 160 boys and girls knew how to dance 140 boys and girls wore costumes 100 boys knew how to dance 90 boys did not wear a costume 12 of the girls who wore costumes did not know how to dance 74 of the boys who did not wear costumes knew how to dance 34 of the girls who wore a costume also knew how to dance

1. 2. 3. 4. 5. 6. 7.

How How How How How How How

many many many many many many many

boys and girls attended the dance? boys attended the dance? boys neither wore a costume nor could dance? girls attended not wearing a costume and cold not dance? girls attended without a costume but knew how to dance? boys and girls did not know how to dance? boys and girls did not wear a costume?

First we need to draw the Venn diagram. You may be inclined to use 4 cirles, one for can dance, one for wears a costume, one for boys and one for girls. But if you think about this for a moment, our universal set U is made up of boys and girls only so a circle for girls is enough; its complement is the set of boys. Here's how the diagram is created.

We start with the sets that represent girls, can dance, and wore a costume, intersecting in the usual way.

Realizing that we can only have a boy or a girl, the complement of the girls set is the boys set, shown hatched below.

34 of the girls who wore a costume also knew how to dance. The region that represents this statement is the intersection of the 3 sets.

74 of the boys who did not wear costumes knew how to dance. These 74 are in the dance set but not in the costume set, and obviously not in the girls set.

12 of the girls who wore costumes did not know how to dance. These girls lie in the intersection of the girls and costume sets but not in the dance set.

90 boys did not wear a costume. We know that 74 boys who did not wear a costume can dance. The rest are those who lie outside the costume and can dance sets. This number is 90 - 74 = 16 boys who did not wear a costume.

100 boys knew how to dance. 74 of these boys didn't wear a costume so 100 - 74 = 26 of these boys wore costumes.

Now we can make use of the fact that 140 boys and girls wore costumes. Working around the wore a costume set we have 140 - 26 - 34 - 12 = 68 boys that wore costumes but could not dance.

We know that 160 boys and girls know how to dance so working around the dance set we get 160 - 34 - 26 - 74 = 26 girls who did not wear a costume but can dance.

Likewise, we have 110 girls and working around the girls set we have 110 - 12 - 34 - 26 = 38 girls who did not wear a costume and who cannot dance.

Using this last Venn diagram we can now directly answer the questions. 1. 2. 3. 4. 5. 6. 7. How many boys and girls attended the dance? 68 + 26 + 74 + 26 + 38 + 12 + 34 + 16 = 294 How many boys attended the dance? 68 + 26 + 74 + 16 = 184 How many boys neither wore a costume nor could dance? 16 How many girls attended not wearing a costume and cold not dance? 38 How many girls attended without a costume but knew how to dance? 26 How many boys and girls did not know how to dance? 38 + 12 + 68 + 16 = 134 How many boys and girls did not wear a costume? 38 + 26 + 74 + 16 = 154

When we take the union of 2 sets the number of elements in that union is not the number of elements in one set plus the number of elements in the other set. We need to subtract the number of elements in both sets. This makes sense since we would otherwise count the elements that are common, twice. This observation leads to the following result: UNION RULE

n(AB) = n(A) + n(B) n(AB) Observe that if A and B are disjoint then n(AB) = 0; in this case n(AB) = n(A) + n(B).

Example: 12 students are in two clubs, the chess and the 4H clubs. 3 students are in the chess club but not the 4H club and 2 students are in both clubs. How many are only in the 4H club? Let A be the chess club and B the 4H club. n(AB) = n(A) + n(B) n(AB) 12 = 3 + n(B) 2

12 3 + 2 = n(B) = 11

Example: If n(A) = 3, n(B) = 10 and n(AB) = 2, what is n(AB)? n(AB) = n(A) + n(B) n(AB) n(AB) = 3 + 10 &minus 2 = 11

Example: If n(A) = 20, n(B) = 30 and n(AB) = 12, what is n(AB)? n(AB) = n(A) + n(B) n(AB) 12 = 20 + 10 30 12 20 10 = n(AB) 18 = n(AB) n(AB) = 18

You might also like