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:

Find the degree for a specified vertex:

Vertex degrees of the HararyGraph:

Scope  (6)

VertexDegree works with undirected graphs:

Directed graphs:

Multigraphs:

Vertex degree for a vertex:

Use rules to specify the graph:

VertexDegree works with large graphs:

Applications  (4)

Highlight the vertex by its vertex degree for CycleGraph:

StarGraph:

GridGraph:

CompleteKaryTree:

An unbalanced tree:

PathGraph:

RandomGraph:

Create a social network:

Find the people with more influence:

The degree distribution for a Bernoulli random graph follows a BinomialDistribution:

Generate vertex degrees from 1000 instances of random graphs:

Find the probability that a Bernoulli random graph has max degree greater than 50:

The vertex degree distribution for BarabasiAlbertGraphDistribution follows a power-law:

Properties & Relations  (15)

The degree of a vertex of an undirected graph is the number of edges incident to the vertex:

Self-loops are counted twice:

For an undirected graph, the vertex in-degree and out-degree are equal to the vertex degree:

For a directed graph, the sum of the vertex in-degree and out-degree is the vertex degree:

Put the vertex degree, in-degree, and out-degree before, above, and below the vertex, respectively:

The sum of the degrees of all vertices of a graph is twice the number of edges:

Every graph has an even number of vertices with odd degree:

Connected simple graphs have minimum vertex degree of at least :

A graph with minimum vertex degree at least 2 contains a cycle:

The vertex degrees of an undirected graph can be obtained from its adjacency matrix:

The vertex degrees of a directed graph can be obtained from its adjacency matrix:

The vertex degrees for an undirected graph can be obtained from the incidence matrix:

The vertex degrees for a directed graph can be obtained from the incidence matrix:

Each vertex of a -regular graph has the same vertex degree :

All vertices of a simple graph have maximum degree less than the number of vertices:

A simple graph without isolated vertices has at least one pair of vertices with equal degrees:

A connected undirected graph is Eulerian iff every vertex has an even degree:

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