This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# EdgeCount

 EdgeCount[g] gives a count of the number of edges in the graph g. EdgeCountgives a count of the number of edges that match the pattern patt.
• Multiple edges between nodes are counted as separate.
Count the number of edges:
Count the number of edges that match a pattern:
The number of edges incident to 1:
Count the number of edges:
 Out[1]=
 Out[2]=

Count the number of edges that match a pattern:
 Out[1]=
The number of edges incident to 1:
 Out[2]=
 Scope   (3)
EdgeCount works with undirected graphs:
Directed graphs:
Works with large graphs:
Count the number of edges on symbolic graph constructors:
 Applications   (2)
The minimum number of edges in a connected graph with vertices is :
A path graph with vertices has exactly edges:
The number of edges for Bernoulli graphs with probability on vertices has mean :
The standard deviation is :
The full distribution:
The number of edges of CompleteGraph[n]:
EdgeCount can be found using EdgeList:
The number of edges for a directed graph can be found from matrix representations:
Totaling the adjacency matrix:
The number of columns of the incidence matrix:
The number of edges for an undirected graph can be found from matrix representations:
The total of the upper (or lower) triangular part of the adjacency matrix:
The number of columns of the incidence matrix:
Totaling the diagonal elements of the Kirchhoff matrix, divided by 2:
The number of edges of the graph is equal to the number of vertices of its line graph:
The sum of the degrees of all vertices of a graph is twice the number of edges:
The underlying undirected graph of a graph g has the same number of edges as g:
New in 8