Mathematics of Information Teaching Group Publications Home

Sets and set theory

In this section, we will briefly review the basics of set theory, given their use in the rest of the course.

Sets

A set is a well-determined, logically consistent collection of distinct objects, for example, the set of all teapots, or prime numbers less than 100.

Set theory is the mathematical language for describing sets and operations on them.

We usually use “{“ and “}” to enclose the elements of a set. Sets are usually unordered, so the set {dime, quarter} is the same as the set {quarter, dime}. If \(x\) is in \(A\), we say that it is a member of \(A\) and write \(x\in A\).

Some examples:

Mathematically describe the set \(\{4,7,10,13,16,\dotsc\}\).


Why study set theory? We study sets because they are foundational in mathematics. Also, information can be described as identifying a state among a set of possible states. Information is also closely related to probability, for which we again need sets. Finally, sets will be helpful in understanding analog and digital signals.

Defining sets

To define a set, we can list its elements explicitly, e.g., \(A=\{1,3,5,7,9\}\). We can also define a set as the collection of objects satisfying a precise property, e.g., the set of “positive odd integers”. For any object \(x\), we can determine whether or not it is a positive odd integer, so this property defines a set.

If the property is vague or logically inconsistent, it cannot be used to define a set:

Naive Set Theory

Our approach to set theory is called naive set theory. Naive set theory assumes that any precisely defined property can be used to define a set. This seemingly straightforward assumption leads to contradictions!

Russell’s paradox: For any set, we can determine if it satisfies the property of being a member of itself. For example, \(A=\{A,2,7\}\) satisfies it but \(B=\{2,7\}\) does not. So let us define a set based on it: "Let \(R\) be the set of all sets that are not members of themselves". Is \(R\) a member of \(R\)?

Another way to illustrate the same paradox: Suppose a barber shaves all and only those who do not shave themselves. Does the barber shave himself?

Sets: relationships and operations

U A
\(A^c\)

Set operations:

U A B
\(A\setminus B\)
\(A\cap B\)
\(B\setminus A\)
\(A\cup B\)


Let \(U=\mathbb N\), \(A\) be the set of even numbers, and \(B\) be the set of multiples of three. Write the following sets in a form similar to \[\{x\in \mathbb N: \exists k\in \mathbb N, x = k a + b \text{ or } \dotsm\},\] where \(a,b\in\mathbb N\).
  1. \(A^c\)
  2. \(A\setminus B\)
  3. \(B\setminus A\)
  4. \(A\cap B\)
  5. \((A\cup B)^c\)


Write down a question that you still have about sets and set theory.