Set. Set A set

Sets

It is natural for us to classify items into groups, or sets, and consider how those sets overlap with each other. We can use these sets understand relationships between groups, and to analyze survey data.

Basics

An art collector might own a collection of paintings, while a music lover might keep a collection of CDs. Any collection of items can form a set.

Set

A set is a collection of distinct objects, called elements of the set

A set can be defined by describing the contents, or by listing the elements of the set, enclosed in curly brackets.

Example 1

Some examples of sets defined by describing the contents:

a) The set of all even numbers

b) The set of all books written about travel to Chile
Some examples of sets defined by listing the elements of the set:

Commonly, we will use a variable to represent a set, to make it easier to refer to that set later.

The symbol ∊ means “is an element of”.
A set that contains no elements, { }, is called the empty set and is notated ∅

Example 2

Let A = {1, 2, 3, 4}
To notate that 2 is element of the set, we’d write 2 ∊ A

Sometimes a collection might not contain all the elements of a set. For example, Chris owns three Madonna albums. While Chris’s collection is a set, we can also say it is a subset of the larger set of all Madonna albums.

If B is a subset of A, we write B ⊆ AA proper subset is a subset that is not identical to the original set – it contains fewer elements.
If B is a proper subset of A, we write B ⊂ A

Example 3

Consider these three sets

A = the set of all even numbers B = {2, 4, 6} C = {2, 3, 4, 6}
Here B ⊂ A since every element of B is also an even number, so is an element of A.
More formally, we could say B ⊂ A since if x ∊ B, then x ∊ A.
It is also true that B ⊂ C.
C is not a subset of A, since C contains an element, 3, that is not contained in A

Example 4

Suppose a set contains the plays “Much Ado About Nothing”, “MacBeth”, and “A Midsummer’s Night Dream”. What is a larger set this might be a subset of?
There are many possible answers here. One would be the set of plays by Shakespeare. This is also a subset of the set of all plays ever written. It is also a subset of all British literature.

Try it Now 1

The set A = {1, 3, 5}. What is a larger set this might be a subset of?

Union, Intersection, and Complement

Commonly sets interact. For example, you and a new roommate decide to have a house party, and you both invite your circle of friends. At this party, two sets are being combined, though it might turn out that there are some friends that were in both sets.

Union, Intersection, and Complement

The union of two sets contains all the elements contained in either set (or both sets).

The union is notated A ⋃ B.

More formally, x ∊ A ⋃B if x ∊ A or x ∊ B (or both)

The intersection of two sets contains only the elements that are in both sets.

The intersection is notated A ⋂ B.

More formally, x ∊ A ⋂B if x ∊ A and x ∊ BThe complement of a set A contains everything that is notin the set A.

b) Find A ⋂ BThe intersection contains all the elements in both sets: A ⋂ B = {red}
c) Find Ac⋂ CHere we’re looking for all the elements that are not in set A and are also in C.

Ac⋂ C = {orange, yellow, purple}

Try it Now 2

Using the sets from the previous example, find A ⋃ C and Bc⋂ A

Notice that in the example above, it would be hard to just ask for Ac, since everything from the color fuchsia to puppies and peanut butter are included in the complement of the set. For this reason, complements are usually only used with intersections, or when we have a universal set in place.
Universal Set

A universal set is a set that contains all the elements we are interested in. This would have to be defined by the context.

Venn Diagrams

To visualize the interaction of sets, John Venn in 1880 thought to use overlapping circles, building on a similar idea used by Leonhard Euler in the 18th century. These illustrations now called Venn Diagrams.

Venn Diagram

A Venn diagram represents each set by a circle, usually drawn inside of a containing box representing the universal set. Overlapping areas indicate elements common to both sets.

Basic Venn diagrams can illustrate the interaction of two or three sets.
Example 9

The cardinality of A ⋂ B is 3, since A ⋂ B = {2, 4, 6}, which contains 3 elements.

Example 13

What is the cardinality of P = the set of English names for the months of the year?
The cardinality of this set is 12, since there are 12 months in the year.

Sometimes we may be interested in the cardinality of the union or intersection of sets, but not know the actual elements of each set. This is common in surveying.

Example 14

A survey asks 200 people “What beverage do you drink in the morning”, and offers choices:

Tea only

Coffee only

Both coffee and tea

Suppose 20 report tea only, 80 report coffee only, 40 report both. How many people drink tea in the morning? How many people drink neither tea or coffee?

This question can most easily be answered by creating a Venn diagram. We can see that we can find the people who drink tea by adding those who drink only tea to those who drink both: 60 people.

We can also see that those who drink neither are those not contained in the any of the three other groupings, so we can count those by subtracting from the cardinality of the universal set, 200.

200 – 20 – 80 – 40 = 60 people who drink neither.

Example 15

A survey asks: Which online services have you used in the last month:

Twitter

Facebook

Have used both

The results show 40% of those surveyed have used Twitter, 70% have used Facebook, and 20% have used both. How many people have used neither Twitter or Facebook?

Let T be the set of all people who have used Twitter, and F be the set of all people who have used Facebook. Notice that while the cardinality of F is 70% and the cardinality of T is 40%, the cardinality of F ⋃ T is not simply 70% + 40%, since that would count those who use both services twice. To find the cardinality of F ⋃ T, we can add the cardinality of F and the cardinality of T, then subtract those in intersection that we’ve counted twice. In symbols,

n(F ⋃ T) = n(F) + n(T) – n(F ⋂ T)

n(F ⋃ T) = 70% + 40% – 20% = 90%
Now, to find how many people have not used either service, we’re looking for the cardinality of (F ⋃ T)c. Since the universal set contains 100% of people and the cardinality of F ⋃ T = 90%, the cardinality of (F ⋃ T)c must be the other 10%.

The previous example illustrated two important properties

Cardinality properties

n(A ⋃ B) = n(A) + n(B) – n(A ⋂ B)

n(Ac) = n(U) – n(A)

Notice that the first property can also be written in an equivalent form by solving for the cardinality of the intersection:

n(A ⋂ B) = n(A) + n(B) – n(A ⋃ B)

Example 16

Fifty students were surveyed, and asked if they were taking a social science (SS), humanities (HM) or a natural science (NS) course the next quarter.

Since 9 students were taking SS and HM, there must be 9 – 3 = 6 students in region b.
Now, we know that 21 students were taking a SS course. This includes students from regions a, b, d, and e. Since we know the number of students in all but region a, we can determine that 21 – 6 – 4 – 3 = 8 students are in region a.
8 students are taking only a SS course.
Try it Now 4

One hundred fifty people were surveyed and asked if they believed in UFOs, ghosts, and Bigfoot.

1. There are several answers: The set of all odd numbers less than 10. The set of all odd numbers. The set of all integers. The set of all real numbers.

2. A ⋃ C = {red, orange, yellow, green, blue purple}

Bc⋂ A = {green, blue}
3. A ⋃ B ⋂ Cc4. Starting with the intersection of all three circles, we work our way out. Since 10 people believe in UFOs and Ghosts, and 2 believe in all three, that leaves 8 that believe in only UFOs and Ghosts. We work our way out, filling in all the regions. Once we have, we can add up all those regions, getting 91 people in the union of all three sets. This leaves 150 – 91 = 59 who believe in none.

Exercises

1. List out the elements of the set “The letters of the word Mississipi”
2. List out the elements of the set “Months of the year”
3. Write a verbal description of the set {3, 6, 9}
4. Write a verbal description of the set {a, i, e, o, u}
5. Is {1, 3, 5} a subset of the set of odd integers?
6. Is {A, B, C} a subset of the set of letters of the alphabet?
For problems 7-12, consider the sets below, and indicate if each statement is true or false.

24 only use a video store 16 use only a video store and Redbox
48 use only Netflix and Redbox 30 use only a video store and Netflix
10 use all three 25 use none of these
44. A survey asked buyers whether color, size, or brand influenced their choice of cell phone. The results are below. How many people were influenced by brand?

5 only said color 8 only said size

16 only said brand 20 said only color and size
42 said only color and brand 53 said only size and brand
102 said all three 20 said none of these
45. Use the given information to complete a Venn diagram, then determine: a) how many students have seen exactly one of these movies, and b) how many had seen only Star Wars.

18 had seen The Matrix (M) 24 had seen Star Wars (SW)

20 had seen Lord of the Rings (LotR) 10 had seen M and SW
14 had seen LotR and SW 12 had seen M and LotR6 had seen all three
46. A survey asked people what alternative transportation modes they use. Using the data to complete a Venn diagram, then determine: a) what percent of people only ride the bus, and b) how many people don’t use any alternate transportation.

30% use the bus 20% ride a bicycle

25% walk 5% use the bus and ride a bicycle
10% ride a bicycle and walk 12% use the bus and walk
2% use all three