Given G(V,E) a graph that has 2 connected components, what is the diamter of this graph?
$\begingroup$
$\endgroup$
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. $$