Skip to content
← All questions

What is the maximum number of edges in an undirected simple graph with n vertices?

The maximum number of edges in an undirected simple graph with n vertices is n(n−1)/2n(n-1)/2. This maximum is achieved when the graph is a complete graph.

Conditions

  • The graph is undirected.
  • The graph is simple (no self-loops or multiple edges between the same pair of vertices).
  • The graph has n vertices.

Reasoning, step by step

  1. Identify the number of vertices n.
  2. Apply the formula for the maximum number of edges: n(n−1)/2n(n-1)/2.
  3. Understand that this corresponds to a complete graph where every pair of vertices is connected by an edge.

Example

For a complete graph with 5 vertices (n=5n=5), the number of edges is 5(5−1)/2=105(5-1)/2 = 10. The instructor derives this by summing 4+3+2+14+3+2+1.

Common misconceptions

  • Thinking the maximum number of edges is n(n−1)n(n-1), which applies to directed graphs.
  • Confusing the maximum number of edges in a connected graph with the maximum in a disconnected graph.

Watch the explanation

Connected concepts

Explore next

Related questions

Find a method

↗
Meet the concept

↗
Meet the concept

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.