Diameter of a disconnected graph
-
29-09-2020 - |
Question
Given G(V,E) a graph that has 2 connected components, what is the diamter of this graph?
Solution
The distance $d_G(u,v)$ between two disconnected vertices $u,v$ of a graph is usually defined as $+\infty$.
As a consequence the diameter of a disconnected graph $G=(V,E)$ is $$ \textrm{diam}(G) = \max_{u,v \in V} d_G(u,v) = + \infty. $$
Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange