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 can inform how to build the scaffolding of a proof. This can only get us so far though: To flesh out the proof skeleton requires an 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 between the proofs for some statements. This might 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 some “standard” proof techniques can 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.
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 all elements in the set satisfy. For example,
,
or
.
The second set here is the set of natural numbers () less than 10. Notice that every element in is also an element of . Here is a definition that captures that idea.
We say is a proper subset of , written , provided and . In other words, if every element in is an element in , and there is at least one element in that is not in .
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: and (since and ). So . But , so in fact .
The sets in the example above were small, and it is 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 was also an element of . Another way to say this: For all numbers ,if is an element of ,then is also an element of . 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:
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!
Now let’s prove a 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.
The proof of Proposition 1.5.3 is what is sometimes called an element chasing proof. By the definition of subset, means every element of is an element of , or equivalently, for all , if is an element of , then is an element of . One way to prove this is to “chase” the element from to .
We will write a direct proof. So we will assume that and prove that . Our desired conclusion is a statement about subsets, so let’s do an element chasing proof for it.
Consider the cases. If is an element of , then since , we know that is an element of . On the other hand, if is not an element of , then must be an element of (since is in ). In either case, is an element of . Therefore, .
A function is a rule that assigns each element of the set (the domain) to exactly one element of the set (the codomain). It is any rule: There doesn’t have to be a formula or rationale for it; we just need to match up elements from to elements in . For example, we could let be the set of students enrolled in a particular Discrete Math course and let be the set of months of the year. Now define the function 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.
A function is injective (or one-to-one) provided every element in is the image of at most one element in . In other words, no element in is the output for more than one input from .
In the example below, we use two-line notation to describe a function. The top row contains the inputs, and the bottom row lists the corresponding outputs. So might be defined as,
The function is injective: Each element of is the image of at most one element of . The function is not injective: The element 4 in is the image of both 1 and 3 in .
Consider the student-to-birth-month function again. Could this possibly be 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 denotes the cardinality (size) of the set : the number of elements in .
We will give a proof of the contrapositive: If is injective, then . Let . Since is injective, each element of must be the output for at most one element of . Thus there are at most elements in that get mapped to by . 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 elements in .
Does this proof remind you of our pigeonhole-like proofs? It should, since this is precisely (one of) the careful formulations of the pigeonhole principle. We could 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 directly prove another result, we call the latter result a corollary.
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.7. Therefore, at least two students share the same birth month.
Functions always have inputs from a set (called the domain) and outputs in a set as well (called the codomain). This naturally leads to facts to consider about the interaction between sets and functions.
Let ,, and be as in the proposition. Assume that . Now consider an element . By definition, this means that there is some such that . Since and , we have that . Then by definition,
.
Since was an arbitrary element of , we have proved that .
Notice that the proof above is an element chasing proof again. This makes sense as soon as you remember that and are just the names of sets. To prove one set is a subset of another, we chase elements from the subset to the superset.
A relation on a set is a set of ordered pairs of elements from . We can think of a relation as a way to describe a type of relationship between elements of . 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 .
Relations permeate all of mathematics, often without us even thinking of them. Whenever we make a statement about two elements of a set, we 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 is in the relation . In fact, using the language we developed in the subsection Quantifiers and Predicates, we can say that a relation is just a predicate, where the variables come from the same set.
Often relations have special symbols like “” or “” or “”. When we talk about a general relation, we will either use and write , or use a capital letter like , and write or or even (these all mean the same thing).
Consider the relation 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?
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 AliceBruce and BruceCarlos, but it might not be the case that AliceCarlos (since Alice need not be in Organic Chemistry with Carlos).
Proving that a relation is not transitive takes nothing more than finding a counterexample, which means finding three elements ,, and such that ,, but (remember, the only way for an implication to be false is for the hypothesis to be true and the conclusion to be false).
Consider the set of all students in your Discrete Mathematics class, and define the relation that holds of students and (so is true), provided is taller than . Prove that this relation is transitive.
Let ,, and be arbitrary students in your Discrete Math course. Assume, and . That means that is taller than , and that is taller than . But then surely must be even taller than than they are taller than , so we have that is true as well. Thus is transitive on this set.
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 of vertices and a set 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 edge is a 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.)
We have ,,, and . You can see this by counting how many edges are incident to each vertex, or by counting how many edges (subsets) each vertex belongs to.
So is it possible for 15 people to each shake hands with exactly three people in their group? 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 . 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 . 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.8, which we will prove in Section 2.1. Here we give a complete proof of this particular formulation of it.
We will prove this by contradiction. Suppose there was a graph with an odd number of vertices with odd degree. Consider the sum of the degrees of all the vertices. The sum for the odd-degree vertices would be odd (since the sum of an odd number of odd numbers is odd). The sum of 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.8, 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.
Let be a function and let be a subset of the codomain. Define the inverse image of under to be the set . That is, it is all the elements in the domain that are mapped to elements in .
Given a function and a set , we define the inverse image of under as the set . That is, it is all the elements in the domain that are mapped to elements in .
The relation “” (is similar to) on the set of triangles in the plane (two triangles are similar if they have the same angles, but are not necessarily the same size).