1. Prove that there is a bipartite multigraph with degree sequenced1, . . . , dn if and only if there
is a partition {I, J} of [n] such that
∑ i∈I di = ∑ i∈J di.
2. What is the smallest number of edges that can be removed from K5 to create a bipartite
graph?
3. A regular graphis one in which the degree of every vertex is the same. Show that if Gis a regular bipartite graph, and the common degree of the vertices is at least 1, then the two parts are the same size.
4. A perfect matching is one in which all vertices of the graph are incident with exactly one edge in the matching. Show that a regular bipartite graph with common degree at least 1 has a perfect matching. (We discussed matchings in section 4.5.)
5.5 Trees
Another useful special class of graphs:
DEFINITION 5.5.1 A connected graph G is a tree if it is acyclic, that is, it has no cycles. More generally, an acyclic graph is called a forest.
Two small examples of trees are shown in figure5.1.5. Note that the definition implies that no tree has a loop or multiple edges.
THEOREM 5.5.2 Every treeT is bipartite.
Proof. Since T has no cycles, it is true that every cycle of T has even length. By corollary 5.4.3, T is bipartite.
DEFINITION 5.5.3 A vertex of degree one is called apendant vertex, and the edge incident to it is a pendant edge.
THEOREM 5.5.4 Every tree on two or more vertices has at least one pendant vertex. Proof. We prove the contrapositive. Suppose graphGhas no pendant vertices. Starting at any vertexv, follow a sequence of distinct edges until a vertex repeats; this is possible because the degree of every vertex is at least two, so upon arriving at a vertex for the first time it is always possible to leave the vertex on another edge. When a vertex repeats for the first time, we have discovered a cycle.
This theorem often provides the key step in an induction proof, since removing a pendant vertex (and its pendant edge) leaves a smaller tree.
THEOREM 5.5.5 A tree on nvertices has exactly n−1 edges. Proof. A tree on 1 vertex has 0 edges; this is the base case.
If T is a tree on n≥ 2 vertices, it has a pendant vertex. Remove this vertex and its pendant edge to get a tree T′ onn−1 vertices. By the induction hypothesis, T′ hasn−2 edges; thus T has n−1 edges.
THEOREM 5.5.6 A tree with a vertex of degree k≥1 has at leastk pendant vertices. In particular, every tree on at least two vertices has at least two pendant vertices.
Proof. The case k = 1 is obvious. Let T be a tree with n vertices, degree sequence {di}ni=1, and a vertex of degree k ≥ 2, and let l be the number of pendant vertices. Without loss of generality, 1 =d1 =d2 =· · ·=dl and dl+1 =k. Then
2(n−1) = n ∑ i=1 di =l+k+ n ∑ i=l+2 di ≥l+k+ 2(n−l−1). This reduces to l ≥k, as desired.
IfT is a tree on two vertices, each of the vertices has degree 1. IfT has at least three vertices it must have a vertex of degree k ≥ 2, since otherwise 2(n−1) = ∑ni=1di = n, which implies n= 2. Hence it has at least k ≥2 pendant vertices.
Trees are quite useful in their own right, but also for the study of general graphs.
DEFINITION 5.5.7 If G is a connected graph on n vertices, a spanning tree for G
is a subgraph of G that is a tree onn vertices.
THEOREM 5.5.8 Every connected graph has a spanning tree.
Proof. By induction on the number of edges. If Gis connected and has zero edges, it is a single vertex, so G is already a tree.
Now supposeG hasm≥1 edges. IfGis a tree, it is its own spanning tree. Otherwise,
G contains a cycle; remove one edge of this cycle. The resulting graphG′ is still connected and has fewer edges, so it has a spanning tree; this is also a spanning tree for G.
In general, spanning trees are not unique, that is, a graph may have many spanning trees. It is possible for some edges to be in every spanning tree even if there are multiple spanning trees. For example, any pendant edge must be in every spanning tree, as must any edge whose removal disconnects the graph (such an edge is called a bridge.)
COROLLARY 5.5.9 If G is connected, it has at least n−1 edges; moreover, it has exactly n−1 edges if and only if it is a tree.
5.5 Trees 105 Proof. IfG is connected, it has a spanning tree, which has n−1 edges, all of which are edges of G.
IfGhasn−1 edges, which must be the edges of its spanning tree, thenGis a tree.
THEOREM 5.5.10 G is a tree if and only if there is a unique path between any two vertices.
Proof.
if: Since every two vertices are connected by a path, G is connected. For a contradiction, suppose there is a cycle in G; then any two vertices on the cycle are connected by at least two distinct paths, a contradiction.
only if: If G is a tree it is connected, so between any two vertices there is at least one path. For a contradiction, suppose there are two different paths from v to w:
v=v1, v2, . . . , vk =w and v=w1, w2, . . . , wl=w.
Let i be the smallest integer such thatvi ̸=wi. Then letj be the smallest integer greater than or equal toisuch that wj =vmfor some m, which must be at leasti. (Since wl=vk, such an m must exist.) Then vi−1, vi, . . . , vm =wj, wj−1, . . . , wi−1 =vi−1 is a cycle in G, a contradiction. See figure5.5.1.
• • • · · · • • • · · · • • · · · • • • · · · • v1 v2 v3 w1 w2 w3 vi−1 vi wi−1 wi wj−1 vm wj vk wl
Figure 5.5.1 Distinct paths imply the existence of a cycle.
DEFINITION 5.5.11 A cutpoint in a connected graphG is a vertex whose removal disconnects the graph.
THEOREM 5.5.12 Every connected graph has a vertex that is not a cutpoint. Proof. Remove a pendant vertex in a spanning tree for the graph.
Exercises 5.5.
1. Suppose that G is a connected graph, and that every spanning tree contains edge e. Show that e is a bridge.
3. Show thatGis a tree if and only if it has no cycles and adding any new edge creates a graph with exactly one cycle.
4. Which trees have Euler walks?
5. Which trees have Hamilton paths?
6. Let n≥2. Show that there is a tree with degree sequenced1, d2, . . . , dn if and only ifdi >0
for all iand∑ni=1di = 2(n−1).
7. A multitree is a multigraph whose condensation is a tree. Let n ≥2. Let d1, d2, . . . , dn be
positive integers, and let g be the greatest common divisor of the di. Show that there is
a multitree with degree sequence d1, d2, . . . , dn if and only if ∑n
i=1di/g ≥ 2(n−1) and for
some partition I,J of [n], ∑i∈Idi =∑i∈Jdi.
8. Suppose T is a tree on n vertices, k of which have degree larger than 1, d1, d2,. . . dk. Of
course,T must also have pendant vertices. How many pendant vertices? Your answer should depend only onk andd1,d2,. . . dk.