A set is a collection of objects called elements. Typically, braces are used to denote sets as in \(\{b,c,d,f\}\text{,}\) which is the same set as \(\{b,d,c,f\}\text{,}\) and the same as \(\{c,f,c,f,d,b\}\text{.}\) If \(A\) is a set and \(x\) is an element of \(A\text{,}\) we write \({x\in A}\text{.}\) Otherwise, we write \({x\notin A}\text{.}\) For example, \(b\in \{b,d,c,f\}\) while \(e\notin \{b,d,c,f\}\text{.}\) The set containing no elements is called the empty set, and is denoted by the symbol \({\emptyset}\text{,}\) but can also be written as \({\{\}}\text{.}\) Any set that contains at least one element is referred to as a nonempty set. If we think of a set as a box potentially containing some stuff, then the empty set is a box with nothing in it.
The empty set and the set \(\{b,c,d,f\}\) are examples of finite sets. Any set that is not finite is an infinite set. For example, the natural numbers defined by \({\mathbb{N}\:= \{1,2,3,\ldots\}}\) and integers defined by \({\mathbb{Z}\:= \{0, \pm 1, \pm2, \pm 3, \ldots\}}\) are both examples of infinite sets. Some books will include zero in the set of natural numbers, but we do not. Since the set of natural numbers consists of the positive integers, the natural numbers are sometimes denoted by \({\mathbb{Z}^+}\text{.}\) The real numbers, denoted by \({\mathbb{R}}\text{,}\) is another example of an infinite set. If you look closely at our definitions for the natural numbers and integers you will notice that we wrote \({\:=}\) instead of \(=\text{.}\) We use \(\:=\) to mean that the symbol or expression on the left is defined to be equal to the expression on the right.
where \(P(x)\) is some predicate statement involving \(x\text{.}\) The first part β\(x \in A\)β denotes what type of \(x\) is being considered. The predicate to the right of the vertical bar determines the condition(s) that each \(x\) must satisfy in order to be a member of the set. This notation is read as βThe set of all \(x\) in \(A\) such that \(P(x)\text{.}\)β
The set \(\{x\in \mathbb{N}\mid x \mbox{ is even and } x\geq 8\}\) describes the collection of even natural numbers that are greater than or equal to 8.
The cardinality of a set \(A\text{,}\) denoted by \({|A|}\text{,}\) is the number of elements in \(A\text{.}\) For example, if \(A = \{b,c,d,f\}\text{,}\) then \(|A| = 4\text{.}\) We will mostly concern ourselves with the cardinality of finite sets in this book. Cardinality gets wildly more complicated if we consider infinite sets.
If \(A\) and \(B\) are sets, then we say that \(A\) is a subset of \(B\text{,}\) written \({A\subseteq B}\text{,}\) provided that every element of \(A\) is an element of \(B\text{.}\)
Let \(A\) be a set. Determine whether each of the following statements is true or false. If a statement is true, explain why. If a statement is false, provide a specific counterexample.
Note that two sets \(A\) and \(B\) are equal, denoted \({A=B}\text{,}\) if the sets contain the same elements. Itβs clear that \(A=B\) if and only if \(A \subseteq B\) and \(B \subseteq A\text{.}\) If \(A\subseteq B\text{,}\) then \(A\) is called a proper subset provided that \(A\neq B\text{.}\) In this case, we may write \({A\subset B}\) or \({A\subsetneq B}\text{.}\) Some authors use \(\subset\) to mean \(\subseteq\text{,}\) so some confusion could arise if you are not reading carefully.
Sometimes it is useful to fix a set to focus our attention on. The term universe of discourse (or domain of discourse) generally refers to the collection of objects being discussed in a specific context.
Suppose that the universe of discourse is \(U=\{1,2,3,4,5,6,7,8,9,10\}\text{.}\) Let \(A=\{1, 2, 3, 4, 5\}\text{,}\)\(B=\{1, 3, 5\}\text{,}\) and \(C=\{2, 4, 6, 8\}\text{.}\) Find each of the following and then determine the cardinality of the set.
A domino is a rectangular tile, usually with a line dividing its face into two square ends, and each end is marked with a number of dots (also called pips) or is blank. FigureΒ 1.1 shows a few examples of dominoes. The first and second domino in the figure are actually the same domino since orientation of the domino is irrelevant! When tackling the problems below, consider handling disjoint cases. If you visualize the various cases, you may end up with a nice staircase-looking arrangement.
How many dominoes are there in a set that includes double blank through double nine?
The image contains four examples of dominoes. From left to right, first domino has 4 pips and 2 pips, second domino has 2 pips and 4 pips, third domino has 5 pips and 5 pips, fourth domino has 3 pips and 0 pips.
How many students are enrolled in MAT 136 or MAT 226 (or both) if there are 409 in MAT 136 and 156 in MAT 226? Do you need to know that 40 students are in both courses?
Iβm in the mood for a cup of coffee! Letβs say that the nearest place to get a cup of coffee is four blocks East and three blocks North. Assuming I only walk East or North, how many different routes can I take to get there if:
In ProblemΒ 1.15, we could describe paths to the coffee shop using expressions like \(NNENEEE\text{,}\) where we interpret the expression from left to right as instruction for which direction to walk at each step. Such expressions have a name. A string of objects of length \(k\) is a linearly ordered arrangements of \(k\) objects. The objects in a string may be repeated unless specified otherwise. For example, \(NNENEEE\) is a string of length 7 consisting of \(N\)βs and \(E\)βs. If a string consists of letters, then it may be called a word (we do not require a word to be in the dictionary!). A bit string is a string consisting of 0βs and 1βs. Each occurrence of a 0 or 1 in a bit string is called a bit. The strings \(010\) and \(100\) are two different bit strings of length 3.
We can easily list these, but using the arrangement in TableΒ 1.2 illustrates a more powerful technique. The table makes it clear that there are 16 two-letter words using the letters \(b\text{,}\)\(c\text{,}\)\(d\text{,}\) and \(f\text{.}\) Another way to see this is to note that there are 4 choices for the first (left-hand) letter and for each of these there are 4 choices for the right-hand letter, so there are \(4 \cdot 4 = 16\) words total.
How many βnumbered wordsβ are there consisting of two letters from \(b\text{,}\)\(c\text{,}\)\(d\text{,}\) and \(f\) followed by one of the digits \(1\text{,}\)\(2\text{,}\)\(3\text{,}\)\(4\text{,}\) and \(5\text{?}\)
A geometric display as in TableΒ 1.2 would seem to require three dimensions, but we can take what we already know and just add a digit to the right. See TableΒ 1.3. There are 16 rows (each with a word from ExampleΒ 1.16) and five columns, so there are \(16\cdot 5 = 80\) two-letter words using \(b\text{,}\)\(c\text{,}\)\(d\text{,}\) and \(f\text{,}\) followed by a digit from 1, 2, 3, 4, and 5.
Table1.3.All possible βnumbered wordsβ consisting of two letters from \(b\text{,}\)\(c\text{,}\)\(d\text{,}\)\(f\) followed by one of the digits \(1\text{,}\)\(2\text{,}\)\(3\text{,}\)\(4\text{,}\) and \(5\text{.}\)
If \(A\) and \(B\) are sets, the Cartesian product of \(A\) and \(B\text{,}\) denoted \(A\times B\) (read as β\(A\) times \(B\)β or β\(A\) cross \(B\)β), is the set of all ordered pairs where the first component is from \(A\) and the second component is from \(B\text{.}\) In set-builder notation, we have
\begin{equation*}
{A\times B\:= \{(a,b)\mid a\in A, b\in B\}}\text{.}
\end{equation*}
The standard two-dimensional plane \(\mathbb{R}^2\) and standard three space \(\mathbb{R}^{3}\) are familiar examples of Cartesian products. In particular, we have
We have been dancing around a fundamental counting principle. Letβs state it officially. There are three progressively more general versions, the first of which we already encountered in ProblemΒ 1.23. The second version officially follows from the first version by induction, which is a topic we will encounter later. The third version follows from the second by making a careful use of notation to identify the set \(\mathcal{O}\) with a Cartesian product.
If \(\mathcal{O}\) is the set of outcomes for a \(k\)-step process, where for \(1\leq i\leq k\text{,}\) there are \(n_i\) choices for step \(i\text{,}\) no matter what earlier choices were made, then
The key difference between versions (b) and (c) of the Product Principle is that versionΒ (c) does not assume that the set of choices for step \(i\) is independent of the previous choices.
A fashion-challenged freshman has three pair of pants, five shirts (all t-shirts, but different patterns) and a pair of sandals. How many different ensembles are available for this freshman?
Suppose you flip a coin fives times in a row, recording the sequence of heads and tails that you see. How many different sequences of flips are possible?
How many subsets does a set with \(n\) elements have? Make sure you are taking the case \(n=0\) into account. You should be able to carefully justify your answer by cleverly utilizing the Product Principle.
A pass code consists of a string of two or three case-sensitive English letters followed by three digits (i.e., \(0,1,2,3,4,5,6,7,8,9\)). How many different possible pass codes are there?
Sum Principle: If there are multiple disjoint cases, we can add up the sizes of the various cases. If you can phrase a problem with βorβ, you should consider adding cases.
Product Principle: If all the elements/outcomes can be constructed using a step-by-step process, you should multiply the number of ways each step in process can occur. Be on the look out for the keywords βandβ or βthenβ.
The next result is simply a special case of TheoremΒ 1.11. Sometimes it might be easier to count the opposite of what you are looking to count and then to subtract from the size of the universe of discourse. This idea is sometimes referred to as the Subtraction Principle. Keep this in mind as a method of attack for future problems.
The next principle, called the Division Principle, provides a method for ignoring βunimportantβ differences when counting things. Loosely speaking, the general idea is count a larger set of distinct objects and then use the Division Principle to βmergeβ the ones that are not significantly different from each other. As a motivating example, suppose my kids have 30 toys scattered around the room. After asking my kids to pick up all the toys and put each toy in a bin according to what type of toy it is (e.g., Transformer), there ends up being 6 toys in each bin. In this case, it is easy to see that there must be 5 distinct bins.
If the finite set \(A\) is the union of \(n\) pairwise disjoint subsets each with \(d\) elements, then \(|A|=n\cdot d\text{.}\) Equivalently, \(n=|A|/d\text{.}\)
Itβs Halloween and five students arrive at my office begging for candy. I happen to have five pieces of candy. Depending on my mood, I may give away none of the candy, all of the candy, or any amount in between. Assuming I donβt give any student more than one piece of candy, how many different ways can I distribute the candy? Does it matter if the pieces of candy are identical or not? If so, count both situations.