MATH 490 S PRING 2012 H OMEWORK #4 S ELECTED S OLUTIONS Section 2.1 P 27. (⇒:) Assume there exists a tree, T , with degree sequence d1 , d2 , · · · , dn . Then di = 2e(T ) = 2(n − 1) = 2n − 2. P (⇐:) Assume ni=1 di = 2n − 2 where the di ’s are all positive integers. Proceed by induction on the number if integers in the sequence d1 , d2 , · · · , dn . Base Step: n = 2. Then 2n − 2 = 2, and the sequence must be: 1,1 which is the degree sequence of K2 . Inductive Step: Assume the conclusion holds for all acceptable sequences of length n − 1 or less. Recall that by assumption, the smallest integer in the sequence is at least 1. On the other hand, the average of the di ’s is (2n − 2)/n = 2 − 2/n < 2. So, at least one of the di ’s is exactly 1, call it dn , and at least one of the di ’s is at least 2, call it dn−1 . Since the sequence d1 , d2 , · · · , dn−2 , dn−1 − 1 consists of all positive integers P and n−1 i=1 di = (2n − 2) − (2) = 2(n − 1) − 2, the inductive hypothesis implies that there exists a tree on n − 1 vertices with this degree sequence. To this tree, add an additional leaf to which ever vertex has degree dn−1 − 1 and we have a tree with the original degree sequence. 33. Let G be a connected graph on n vertices. (⇒:) Assume G has exactly one cycle. Consider G − e where e is any edge on the cycle of G. Then G − e is connected and acyclic and therefor has n − 1 edges. Thus, G has n edges. (⇐:) Assume G has n edges. Since G is connected, it contains a spanning tree, say T with n − 1 edges. Adding the one edge of G not in T creates a second path between its end vertices creating a single cycle. 44. Let v be a cut-vertex of the graph G with diameter 2. We will show that v is an isolated vertex in G. Note that it is enough to show vw is an edge for all w ∈ V (G). With this strategy in mind, let w be an arbitrary vertex in V (G) − v. Since v is a cut vertex, we know G − v must contain at least two connected components and so there exists a vertex x in a different component from the one containing w. In G there exists a wx-path, say P. By assumption, P can have at most 3 vertices. But v as a cut vertex implies v must be on the path. So P = wvx and we have shown edge vw is in G for all w 6= v. 47. (a) This inequality follows from the observation that the shortest u, w-path when considered over all such paths is at least as short as the shortest u, w-path when we restrict consideration to those that must go through vertex v. (b) Let u, v, w be vertices chosen such that d(u, w) = diam(G) and such that v is in the center of G. Then 1 using part (a) we get: diam(G) = d(u, w) ≤ diam(u, v) + d(v, w) ≤ rad(G) + rad(G) = 2rad(G). (c) Construct G, a graph on 2r + d vertices, by starting with C2r and Pd−r+1 and identifing one vertex of the cycle with one end vertex of the path. This “identified” vertex is in the center. The degree one vertex and the vertex antipodal to the degree three vertex are a distance d apart. Section 2.2 1. Observe that if v is a vertex of degree k. Then v (or its label) must appear k − 1 times in the code. (a) stars; (b) “double stars”; trees that look like two stars joined by an edge between their respective vertices. (c) paths; 7. Cayley’s Formula says that there are a total of nn−2 trees. Each of these has exactly n − 1 edges. Thus, counting all the edges in all the trees we get: (n − 1)nn−2 edges. But, by symmetry, each edge in Kn must appear in the previous count the same number of times. So each edge must appear (n − 1)nn−2 / n2 = 2(nn−3 ) times. Note that a particular edge appears only once in each tree. Since a particular tree appears 2(nn−3 ) times, it must appear in 2(nn−3 ) trees. Thus, nn−2 − 2(nn−3 ) = (n − 2)nn−3 trees do not contain a particular edge. 9. We know that the leaves of a labeled tree correspond precisely to those labels that do not appear in the Prüfer code. Thus, counting all trees on n vertices with exactly k leaves is equivalent to counting all (n − 2)-tuples from [n] such that the tuple contains exactly n − k distinct numbers (i.e. n − k non-leaves.) The number of ways of choosing the n − k labels to appear is n−k . Now we need to count the number k of ways of arranging these n − k labels such that each one appears at least once. Imagine taking the n − 2 positions in the tuple and partitioning these n − 2 items into exactly n − k partitions – one for each required label. We know S(n − 2, n − k)) counts the number of these partitions. There are (n − k)! ways of assigning a partition an associated label. Final answer: n!S(n−2,n−k) k! Section 2.3 6. (⇐:) If the edges with odd weight form a spanning biclique, then every cycle must contain an even number of edges with odd weight. Thus, all cycles have even weight. (⇒:) Assume there exists at least one edge of odd weight since otherwise we are done. If all cycles have even weight, then the graph induced by edges of odd weight can have no odd cycles. Thus, the odd-edge graph is bipartite, say with partite sets X and Y. If this bipartite odd-edge graph is not complete, then there exists an edge, say xy between X and Y , that has even weight. But this immediately produces a 4-cycle of odd weight using xy and any edge of odd weight, a contradiction. Thus, the graph induced by edges of odd weight must be a complete bipartite graph. 2 10. That Prim’s Algorithm produces a spanning tree follows from the fact that at every stage it adds only edges from one component to an isolated vertex and it does this exactly n − 1 times. Let T be a spanning tree so produced and let Si , for i = 0, 1, · · · , n − 1, be the (nontrivial) component after the ith edge has been added. (S0 contains the single vertex identified at the beginning as the starting point.) We’re going to make two Careful Choices: (1) Let T 0 be a minimum weight spanning tree such that it contains Si as a subgraph for the most consecutive Si ’s starting at S0 . (2) WOLG assume that we order the ”random” choices of Prim’s algorithm to maximize choice 1. That is, there are instances in Prim’s Algorithm where the next two edges to be added are e and f of the same weight and the order in which they are added makes no difference. (An example of this would be say if the starting vertex has exactly two edges with weight 1 and there are no other edges in the graph of weight 1. Prim’s will always choose these two edges, but the order can vary, which would change what is S1 and S2 . We allow ourselves to choose the order the maximizes the consecutive Si ’s in T 0 .) Let ej be the first edge Prim’s adds to T that is not in T 0 . Then T 0 + ej contains a cycle. This cycle includes at least 1 vertex from Sj−1 ⊆ T 0 , one of the end vertices of ej . Starting at ej and traveling through Sj−1 , there is a first edge f that exits Sj−1 . Now w(f ) ≤ w(ej ) otherwise T 0 is not of minimum weight. On the other hand, w(f ) ≥ w(ej ) since otherwise Prim’s would have added edge f next. So w(f ) = w(ej ). But this implies that f 6 inT since if it were we would have reordered by Careful Choice 2. Thus, the tree T 0 − f + ej is a minimum weight spanning tree that contradicts Careful Choice 1. Thus, the tree Prim’s constructs must be of minimum weight. 13. Given two minimum weight spanning trees T and T 0 , let e0 be an edge in (T 0 − T ) that has minimum weight among all such edges. (i.e. if f 0 ∈ (T 0 − T ), then w(e0 ) ≤ w(f 0 ).) Then T + e0 contains a single cycle, C. Now, C must contain an edge e ∈ (T − T 0 ). So, T + e0 − e is a tree. We need to show w(e0 ) = w(e). If w(e0 ) < w(e), then w(T + e0 − e) < w(T ) which contradicts the choice of T as a minimum weight spanning tree. If w(e0 ) > w(e), a more subtle contradiction arises. If we add e to T 0 we will get a cycle C 0 in T 0 which must contain edges in T 0 − T. But, the weight of e is strictly less than all edges in T 0 − T. So no matter which edge of C 0 we delete, the resulting tree would have lower weight than T 0 , contradicting the fact that it is a minimum weight spanning tree. Thus, w(e0 ) = w(e). 14. (Part I) Let C be an arbitrary cycle in G and let e be an edge of maximum weight on C. We need to show that there exists a minimum weight spanning tree of G that doesn’t include edge e. Let T be a minimum weight spanning tree. If T does not include e, the result follows. If T does contain the edge e, then we know (i) T − e has two component and (ii) there exists an edge from C, say f , so that T − e + f is a tree. But we assumed edge e was of maximum weight among edges of C, so w(f ) ≤ w(e). So w(T − e + f ) ≤ w(T ). But T is a minimum weight among all spanning trees. So w(T − e + f ) = w(T ) and we have a minimum weight spanning tree that does not contain edge e. 3 (Part II) Assume we follow the algorithm described. This means (effectively) we (a) Order the edges by weight, heaviest first. (b) Looking at each edge in order we iteratively determine if the edge is a cut edge. If YES, we keep it. If NO, we delete it. Repeat. We must show this algorithm terminates in a minimum weight spanning tree. Let T be the graph obtained at the end of the algorithm. I will take the issues one by one. (It stops) Since there are a finite number of edges and every edge is considered once, the algorithm terminates. (connected) We start with a connected graph and never delete a cut edge so T is connected. (spanning) We start with all of G and never delete a vertex, so T spans. (acyclic) Assume T contained an cycle. Let e be the edge of maximum weight on C, then we know the algorithm considered e and since it is not a cut edge, deleted it, a contradiction. So T is acyclic. (minimum weight) Here is where we use Part I. Proceed by induction on the number of edges in G. Since G is connected, the base step is e(G) = n(G) − 1 and the algorithm clearly works as it deletes no edges and returns G. Assume the algorithm works for all trees with fewer than k edges where k ≥ n(G). Let G be a connected weighted graph with k edges. Let e be the first edge of G deleted by the algorithm. Part I implies that there exists a minimum weight spanning tree of G in G − e. The inductive hypothesis implies the algorithm will find it. Thus the graph the algorithm returns will, in fact, be a minimum weight spanning tree. 4
© Copyright 2026 Paperzz