The Lost Lecture 7: Leaves, chemistry, spanning trees
Note: This lecture didn’t happen because I was ill; the material presented here either has gotten absorbed into other lectures or problem sets, or won’t be examined; I leave it here for completeness.
A useful concept when studying trees is that of a leaf:
Definition
A leaf in a tree is a vertex of degree 1.
Lemma
Every finite tree with at least two vertices has at least two leaves.
Lemma
Every finite tree with at least two vertices has at least two leaves.
Proof 1: using paths
Suppose is at tree. Since has at least two vertices, at has at least one edge. Pick any edge , say, between and . If the vertex is a leaf, we have at least one leaf. If not, there is another edge incident to . and we can start a path from away from following this edge. As long as the end vertex of our path is not a leaf we may continue our path, and we will never return to a vertex we have already encountered, since trees have unique paths between vertices. Since is finite, the path must eventually terminate – i.e., find a leaf.
Following the same argument from the vertex produces another leaf.
Proof 2: using handshaking
We will use that is connected, has vertices, and edges.
Since is a tree it is connected; since it has connected and has two vertices it cannot have any vertices of degree 0.
Thus, if we assume for a contradiction that has no leaves, then every vertex had degree at least two. Since we know has vertices and leaves, applying the handshaking lemma gives:
a contradiction. For the inequality to hold, must have at least two vertices of degree 1.
Leaves will play a very important role in this afternoon’s lecture on the Prüfer code. In the meantime, we point out that the handshaking argument we give another application of the handshaking lemma argument above. Recall that in the last lecture we stated the following, but did not provide a full proof:
Proposition
Let be a graph with vertices. The following are equivalent:
- is a tree.
- Between any two vertices , there is a unique path.
- is connected, but removing any edge makes disconnected.
- has no cycles, but adding any edges to creates a cycle.
- is connected and has edges
- has no cycles and has edges
In lecture we showed that 1-3 are equivalent, and that if is a tree with vertices, then has edges, and hence that any of 1-3 imply 5 and 6. Today we are going to use that 5 implies 1, hence we will prove it.
Lemma
Suppose that is connected and has vertices and edges. Then is a tree.
Proof
We will use induction. As a base case, the result is clear if is 1 or 2. Thus, we assume that all connected graphs with vertices and edge are trees, and we must show that if is connected and has edges, then is a tree.
Note that has at least two vertices of degree 1, as the handshaking lemma argument given above only uses the facts that is connected and has the right number of leaves.
Now suppose that has degree one, and let be the edge incident to . Let be the graph obtained by removing and . Then has vertices and edges. Further, since was connected, we see that is as well. Thus, by the inductive hypothesis, is a tree, and so is as well
Chemistry Application: Alkanes
In organic chemistry, an alkane is a molecule with formula . The simplest Alkanes are methane , ethane and propane .
It appears from the graph that Alkanes are all trees; we prove that now.
Lemma
Any alkane is a tree.
Proof
We will use that a connected graphs on vertices with edges is a tree.
Any graph of a molecule is necessarily connected, and so to prove an Alkane is a tree we must count the number of vertices and edges.
There are vertices.
We count the edges using the Handshaking lemma. Carbon atoms have valency 4, and there are of them, while Hydrogen atoms have valency 1. Thus, the sum of all the degrees of the vertices is . The number of edges is half of these, namely , which is 1 less than the number of vertices. Since to be an atom it must be connected, we see that any Alkane is a tree.
Isomers
Definition
Two molecules are isomers if they have the same molecular formula, but the molecules are put together in a different way.
When there are 1, 2 or 3 carbon molecules, the only possible Alkanes is a line of carbon molecules. The resulting chemicals are methane, ethane, and propane. when , there are two possible alignments of the Carbon atoms: in a line, which is butane, or in a `T’ shape, which is isobutane; when , there are three different possibilities.
Around 1875, Hamilton used graph theory to count the number of isomers of the Alkane . One can forget about the placement of the hydrogen molecules, and just count the struture of the carbon molecules; these two will be a tree. Since the valency of Carbon is four the maximum degree of a vertex in these trees will be 4, and so counting isomers of is equivalent to counting isomorphism classes of trees with vertices, all of degree at most 4.