Skip to main content
Logo image

Section 1.5 Proofs about Discrete Structures

Note, this section is under construction. Check back later for more content.

Subsection Introduction

Investigate!
Suppose there are 15 people at a party. Most people know each other already, but there are still some people who decide to shake hands. Is it possible for everyone at the party to shake hands with exactly three other people?
So far we have seen how the logical form of a statement we wish to prove can inform how the build the scaffolding of a proof. The proof structure can only get us so far though: to flesh out the proof skeleton requires understanding of the mathematical objects and structures the proofs are about. Some of this can come from carefully reading definitions. Yet there is also some less concrete understanding and intuition that comes from working with the objects and structures that can lead to that “ah-ha!” moment of inspiration that suggests how to proceed with a proof.
Another reason to shift our focus toward proofs about discrete structures is that doing so illustrates an important feature of mathematics: abstraction. We have been proving particular facts about particular problems. We might even start to notice similarities about the proofs of some solutions. This very well could be due to the underlying mathematical structures that the problems are (secretly) about. If we prove the general facts about these structures, then we can apply these “theorems” to many different problems.
Some discrete structures lend themselves to particular styles of proof and there are some “standard” proof techniques that apply to particular structures. We will see some of this here, but mostly we take this opportunity to remind ourselves of some of the basic definitions and properties for discrete structures, and use the proofs about them to help understand these better.

Subsection Proofs about sets

Recall that a set is an unordered collection of elements. We can describe a set by listing these elements, or by specifying a property that elements in the set all satisfy. For example,
\begin{equation*} A = \{1,2,3,4,5\}\text{,} \end{equation*}
or
\begin{equation*} B = \{x \in \N \st x \lt 10 \}\text{.} \end{equation*}
The second set here is the set of natural numbers (\(0, 1, 2, \ldots\)) less than 10. Notice that every element in \(A\) is also an element of \(B\text{.}\) Here is a definition that captures that idea.

Definition 1.5.1.

A set \(A\) is a subset of a set \(B\text{,}\) written \(A \subseteq B\text{,}\) provided every element of \(A\) is also an element of \(B\text{.}\)
We say \(A\) is a proper subset of \(B\text{,}\) written \(A \subset B\text{,}\) provided \(A \subseteq B\) and \(A \neq B\text{.}\) In other words, if every element of \(A\) is an element in \(B\text{,}\) and there is at least one element in \(B\) that is not in \(A\text{.}\)

Example 1.5.2.

Let \(A = \{x \in \N \st x \lt 5\}\) and \(B = \{ x \in \N \st x^2 \lt 10\}\text{.}\) Is \(B \subseteq A\text{?}\) Is \(B\) a proper subset of \(A\text{?}\)
Solution.
We are asking whether every natural number less than 5 is also a natural number whose square is less than 10. Okay, we could just write out the elements of the sets: \(A = \{0,1,2,3,4\}\) and \(B = \{0,1,2,3\}\) (since \(3^2 = 9\) and \(4^2 = 16\)). So \(B \subseteq A\text{.}\) But \(B \neq A\text{,}\) so in fact \(B \subset A\text{.}\)
The sets in the example above were small and easy enough to write down the elements of the sets. However, we can also prove subset relationships between sets if this isn’t practical or even possible (perhaps the sets are infinite). Let’s look carefully at how we could have reasoned about the example above.
We claimed that every element of \(B\) was also an element of \(A\text{.}\) Another way to say this: for all numbers \(n\text{,}\) if \(n\) is an element of \(B\text{,}\) then \(n\) is also an element of \(A\text{.}\) Recognizing this as a conditional statement, we can proceed to give a direct, contrapositive, or contradiction proof of the fact. Here a direct proof would be perfectly acceptable. Let’s try it:

Proof.

Let \(n\) be an element of the set \(B\text{.}\) Then \(n^2 \lt 10\text{,}\) by the definition of \(B\text{.}\) Since \(4^2 = 16\text{,}\) we must have that \(n \lt 4\text{.}\) By the definition of \(A\text{,}\) and the fact that \(4 \lt 5\text{,}\) we see that \(n \in A\text{.}\)
To be clear, this proof is way more than we would normally do for this example, but its format should be illuminating. Proving that one set is a subset of another is really the same as proving an implication!
To give an example of how we can apply the definition of subset in a more general setting, let’s prove a basic fact about subsets.

Proof.

We will give a direct proof. Let \(A\text{,}\) \(B\text{,}\) and \(C\) be sets, and assume that \(A \subseteq B\) and \(B \subseteq C\text{.}\) We will prove that \(A \subseteq C\text{.}\)
Let \(x\) be an element of \(A\text{.}\) Since \(A \subseteq B\text{,}\) we know that \(x \in B\text{.}\) Since \(B \subseteq C\text{,}\) we know that \(x \in C\text{.}\) Therefore, \(A \subseteq C\text{.}\)
Let’s now prove this fact about numbers: every multiple of 9100 is also a multiple of 13. We could factor 9100, but here is an easier way. The set of multiples of 9100 is a subset of the set of multiples of 91. And the set of multiples of 91 is a subset of the set of multiples of 13. Now apply the proposition above.

Subsection Proofs about functions

A function \(f:A \to B\) is a rule that assigns each element of the set \(A\) (the domain) to exactly one element of the set \(B\) (the codomain). It is any rule: there doesn’t have to be a formula or rational for it, we just need to match up elements from \(A\) to elements in \(B\text{.}\) For example, we could let \(A\) be the set of students enrolled in a particular Discrete Math course and let \(B\) be the set of months of the year. Now define the function \(f:A \to B\) to be the rule that assigns to each student the month in which their birthday falls. Since every student has an assigned month, and no more than one month, this is a function.
Here is a definition of a particular type of function.

Definition 1.5.4.

A function \(f:A \to B\) is injective (or one-to-one) provided every element in \(B\) is the image of at most one element in \(A\text{.}\) In other words, no element in \(B\) is the output for more than one input from \(A\text{.}\)
In the example below, we use two-line notation to describe a function. The top row are the inputs, and the bottom row are the corresponding outputs. So \(f:\{1,2,3,4\} \to \{a,b,c,d\}\) might be defined as,
\begin{equation*} f = \twoline{1 \amp 2 \amp 3 \amp 4}{a \amp b \amp c \amp d}\text{,} \end{equation*}
which means that \(f(1) = a\text{,}\) \(f(2) = b\text{,}\) \(f(3) = c\text{,}\) and \(f(4) = d\text{.}\)

Example 1.5.5.

Let \(A = \{1,2,3\}\) and \(B = \{2, 4, 6, 8\}\text{.}\) Consider the functions \(f:A \to B\) and \(g:A \to B\) defined by,
\begin{equation*} f = \twoline{1 \amp 2 \amp 3}{2 \amp 8 \amp 6}, \qquad g = \twoline{1 \amp 2 \amp 3}{4 \amp 6 \amp 4}. \end{equation*}
Which of these functions is injective?
Solution.
The function \(f\) is injective: each element of \(B\) is the image of at most one element of \(A\text{.}\) The function \(g\) is not injective: the element 4 in \(B\) is the image of both 1 and 3 in \(A\text{.}\)
Consider the student to birth month function again. Could this possibly injective? Or put another way, must there be two students in the course with the same birth month (which would say the function is not injective)? The answer seems to depend on how many students are in the class.
But let’s pause and think about the more general fact about functions we have here. Let’s prove the following fact. Recall that \(|A|\) denotes the cardinality (size) of the set \(A\text{:}\) the number of elements in \(A\text{.}\)

Proof.

We will give a proof of the contrapositive: if \(f\) is injective, then \(|A| \le |B|\text{.}\) Let \(|B| = n\text{.}\) Since \(f\) is injective, each element of \(B\) must be the output for at most one element of \(A\text{.}\) Thus there at most \(n\) elements in \(A\) that get mapped to \(B\) by \(f\text{.}\) But the definition of a function requires that every element of the domain is mapped to exactly one element of the codomain, so there must be at most \(n\) elements in \(A\text{.}\)
Does this proof remind you of our pigeonhole-like proofs? It should, since this is precisely (one of) the carful formulations of the pigeonhole principle. We could definitely have proved the fact about students sharing a birth month, but now we can just apply the proposition above and be done. When you apply a theorem or proposition to get directly prove another result, we call the latter result a corollary.

Proof.

Consider the function that maps each student to their birth month. Since the domain has 25 elements and the codomain has 12 elements, the function is not injective, by Proposition 1.5.6. Therefore, at least two students share the same birth month.

Subsection Proofs about relations

A relation on a set \(A\) is a set of ordered pairs of elements from \(A\text{.}\) We can think of a relation as a way to describe a type of relationship between elements of \(A\text{.}\) For example, we might have a relation on the set of people at a party that describes who is friends with whom. We might have a relation on the set of natural numbers that describes which pairs of numbers are related by the relation \(x \lt y\text{.}\)
Relations permeate all of mathematics, often without us even thinking of them. Whenever you make a statement about two elements of set, you are implicitly defining a relation. The statement is true when the pair is in the relation. For example, the statement “3 is less than 5” is true because the pair \((3,5)\) is in the relation \(\lt\text{.}\) In fact, using the language we developed in Section 1.3, we can now say that a relation is just a predicate, where the variables come from the same set.
Often relations have special symbols like “\(=\)” or “\(\le\)” or “\(\perp\)”. When we talk about a general relation, we will either use \(\sim\) and write \(x \sim y\text{,}\) or use a capital letter like \(R\text{,}\) and write \(R(x,y)\) or \(xRy\) or even \((x,y) \in R\) (these all mean the same thing).
When we study relations, we try to identify properties that relations might have. Here is an example of a very common property.

Definition 1.5.8.

A relation \(R\) on a set \(A\) is transitive provided for all \(x,y,z \in A\text{,}\) if \(xRy\) and \(yRz\text{,}\) then \(xRz\text{.}\)

Example 1.5.9.

Consider the relation \(\sim\) on the set of students in your Discrete Math course that holds of two students provided they have some other class together. Is this relation transitive?
Solution.
No, not necessarily (although for some sets of students it could be). For example, suppose Alice has another class with Bruce, say Introduction to Programming. Carlos is not in Intro to Programming, but he and Bruce are both in Organic Chemistry. So then Alice\(\sim\)Bruce and Bruce\(\sim\)Carlos, but it might not be the case that Alice\(\sim\)Carlos (since Alice need not be in Organic Chemistry with Carlos).

Subsection Proofs about graphs

We will spend all of Chapter 2 studying proofs about graphs, since this is such a rich area of mathematics. As a preview, here is an example of how graph proofs can go.
A graph is a set \(V\) of vertices and a set \(E\) of edges. The edges are two-element subsets of the vertices, and we can think of them as representing relationships between the vertices. Note this is an abstract definition of a graph using sets, but we often draw graphs using dots for the vertices connected by lines for the edges, as this gives us a nice picture of what is going on.
Since graphs represent a type of relationship between elements (vertices), we can use graphs to represent many real world problems. For example, the vertices of a graph might represent people at a party. Each edge can represent a handshake between two people. So if we wondered whether it is possible for the 15 people at a party to each shake hands with exactly 3 people there, we are really asking whether there is a graph with 15 vertices where each vertex belongs to 3 edges. (“Belongs to”?? Yes, because an edges is two-element subset of the vertices, so if an edge “touches” or “comes out of” a vertex, that means the vertex belongs to that particular two-element subset.)
Here is a definition related to this idea.

Definition 1.5.10.

Let \(v\) be a vertex in a graph \(G\text{.}\) The degree of \(v\text{,}\) written \(d(v)\text{,}\) is the number of edges that contain \(v\text{,}\) i.e., the number of edges incident to \(v\text{.}\)

Example 1.5.11.

Consider the graph \(G\) with vertices \(V = \{1,2,3,4\}\) and edges \(E = \{\{1,2\}, \{1,3\}, \{1,4\}, \{2,3\}\}\text{.}\) What is the degree of each vertex in \(G\text{?}\)
Solution.
It might be helpful to picture the graph:
A graph with four vertices labeled 1 through 4. There are edges from vertex 1 to each of the other vertices, and an edge between vertices 2 and 3.
We have \(d(1) = 3\text{,}\) \(d(2) = 2\text{,}\) \(d(3) = 2\text{,}\) and \(d(4) = 1\text{.}\) You can see this by counting how many edges are incident to each vertex, or by counting how many edge-subsets each vertex belongs to.
So is it possible for among 15 people for everyone to shake hands with exactly three people? Well, is there a graph with 15 vertices, all of degree 3? The answer is no!
One way you can see this is if you ask how many edges such a graph would have. Each vertex is incident to three edges, so counting incidences, we get \(15\cdot 3 = 45\text{.}\) But every edge is incident to two vertices, so we have counted each edge twice. So the number of edges in such a graph would be \(45/2 = 22.5\text{.}\) But the number of edges in a graph must be a whole number, so there is no such graph.
This suggests that we can say something more in general. The following proposition is a simple consequence of the Handshake Lemma 2.1.5, which we will prove in Section 2.1. Here we give a complete proof of this particular formulation of it.

Proof.

We will prove this by contradiction. Suppose there was a graph with and odd number of vertices with odd degree. If we take the sum of all the degrees of all the vertices, then the sum of the degrees of odd degree vertices would be odd (since the sum of an odd number of odd numbers is odd). The sum of all the even-degree vertices will be even (any sum of even numbers must be even). The sum of an odd number and an even number is odd. Thus the sum of all the degrees will be odd.
However, the number of edges in a graph is half the sum of the degrees (by Lemma 2.1.5, or simply because each edge contributes one to the count of the degree of two vertices). Since the number of edges is a whole number, we see that the sum of the degrees must be even. This contradicts what we found in the previous paragraph.
Therefore, in any graph, the number of vertices with odd degree must be even.
You have attempted of activities on this page.