Skip to main content
Logo image

Section 15.3 Connected vertices, graphs, and components

connected vertices
a pair of vertices v,vβ€² such that there exists a walk beginning at v and ending at vβ€²
connected graph
every pair of vertices is connected

Example 15.3.1. A connected graph.

A diagram of an example connected graph.

Example 15.3.2. A nonconnected graph.

A diagram of an example nonconnected graph.
Being connected is a symmetric relationship between vertices, and walks connecting vertices can be shortened to paths.
As usual, we prove the equivalence of multiple statements using a cycle of logical implications.

Statement 2 implies Statement 3.

Suppose v0,e1,v1,…,vnβˆ’1,en,vn is a walk with v0=v and vn=vβ€². If this walk is not a path, then there is a repeated vertex. Suppose vj=vi with j>i. Then
v0,e1,v1,…,viβˆ’1,ei,vj,ej+1,…,vnβˆ’1,en,vn
is also a walk from v to vβ€². Keep removing repeated vertices in this way until a path is obtained.

Statement 3 implies Statement 4.

Just reverse the order of the vertices and edges in the path from v to vβ€² to obtain a walk in the other direction.

Statement 4 implies Statement 5.

As before, if the walk from vβ€² to v is not a path, each pair of repeated vertices can be eliminated by β€œsnipping out” the portion of the walk between them.

Statement 5 implies Statement 1.

Reverse the path from vβ€² to v to obtain a walk from v to vβ€², thereby satisfying the definition of connected vertices.
A nonconnected graph can be considered to simply be a collection of connected subgraphs.
connected component (working definition)
a connected subgraph of a graph which is not contained in any larger connected subgraph of that graph
connected component (formal definition)
a subgraph Gβ€² of a graph G that satisfies the following:
  1. Gβ€² is connected;
  2. if Gβ€³ is a subgraph of G such that Gβ€³ is connected and Gβ€²βͺ―Gβ€³, then Gβ€³=Gβ€²

Example 15.3.4. Breaking a nonconnected graph into connected components.

Considering Figure 15.3.5 below as a single graph, we have placed the connected components (of which there are three) into boxes.
A graph to map the possible paths in another graph.
Figure 15.3.5. A nonconnected graph as a collection of connected subgraphs.
This nonconnected graph has other connected subgraphs. For example, the subgraph that contains only the left-most two vertices joined by a single edge is a connected subgraph. But that connected graph is not a connected component because it is a subgraph of a larger connected subgraph.

Example 15.3.6. Connected components do not depend on how the graph is represented diagrammatically.

A nonconnected graph drawn with overlapping connected components.
(a) Overlapping connected components.
A nonconnected graph drawn with non-overlapping connected components.
(b) Non-overlapping connected components.
Figure 15.3.7. Two different representations of the same nonconnected graph.
The two graphs in Figure 15.3.7 are in fact the same graph, just with different diagrammatic representations. In the second version of the graph, we have again identified connected components by placing each of them in a box.

Example 15.3.8. A connected graph has one component.

If a graph is connected, then the entire graph is a largest connected subgraph possible.
A connected graph with one connected component.
Figure 15.3.9. A connected graph with one connected component.
By (strong) induction.

Base case n=1.

Every graph with only one vertex is connected and satisfies |E|β‰₯0.

Induction step.

Assume kβ‰₯1 and the statement is true for all n≀k. Let G=(V,E) be a connected graph with k+1 vertices. We must show |E|β‰₯k.
Arbitrarily choose some vertex v0∈V, and let Gβ€²=(Vβ€²,Eβ€²) be the graph obtained from G by removing v0 and all edges incident to it. Unfortunately, Gβ€² might not be connected. Let G1β€²,…,Gβ„“β€² be its connected components. Write Giβ€²=(Viβ€²,Eiβ€²), and let ni=|Viβ€²|. Then each Giβ€² is connected and has at most k vertices, so the induction hypothesis applies. Also note that n1+β‹―+nβ„“=k, since every vertex of G except v0 is part of exactly one subgraph Giβ€².
A depiction of removing one vertex from a graph.
(a) β€œExtra” vertex v0 and the remaining subgraph Gβ€².
A depiction of removing one vertex from a graph and splitting remaining subgraph into connected components.
(b) Subgraph Gβ€² split into connected components.
Figure 15.3.12. Removing β€œextra” vertex v0, splitting remaining subgraph into connected components.
Therefore, using our induction hypothesis we may calculate
|E|=|Eβ€²|+|{edges in G incident to v0}|=|E1β€²|+β‹―|Eβ„“β€²|+|{edges in G incident to v0}|β‰₯(n1βˆ’1)+β‹―+(nβ„“βˆ’1)+|{edges in G incident to v0}|=kβˆ’β„“+|{edges in G incident to v0}|.
However, since G is connected, v0 must be the glue keeping the subgraphs {Giβ€²} together. That is, for each i there must be at least one edge between v0 and some vertex of Giβ€². Therefore,
|E|β‰₯kβˆ’β„“+|{edges in G incident to v0}|β‰₯kβˆ’β„“+β„“=k.