Diameter of a graph denoted by diam (G) is defined by-
The diameter of a connected graph G, denoted diam(G), is the maximum distance between two vertices.
A graph is a pictorial representation of a set of objects where some pairs of objects are connected by links. The interconnected objects are represented by points termed as vertices, and the links that connect the vertices are called edges.
1) Max{e(v):vϵϵV}
(where e(v) is eccentricity of vertex, v is a
vertex and V is the vertex set).
2) Max{d(u,v):u.vϵϵV}
(where d(u,v) is the distance between two vertices
U and V).