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

前端 未结 12 2049
迷失自我
迷失自我 2020-12-07 17:13

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

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 18:06

    There can be as many as n(n-1)/2 edges in the graph if not multi-edge is allowed.

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

    See here.

提交回复
热议问题