Maximum Edges in a Simple Graph
Coding
Graph Theory
Easy
Hint 1
In a simple graph, at most one edge can connect any given pair of vertices.
Hint 2
Count the number of distinct unordered pairs of vertices.
Show worked solution
1. Count vertex pairs
A simple undirected graph can have at most one edge per unordered pair of distinct vertices.
2. Apply the combination count
The number of unordered pairs from vertices is , which equals the maximum edge count.
Answer: n(n-1)/2
Related roles: Browse quant jobs