Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

16.3: Identifying Trees

( \newcommand{\kernel}{\mathrm{null}\,}\)

Theorem 16.3.1: Characterizations of trees.

The following are equivalent for a graph G=(V,E) with |V|=n vertices.

  1. Graph G is a tree.
  2. Graph G is acyclic but the addition of any new edge would create a cycle.
  3. Graph G contains no loops and contains exactly one path between each pair of distinct vertices.
  4. Graph G is connected but every edge of G is a bridge.
  5. Graph G is connected and has exactly |E|=n1 edges.
  6. Graph G is acyclic and has exactly |E|=n1 edges.
Proof of the equivalence of Statements 1–4.

Statement 1 implies Statement 2.

Suppose G is a tree. By definition, it is acyclic. Furthermore, suppose we add an edge between vertices v,v. Since trees are connected, there was already a path from v to v in G. Traversing the new edge from v back to v closes that path to a cycle.

Statement 2 implies Statement 3.

Considering the contrapositive, we will assume that Statement 3 is false, and prove that this implies that Statement 2 must also be false.

For Statement 3 to be false, one of the following must be true.

  1. Loops exist in G.
  2. Some pair of distinct vertices in G is not connected.
  3. Some pair of distinct vertices in G is connected by more than one path.

In the first case, G would not be acyclic, as a loop is the most basic form of cycle. In the second case, adding an edge between these two vertices that were previously unconnected by a path would not create a cycle, as the rest of that cycle other than the new edge would have been a path between the two vertices. And in the third case, if a pair of vertices is connected by more than one path then the parts of two such paths that are different could be concatenated (one forward, one reversed) to create a cycle, so that G must be not be acyclic.

Thus, in all cases that make Statement 3 false, Statement 2 is also false.

Statement 3 implies Statement 4.

Again, we will consider the contrapositive, assuming that Statement 4 is false and proving that Statement 3 is also false.

For Statement 4 to be false, one of the following is true.

  1. Graph G is not connected.
  2. Some edge in G is not a bridge.

In the first case, G must contain at least one pair of vertices that is not connected by any path. For the second case, suppose edge e in G is a loop. If e is a loop, then G contains loops. If e is not a loop, then it is an edge between a pair of distinct vertices, say v and v. But then removing e from G would leave a subgraph G that still contains both v and v, and which is still connected. So this subgraph (and hence G) must contain a path between v and v that does not involve e. On the other hand, v,e,v is also a path between v and v. So v,v is a pair of distinct vertices in G for which there is more than one path between them.

Thus, in all cases that make Statement 4 false, Statement 3 is also false.

Statement 4 implies Statement 1.

Again, we consider the contrapositive of this logical implication, assuming that Statement 1 is false and proving that Statement 4 is also false. However, since both statements contain the substatement that G is connected, we will not negate that part.

So assume that G is connected but contains a proper cycle. We aim to prove that at least one edge in G is not a bridge. In Activity 16.7.4, you are asked to prove that none of the edges in the proper cycle that G contains is a bridge, which will complete the proof.

Proof of the equivalence of Statement 1, Statement 5, and Statement 6.

Statement 1 implies Statement 5.
Assume that G is a tree. Then it is connected. To prove that the number of edges is |E|=n1, we proceed by (strong) induction on n, the number of vertices in G.

For the base base case of n=1, |E|=0 is the only possibility, as loops are not allowed in a tree.

Now the induction step. Assume that every tree with k<n vertices has k1 edges. Choose some edge in G. By Statement 4, removing that edge creates two connected components, G1 and G2. As G is acyclic, these connected components are both trees (Statement 2 of Proposition 16.2.1). Let k1,k2 represent the number of vertices in G1,G2, respectively, so that k1+k2=n. Since each of k1 and k2 must be strictly less than n, we may apply our indution hypothesis to each of G1 and G2, so that G1 has exactly k11 edges and G2 has exactly k21 edges.

clipboard_e05728095e32391048c87b3dc270a9768.png
Figure 16.3.1: Tree G splits into subtrees G1,G2 after removal of an edge.

Adding up the number of edges in G1 and G2, along with the single edge in G that was removed to create these two connected components, we obtain |E|=(k11)+(k21)+1=(k1+k2)1=n1, as desired.

Statement 5 implies Statement 6.
Consider the contrapositive of this logical implication, assuming that Statement 6 is false and proving that Statement 5 is also false. However, since both statements contain the substatement that |E|=n1, we will not negate that part.

So assume that G has n1 edges, but contains a proper cycle. We must prove that G cannot be connected in this case. Choose an edge e in the proper cycle and create a subgraph G by removing e. Subgraph G now has n vertices but n2 edges, and so by the contrapositive of Theorem 15.3.1 G cannot be connected. That means that G contains a pair of vertices v1,v2 between which no walk exists. If there is a walk between v1,v2 in G but not in G, then that walk must involve the chosen e. But then there would be another walk between v1,v2 in G avoiding e via the rest of the proper cycle containing e. And this other walk would be in G since it does not involve e. Except that we assumed there was no walk between v,v in G, hence there also can be no walk between them in G. Thus, G is not connected.

Statement 6 implies Statement 1.
Again, consider the contrapositive of this logical implication, assuming that Statement 1 is false and proving that Statement 6 is also false. However, since both statements contain the substatement that G is acyclic (part of the definition of tree), we will not negate that part.

So assume that G is acyclic but not a tree, i.e. that G is not connected. We must prove that the number of edges in G is different from n1, where n is the number of vertices in G. Let G1,G2,,G be the connected components of G. Now, since G is assumed acyclic, each of these connected components is a tree (Statement 2 of Proposition 16.2.1). We have already proved above that Statement 1 implies Statement 5, so if we write ki for the number of vertices in component Gi, then we may conclude that the number of edges in component Gi is ki1. As the components make up the entire graph G, we may add up the vertices and edges in each component to get the totals in the full graph:

n=k1+k2++k,
|E|=(k11)+(k21)++(k1)=(k1+k2++k)=n.
Since we assume G is not connected, we have 2, and so |E|n1 as desired.

 

This page titled 16.3: Identifying Trees is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Jeremy Sylvestre via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?