How many edges does a complete undirected graph with n vertices have?
- A n
- B n(n - 1) / 2
- C n^2
- D 2n
Explanation
Every pair of vertices is joined by exactly one edge, so the number of edges is the number of pairs, n(n - 1) / 2.
How many edges does a complete undirected graph with n vertices have?
Every pair of vertices is joined by exactly one edge, so the number of edges is the number of pairs, n(n - 1) / 2.