 We determine that if a graph with n vertices is connected, it must have at least n-1 edges. However, the converse isn't true. A graph could have n vertices at n-1 edges, but not be connected. But can we say anything else about it? Had a useful idea in math. Maybe not so much in life. Concrete doesn't hurt. In other words, it helps to begin with an example. So let's try to draw three examples of a disconnected graph with, how about n equals 5 vertices and 5-1-4 edges. We might isolate one point and make four edges between the remaining four points. Or we could isolate two points, joined with an edge, and three edges, joining the other three points. We could isolate three points, but this is the same as isolating two points. So there are no other possibilities. Or are there? In any case, notice that the disconnected graphs have cycles. And this suggests the following. Suppose a graph has n vertices and n-1 edges, then it is either connected or it has a cycle. Let's see how we might prove this. Now to prove an if-a, then b or c, you may assume that one of them occurs. Because remember, b or c true requires at least one of them to be true. So suppose we have a graph with n vertices and n-1 edges. If it's connected, we're done. Well, we do have to consider all possibilities, so suppose it's not connected. Suppose g is not connected. Then it splits into two sub-graphs with p and q vertices where p plus q is n. And that's kind of interesting because both p and q have to be less than n. So if we could say something about these graphs, we'd be done. So we'll use proof by induction. Given our previous experience, let's actually use strong induction. So if a graph has n equals 1 vertices and 1 minus 1-0 edges, then... while we could begin this way, it feels wrong. So let's start with n equals 3. The theorem clearly holds for graphs with n equals 3 vertices and 3 minus 1-2 edges because there's only one such graph. Now we'll use strong induction. Suppose the theorem holds for graphs with n equals 3, 4, 5, and so on up to k vertices and k minus 1 edges. Consider a graph with k plus 1 vertices and k edges. If the graph is connected, we're done. If the graph is not connected, let its connected components have p1, p2, and so on vertices where all of our vertices are still there. So if we add these up, we get k plus 1. And since each of these subgraphs is connected, each has to have at least pi minus 1 edges. If any of the subgraphs contains a cycle, we're done. But in proof, it's important to remember if you can get to your destination in spite of detours, you can get to your destination. So suppose none of the subgraphs contain a cycle. Now earlier we showed that any connected graph with n vertices and at least n edges contains a cycle. Since a connected graph with n vertices and n edges must contain a cycle, each subgraph has at most pi minus 1 edges, one fewer edge than vertices. And so altogether they will use this many edges. But remember we still have all of our vertices, so all of the p's will sum to k plus 1 and we're subtracting 1 for every component, so we'll subtract m. However, m is the number of components. Since m is greater than or equal to 2, this will use at most k minus 1 of the k edges. So that last edge has to go somewhere, since the subgraphs are disconnected, at least one more edge must be in one of the subgraphs, which will cause it to have a cycle. No, no, that's a good thing. That's what we were trying to prove. While this completes the proof of our theorem, remember it's the journey, not the destination. Whenever you prove something, you should find the contrapositive. Every possible contrapositive. So in the theorem that we proved, notice that the antecedent is actually a conjunction. Suppose g is a graph, g has n vertices, and g has n minus 1 edges. So let's rewrite our theorem so that our antecedent is an explicit conjunction. Since our antecedent is a conjunction, we can split it and get the contrapositive of two theorems. First, we can make g has n vertices with main premise, or we could make g has n minus 1 edges our main premise. Since it's probably easier to count the vertices than the edges, we'll focus on the first and leave the other for homework. Now remember we formed the contrapositive by switching the antecedent and consequent and negating both. So we have this negation of a disjunction, either or, and remember the negation of a or b is not a and not b. And while logically speaking, we can say not g is connected, not g has a cycle, not g has n minus 1 edges. Let's rewrite those so they read better. So the negation of g is connected is that g is not connected. The negation not g has a cycle is g does not have a cycle, and the negation not g has n minus 1 edges, g does not have n minus 1 edges. And so this gives us a theorem. And the thing to remember is we obtained this additional theorem from the contrapositive, which is essentially a freebie. But notice the antecedent is a conjunction, so we can include part of it as our overall premise. And so we might get, however, the contrapositive reads better. So let's swap the antecedent and consequent and negate both. We could go bargain hunting and take the contrapositive again. And let's rewrite the knots. Swap out the antecedent and find the contrapositive. You know what to do. And let's swap out the antecedent one last time. And the significance of this is our consequent, the last thing that we say is that g is connected. And so this gives us a way of deciding whether a graph is connected.