Skip to main content
Mathematics LibreTexts

6.1: Sets and Counting

  • Page ID
    165942
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Learning Objectives

    In this section, you will learn to:

    1. Use set notation to represent unions, intersections, and complements of sets
    2. Use Venn diagrams to solve counting problems.

    Introduction to Sets

    In this section, we will familiarize ourselves with set operations and notations, so that we can apply these concepts to both counting and probability problems. We begin by defining some terms.

    Definition: Set and Elements

    A set is a collection of objects, and its members are called the elements of the set.

    We name the set by using capital letters, and enclose its members in braces. Suppose we need to list the members of the chess club. We use the following set notation.

    C = { Ken, Bob, Tran, Shanti, Eric }

    Definition: Empty Set

    A set that has no members is called an empty set. The empty set is denoted by the symbol \(\varnothing\).

    Definition: Set Equality

    Two sets are equal if they have the same elements.

    Definition: Subset

    Set \(A\) is a subset of a set \(B\) if every member of \(A\) is also a member of \(B\).

    Suppose C = { Al, Bob, Chris, David, Ed } and A = { Bob, David }. Then A is a subset of C, written as A \(\subseteq\) C.

    Every set is a subset of itself, and the empty set is a subset of every set.

    Definition: Union of Two Sets

    Let \(A\) and \(B\) be two sets, then the union of \(A\) and \(B\), written as \(A \cup B\), is the set of all elements that are either in \(A\) or in \(B\), or in both \(A\) and \(B\).

    Definition: Intersection of Two Sets

    Let \(A\) and \(B\0 be two sets, then the intersection of \(A\) and \(B\), written as \(A \cap B\), is the set of all elements that are common to both sets \(A\) and \(B\).

    Definition: Universal Set

    A universal set \(U\) is the set consisting of all elements under consideration.

    Definition: Complement of a Set and Disjoint Sets

    Let \(A\) be any set, then the complement of set \(A\), written as \(\bar{\mathrm{A}}\), is the set consisting of elements in the universal set \(U\) that are not in \(A\).

    Two sets A and B are called disjoint sets if their intersection is an empty set. Clearly, a set and its complement are disjoint; however two sets can be disjoint and not be complements.

    Example \(\PageIndex{1}\)

    List all the subsets of the set of primary colors { red, yellow, blue }.

    Solution

    The subsets are \(\varnothing\), {red}, {yellow}, {blue}, {red, yellow}, {red, blue}, {yellow, blue}, {red, yellow, blue}

    Note that the empty set is a subset of every set, and a set is a subset of itself.

    Example \(\PageIndex{2}\)

    Let F = { Aikman, Jackson, Rice, Sanders, Young }, and let B = { Griffey, Jackson, Sanders, Thomas }.
    Find the intersection of the sets F and B.

    Solution

    The intersection of the two sets is the set whose elements belong to both sets. Therefore, F \(\cap\) B = { Jackson, Sanders }

    Example \(\PageIndex{3}\)

    Find the union of the sets F and B given as follows.

    • F = { Aikman, Jackson, Rice, Sanders, Young }
    • B = { Griffey, Jackson, Sanders, Thomas }

    Solution

    The union of two sets is the set whose elements are either in A or in B or in both A and B. Observe that when writing the union of two sets, the repetitions are avoided.

    F \(\cup\) B = { Aikman, Griffey, Jackson, Rice, Sanders, Thomas, Young }

    Example \(\PageIndex{4}\)

    Let the universal set U = { red, orange, yellow, green, blue, indigo, violet }, and P = { red, yellow, blue }. Find the complement of P.

    Solution

    The complement of a set P is the set consisting of elements in the universal set U that are not in P. Therefore,

    \(\bar{P}\) = { orange, green, indigo, violet }

    To achieve a better understanding, let us suppose that the universal set U represents the colors of the spectrum, and P the primary colors, then \(\bar{P}\) represents those colors of the spectrum that are not primary colors.

    Example \(\PageIndex{5}\)

    Let the universal set U = { red, orange, yellow, green, blue, indigo, violet }, and P = { red, yellow, blue } . Find a set R so that R is not the complement of P but R and P are disjoint.

    Solution

    R = { orange, green } and P = { red, yellow, blue } are disjoint because the intersection of the two sets is the empty set. The sets have no elements in common. However they are not complements because their union P \(\cup\) R = { red, yellow, blue, orange, green } is not equal to the universal set U.

    Example \(\PageIndex{6}\)

    Let U = { red, orange, yellow, green, blue, indigo, violet }, P = { red, yellow, blue }, Q = { red, green }, and R = { orange, green, indigo }. Find \(\overline{P \cup Q} \cap \overline{R}\).

    Solution

    We do the problems in steps:

    P \(\cup\) Q = { red, yellow, blue, green }
    \(\overline{P \cup Q}\) = { orange, indigo, violet }
    \(\overline{R}\) = { red, yellow, blue, violet }
    \(\overline{P \cup Q} \cap \overline{R}\) = {violet}

    Venn Diagrams

    We now use Venn diagrams to illustrate the relations between sets. In the late 1800s, an English logician named John Venn developed a method to represent relationship between sets. He represented these relationships using diagrams, which are now known as Venn diagrams.

    A Venn diagram represents a set as the interior of a circle. Often two or more circles are enclosed in a rectangle where the rectangle represents the universal set. To visualize an intersection or union of a set is easy. In this section, we will mainly use Venn diagrams to sort various populations and count objects.

    Example \(\PageIndex{7}\)

    Suppose a survey of car enthusiasts showed that over a certain time period, 30 drove cars with automatic transmissions, 20 drove cars with standard transmissions, and 12 drove cars of both types. If everyone in the survey drove cars with one of these transmissions, how many people participated in the survey?

    Solution

    We will use Venn diagrams to solve this problem.

    Let the set A represent those car enthusiasts who drove cars with automatic transmissions, and set S represent the car enthusiasts who drove the cars with standard transmissions. Now we use Venn diagrams to sort out the information given in this problem.

    Since 12 people drove both cars, we place the number 12 in the region common to both sets.

    Example7.1.7.png

    Because 30 people drove cars with automatic transmissions, the circle A must contain 30 elements. This means that

    x + 12 = 30, or x = 18.

    Similarly, since 20 people drove cars with standard transmissions, the circle B must contain 20 elements.

    Thus, y + 12 = 20 which in turn makes y = 8.

    Now that all the information is sorted out, it is easy to read from the diagram that 18 people drove cars with automatic transmissions only, 12 people drove both types of cars, and 8 drove cars with standard transmissions only.

    Therefore, 18 + 12 + 8 = 38 people took part in the survey.

    Example \(\PageIndex{8}\)

    A survey of 100 people in California indicates that 60 people have visited Disneyland, 15 have visited Knott's Berry Farm, and 6 have visited both. How many people have visited neither place?

    Solution

    The problem is similar to the one in the previous example.

    Let the set D represent the people who have visited Disneyland, and K the set of people who have visited Knott's Berry Farm.

    Example7.1.8.png

    We fill the three regions associated with the sets D and K in the same manner as before. Since 100 people participated in the survey, the rectangle representing the universal set U must contain 100 objects. Let x represent those people in the universal set that are neither in the set D nor in K. This means 54 + 6 + 9 + x = 100, or x = 31.

    Therefore, there are 31 people in the survey who have visited neither place.

    Example \(\PageIndex{9}\)

    A survey of 100 exercise conscious people resulted in the following information:

    • 50 jog, 30 swim, and 35 cycle
    • 14 jog and swim
    • 7 swim and cycle
    • 9 jog and cycle
    • 3 people take part in all three activities
    1. How many jog but do not swim or cycle?
    2. How many take part in only one of the activities?
    3. How many do not take part in any of these activities?

    Solution

    Let J represent the set of people who jog, S the set of people who swim, and C who cycle.

    In using Venn diagrams, our ultimate aim is to assign a number to each region. We always begin by first assigning the number to the innermost region and then working our way out.

    We’ll show the solution step by step. As you practice working out such problems, you will find that with practice you will not need to draw multiple copies of the diagram.

    Example7.1.9.png

    We place a 3 in the innermost region of figure I because it represents the number of people who participate in all three activities. Next we use figure II to compute x, y and z.

    Since 14 people jog and swim, x + 3 = 14, or x = 11.

    The fact that 9 people jog and cycle results in y + 3 = 9, or y = 6.

    Since 7 people swim and cycle, z + 3 = 7, or z = 4.

    This information is depicted in figure III.

    Example7.1.9b.png

    Now we proceed to find the unknowns m, n and p, as shown in figure IV

    Since 50 people jog, m + 11 + 6 + 3 = 50, or m = 30.

    30 people swim, therefore, n + 11 + 4 + 3 = 30, or n = 12.

    35 people cycle, therefore, p + 6 + 4 + 3 = 35, or p = 22.

    By adding all the entries in all three sets, we get a sum of 88.
    Since 100 people were surveyed, the number inside the universal set but outside of all three sets is 100 - 88, or 12.

    In figure V, all the information is sorted out, and the questions can readily be answered.

    1. The number of people who jog but do not swim or cycle is 30.
    2. The number who take part in only one of these activities is 30 + 12 + 22 = 64.
    3. The number of people who do not take part in any of these activities is 12.

    This page titled 6.1: Sets and Counting is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Rupinder Sekhon and Roberta Bloom via source content that was edited to the style and standards of the LibreTexts platform.