Skip to main content

Section 1.2 Sets

Subsection 1.2.1 Understanding Sets

The most basic data structure is a set. Sets are defined by what is included or what is excluded. To understand what else this implies answer the following questions.

Checkpoint 1.2.1.

For each of the following determine whether order matters or not.

  1. Members of congress (U.S. federal)
  2. Finishers of the Tour de France
  3. Students enrolled at UAA
  4. People in line at a coffee kiosk
Checkpoint 1.2.2.

Given that sets indicate what is included and excluded what, if anything, is extraneous in the following sets?

  1. { green, gold, gold, green } (context: set of colors)
  2. \(\{ 1,2,3,4,5, \ldots \}\) (context: set of integers)
  3. \(\{ 0, 1, 1 \times 1, 1 \times 0 \}\) (context: set of integers)
  4. students enrolled in MATH A261 (context: set of students)
Checkpoint 1.2.3.

Determine whether or not you are in the following sets.

  1. UAA students
  2. Computer Science majors
  3. millionaires
  4. musicians

In mathematics concepts must be "well defined." This means there are no ambiguities. For sets this means that it must be possible to determine whether every object is in a set or not. Note this does not mean that any person necessarily knows the answer, rather that some means exists. For example every number is prime or it is not. However, no person knows or can list all the primes.

Subsection 1.2.2 Terminology

The terms collection, set, member, and element are undefined. Collection and set are synonyms. An element is an object that is included in a set. Element and member are synonyms. Because specific sets are defined by membership, sets do not have a concept of order of their elements.

The following are mathematical notations for defining sets.

Table 1.2.5. Set Notations
Set Element
\(T=\{true, false\}\) \(true \in T\)
\(E=\{n | n=2k, k \not\in \mathbb{Z} \}\) \(3 \not\in E\)

S is the set of students enrolled in MATH A261 in the fall 2019 semester

Guido is not in S
Definition 1.2.6. Subset.

A set \(A\) is a subset of a set \(B\text{,}\) denoted \(A \subset B,\) if and only if \(a \in A\) implies \(a \in B.\)

For example \(E \subset \mathbb{Z}.\) Note when needed \(X \subseteq Y\) means \(X\) is a subset but might be equal to \(Y\) whereas \(X \subset Y\) means \(X\) is a subset and \(Y\) contains at least one element not in \(X.\) However, we rarely need to make this distinction in this class, so we will use \(\subset\) to mean \(\subseteq.\)

Often we need to talk about a set that has no elements. This is called the empty set and is written as \(\emptyset\text{.}\)

Subsection 1.2.3 Practice

Checkpoint 1.2.7.

Determine if the first set is a subset of the second set.

  1. even numbers, all integers
  2. vowels, letters
  3. colors, pastels
  4. chairs, people
Checkpoint 1.2.8.

Determine if the object is an element of the given set.

  1. apple, fruit
  2. spider, insects
  3. bird shot (shotguns), things that float
  4. bumble bees (living, healthy), things that can fly