VertexDegree

VertexDegree[g]

gives the list of vertex degrees for all vertices in the graph g.

VertexDegree[g,v]

gives the vertex degree for the vertex v.

VertexDegree[{vw,},]

uses rules vw to specify the graph g.

Details

  • VertexDegree is also known as valence.
  • The vertex degree for a vertex v is the number of edges incident to v.
  • For a directed graph g, an edge is incident to a vertex whether it is an in-edge or an out-edge.

Examples

open allclose all

Basic Examples  (3)

Find the degree for each vertex:

In[1]:=
Click for copyable input
Out[1]=

Find the degree for a specified vertex:

In[1]:=
Click for copyable input
Out[1]=

Vertex degrees of the HararyGraph:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (6)

Applications  (4)

Properties & Relations  (15)

See Also

VertexInDegree  VertexOutDegree  EdgeCount  EdgeList  AdjacencyMatrix  IncidenceMatrix  DegreeCentrality  EigenvectorCentrality  KatzCentrality

Introduced in 2010
(8.0)
| Updated in 2015
(10.3)