What is the maximum number of edges in a directed graph with n nodes?

What is the maximum number of edges in a directed graph with n nodes? Is there an upper bound?

+59
math algorithm max graph
Feb 20 '11 at 16:44
source share
13 answers

If you have N nodes, there are N - 1 directed edges that can lead to it (going to any other node). Therefore, the maximum number of edges N * (N - 1) .

+75
Feb 20 2018-11-21T00:
source share

In an undirected graph (with the exception of multigraphs), the answer is n * (n-1) / 2. In a directed graph, an edge can occur in both directions between two nodes, then the answer will be n * (n-1).

+26
Jun 08 '13 at 1:28
source share

Directional chart:

Question What is the maximum number of edges in a directed graph with n vertices?

  • Suppose there is no autopilot.
  • Suppose that there is at most one edge from a given initial vertex to a given final vertex.

Each edge is defined by a start vertex and an end vertex. No choice for starting top. Since there is no self-training, there is n-1 for the final vertex. Multiplying them together takes into account all possible options.

Answer : n(nāˆ’1)

Conventional Schedule

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

  • Suppose there is no autopilot.
  • Suppose that there is at most one edge from a given initial vertex to a given final vertex.

In an undirected graph, each edge is defined by its two endpoints and the order does not matter. Therefore, the number of edges is the number of subsets of size 2 selected from the set of vertices. Since the set of vertices is of size n, the number of such subsets is given by the formula binomial coefficient C (n, 2) (also known as ā€œn choose 2ā€). Using the formula for binomial coefficients, C (n, 2) = n (n-1) / 2.

Answer : (n*(n-1))/2

+23
Jan 10 '16 at 9:10
source share

In addition to the intuitive explanation provided by Chris Smith, we can examine why this is the case from a different perspective: looking at undirected graphs.

To understand why the answer in the DIRECTED column is n*(n-1) , consider an undirected graph (which simply means that if there is a connection between two nodes (A and B), then you can go in both directions: from A to B and B to A). The maximum number of edges in an undirected graph is n(n-1)/2 and, obviously, in an oriented graph is twice as large .

Well, you ask, but why is there a maximum of n(n-1)/2 edges in an undirected graph ? To do this, consider n points (nodes) and ask how many edges can be made from the first point. Obviously n-1 edges. Now, how many edges can be extracted from the second point, given that you connected the first point? Since the first and second points are connected to already , there are n-2 edges that can be performed. And so on. Thus, the sum of all edges is equal to:

 Sum = (n-1)+(n-2)+(n-3)+...+3+2+1 

Since the sum contains members (n-1) , and the average amount in this series is ((n-1)+1)/2 {(last + first) / 2}, Sum = n(n-1)/2

+9
Mar 21 '15 at 20:39
source share

If the graph is not a multigraph, then obviously n * (n - 1), since each node may not have all the edges for all the other nodes. If it is a multigraph, then there is no maximum limit.

+5
Feb 20 '11 at 16:50
source share

In other words:

A complete graph is an undirected graph, where each individual pair of vertices has a single edge connecting them. This is intuitive in the sense that you basically select 2 vertices from a set of n vertices.

 nC2 = n!/(n-2)!*2! = n(n-1)/2 

This is the maximum number of edges that an undirected graph can have. Now, for a directed graph, each edge is transformed into two directed edges. So just multiply the previous result by two. This gives you the result: n (n-1)

+4
Dec 04 '15 at 8:27
source share

In an oriented graph that has N vertices, each vertex can connect to N-1 other vertices in the graph (suppose not a single loop). Therefore, the total number of edges can be N (N-1).

+1
Aug 09 '15 at 15:38
source share

The correct answer is n * (n-1) / 2. Each edge is counted twice, therefore, division by 2. The complete graph has the maximum number of edges, which is given by n, selects 2 = n * (n-1) / 2.

0
Jan 19 '12 at 17:35
source share

A graph can have no more than n(n-1)/2 edges if multiple edges are not allowed.

And this is achievable if we mark the vertices 1,2,...,n and there an edge from i to j iff i>j .

See here .

0
09 Oct
source share

Failed N ^ 2. Simple - each node has N edge options (including itself), total N nodes, so N * N

0
Mar 10 '14 at 0:24
source share

In a graph with a self loop

 max edges= n*n 

for example, we have 4 nodes (vertex)

 4 nodes = 16 edges= 4*4 
0
Mar 11 '19 at 4:08
source share

What is a tournament?

A simple complete directed graph is a tournament.

You can find it on the Internet ...

The tournament has N * (N-1) / 2 ribs ... So the correct answer should be N * (N-1) / 2.

0
Jul 08 '19 at 12:36
source share

You can also consider as the number of ways to select pairs of nodes n choose 2 = n (n-1) / 2. True, if only any pair can have only one edge. Multiply by 2 otherwise

-one
Mar 31 2018-12-12T00:
source share



All Articles