You are on page 1of 3

MATH 428Fall, 2016

Assignment #4 SolutionDue Oct. 4th


30 points

1. (3 points)
Prove that if G has two vertices u and v such that G u and G v are both trees, then
degG (u) = degG (v).
Ans. Note that if G1 := G v and G2 := G u are trees, then both have n 2 edges, since a tree
on n 1 vertices must have n 2 edges. Moreover, note that G u has size |E(G)| deg(u)
and G v has size |E(G)| deg(v). Thus we have
|E(G)| deg(u) = n 2 = |E(G)| deg(v),
and thus deg(u) = deg(v).
2. (4 points)
Prove that every tree T with (T ) = , has at least leaves (end-nodes).
P
Ans. Suppose that a tree T has k leaves. We use the handshake lemma, i.e. vV (T ) deg(v) =
2|E(T )|. We have
X
2(n 1) = 2|E(T )| = deg(v)
vV (T )
X X X
= deg(v) + deg(v) + deg(v)
vV (T ):v is a leaf vV (T ):deg(v)=(T ) vV (T ): 2deg(v)(T )1

k + + 2(n k 1) = 2n k 2 + (T ).
Thus 2(n 1) 2n k 2 + (T ), and consequently k (T ).
Alternative Ans. Let v be a vertex of degree (T ) of T . Note that T v has no cycles. Hence it is a forest,
and since T v is of size n 1 and order n 1 it must have (T ) connected components
(recall from class that a forest with k connected components and n vertices has n k edges).
Each connected component of T v is a tree, meaning it has at least two leaves, unless the
connected component is simply an isolated vertex. If a connected component is an isolated
vertex, say w, then v is a neighbor of w, hence making w a leaf of T . If a connected component
is a tree on at least two vertices, then it has at least two leaves, and v can be adjacent to
at most one of these two leaves. As a result at least one of the leaves of this connected
component of T v is a leaf of T also. Hence, each connected component of T v contributes
at least one leaf to T , and hence T has at least (T ) leaves.
3. (4 points)
Find all trees T such that T is also a tree.
Ans. Let T be a tree on n vertices such that T is also a tree. We know that T must have n1 edges,
and similarly T has n 1 edges. Hence, |E(T ) E(T )| = 2(n 1). However, by the definition
of complements of graphs, E(T ) E(T ) = E(Kn ) and hence |E(T ) E(T )| = n2 = n(n1)

2 .
Hence, 2(n 1) = n(n 1)/2, giving n(n 1) = 4(n 1). This equality can hold only if n = 4
or n = 1. Thus there are only two solutions for such n, either the trivial one-vertex tree, or
the tree P4 on four vertices.

1
4. (3 points) (Book 5.12) If a graph G contains three blocks and k cut-vertices, what are the
possible values of k. Explain your answer.

Ans. Noting that every cut-vertex of a graph must be in the intersection of two blocks and that
no two blocks of a graph can share more than one vertex (we proved this in class), a graph
with three blocks cannot have more than 3 cut-vertices. We claim that even k = 3 is not
possible. Assume for contradiction that there is a graph which has three cut-vertices u, v, w
and three blocks B1 , B2 , B3 . By the discussion above, it must be the case that without loss of
generality u V (B1 ) V (B2 ), v V (B2 ) V (B3 ) and w V (B1 ) V (B3 ). Now, note that
since u, v V (B2 ), then there is a uv-path Puv in B2 , similarly there is a uw-path Puw in B1
and a vw-path Pvw in B3 . Note also that since blocks do not share any edges, these three
paths are edge-disjoint. Note that attaching the three paths Puv , Pvw , Puw together, results in
a cycle containing simultaneously at least one B1 edge, at least one B2 edge and at least one
B3 edge. However, this contradicts the definition of blocks, which are defined to be maximal
collections of edges of G that pairwise belong to a cycle. As a result, k = 3 is not possible.
Finally, we give examples of three different graphs that achieve k = 0, 1, 2. For k = 0 note
that the graph on six vertices that consists of three vertex-disjoint edges has no cut-vertices
as it is disconnected. For k = 1 consider the graph on four vertices where there is one vertex
v that is adjacent to the other three vertices, and there is no other edges in the graph. The
vertex v is a cut vertex of the graph, and the graph has three blocks consisting of single
edges. Finally for k = 2 consider the path P3 which has two cut vertices and has three blocks
consisting of single edges.

5. (5 points) (Book 5.6) Prove that a 3-regular graph has a cut-vertex if and only if G has a
bridge.

Ans. We saw in class a proof of the fact that for every 3-regular graph G we have (G) = (G). A
graph that has a cut vertex satisfies (G) = 1 and hence it must satisfy (G) = 1. Thus we
refer as solution to a special case of the proof of the theorem proved in class.

6. (5 points) Let G be a connected weighted graph whose edges have distinct weights. Prove
that G has a unique minimum spanning tree.

Ans. We have seen in class that Kruskals algorithm always outputs correctly a minimum spanning
tree of a weighted graph. Let T be the outcome of Kruskals algorithm for the graph G.
We note that since the edges have different weights, then Kruskals algorithm never has to
break ties between edges of same weights, and thus the outcome of the algorithm is unique.
We claim that there cannot be any other spanning tree, that has the same weight as T .
Assume for contradiction that this is not true, then T 0 be a minimum spanning tree of G
where E(T 0 ) 6= E(T ) and T 0 agrees with T on most possible number of edges. Let e = uv
be the edge with the smallest weight in E(T )\E(T 0 ) (namely, the smallest weight edge in T
that is not in T 0 ). Similar to the proof of the correctness of Kruskals algorithm, we consider
T e. Since, T is a tree, T 0 e contains a cycle C containing e. The cycle C must have
an edge e0 6= e that does not belong to T , since otherwise T would have a cycle. Note that
w(e0 ) 6= w(e) since the edges of the graph have distinct weights. Moreover, w(e0 ) cannot be
smaller than w(e) since in that case e0 should have been added to T in Kruskals algorithm,
T and T 0 agree on all their edges of weight smaller than w(e), and e0 does not create a cycle
with edges of T 0 and hence would not create a cycle with the edges of T that are of weight
less than w(e). Hence it must be the case that w(e0 ) > w(e), in which case, T 0 e0 + e is

2
another spanning tree of strictly less weight than T 0 , contradicting the assumption that T 0
was a minimum spanning tree.

7. (6 points) Let P1 and P2 be two longest paths in a connected graph G. Prove that P1 and
P2 must have a common vertex.

Ans. Assume for contradiction that P1 = (u0 , ..., um ) and P2 = (v0 , ..., vn ) are two longest paths
in a connected graph G that do not share any vertices. Since G is a connected graph, then
there exists a path from a vertex in P1 to a vertex in P2 . Let P = (w0 = ui , w1 , ..., wk = vj )
be the shortest such path and assume that P = is a ui vj -path for some vertex ui in P1
and vj in P2 . We claim that the only vertices of P1 and P2 appearing on P are ui and
vj , since otherwise we could always find a shorter path from P1 to P2 than P . Let k be
the length of P . Assume without loss of generality that i m/2 and j n/2. Then
consider P3 := (u0 , ..., ui , w1 , w2 , ..., wk1 , vj , vj1 , ..., v0 ) which consists of the first i edges
of P1 continued with k edges of P and followed by j edges of P2 . P3 is a path of length
i+j+k m n
2 + 2 +k >
m+n
2 . Hence, P3 is a path that is strictly greater than the average
length of P1 and P2 and hence is strictly longer than one of P1 or P2 , contradicting the
assumption that P1 and P2 were two longest paths of G.

You might also like