Lemma 1: If H is a subgraph of a graph G, then dist_G(u, v)<= dist_H(u, v).
Proof Every u-v path in H appears also in G, and G may have additional u-v paths that are shorter than any u-v path in H.
Lemma 2: If H is connected subgraph of a graph G, such that V(H)=V(G) then diameter(G)≤diameter(H)
Proof
- diameter(G) = max{dist_G(u,v)} for all u,v in V(G)
- Suppose diameter(G) = dist_G(x,y) for some x,y in V(G) = V(H)
- diameter(H) = dist_H(a,b) for some a,b in V(H) = V(G)
- Note that dist_H(s,t) <= dist_H(a,b) for all s,t in V(H)
- dist_G(x,y) <= dist_H(x,y) For lemma 1
- dist_H(x,y) <= dist_H(a,b) for (4)
- Therefore diameter(G) <= diameter(H)
Is not hard to see if we replace H for any subgraph then the lemma does not hold. So my question is, in the previous proof, when do I use that H is connected. Thanks