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:

Wolfram Research (2010), VertexDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDegree.html (updated 2015).

Text

Wolfram Research (2010), VertexDegree, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDegree.html (updated 2015).

CMS

Wolfram Language. 2010. "VertexDegree." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexDegree.html.

APA

Wolfram Language. (2010). VertexDegree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexDegree.html

BibTeX

@misc{reference.wolfram_2024_vertexdegree, author="Wolfram Research", title="{VertexDegree}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexDegree.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_vertexdegree, organization={Wolfram Research}, title={VertexDegree}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexDegree.html}, note=[Accessed: 22-November-2024 ]}