VertexInDegree

VertexInDegree[g]

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

VertexInDegree[g,v]

gives the vertex in-degree for the vertex v.

VertexInDegree[{vw,},]

uses rules vw to specify the graph g.

Details

  • The vertex in-degree for a vertex v is the number of incoming directed edges to v.
  • For an undirected graph g, an edge is taken to be both an in-edge and an out-edge. »

Examples

open allclose all

Basic Examples  (2)

Find the in-degree for each vertex:

Find the in-degree for a specified vertex:

Scope  (6)

VertexInDegree works with directed graphs:

Undirected graphs:

Multigraphs:

Vertex in-degree for a vertex:

Use rules to specify the graph:

VertexInDegree works with large graphs:

Applications  (4)

Highlight the vertex in-degree for directed graphs including CycleGraph:

StarGraph:

GridGraph:

CompleteKaryTree:

PathGraph:

RandomGraph:

Show the in-degree histogram for BernoulliGraphDistribution[n,p]:

The in-degree distribution follows BinomialDistribution[n-1,p]:

The vertex in-degree distribution for PriceGraphDistribution follows a power-law:

Create a food chain where an edge indicates what animals and insects eat:

The in-degree corresponds to the number of prey and what an animal preys on:

The species with in-degree zero are called basal species or producers:

Properties & Relations  (10)

The in-degree of an undirected graph is the number of edges incident to each vertex:

Self-loops are counted twice:

Undirected graphs correspond to directed graphs with each edge both an in- and out-edge:

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 in-degrees of all vertices of an undirected graph is twice the number of edges:

The sum of the in-degrees of all vertices of a directed graph is equal to the number of edges:

The vertex in-degrees of an undirected graph can be obtained from the adjacency matrix:

The vertex in-degrees of a directed graph can be obtained from the adjacency matrix:

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

A connected directed graph is Eulerian iff every vertex has equal in-degree and out-degree:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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