Solving the possible largest diameter of a simple undirect graph Given a simple graph $G$ with $N$ nodes and $E$ edges. What is its possible largest diameter? I suggest: $D=\lceil{N+1-\frac{3+\sqrt{8E-8N+9}}{2}}\rceil$