VertexInDegree
✖
VertexInDegree
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 allBasic Examples (2)Summary of the most common use cases
Scope (6)Survey of the scope of standard use cases
VertexInDegree works with directed graphs:

https://wolfram.com/xid/0dc3e0so8mpu-fvzxpm


https://wolfram.com/xid/0dc3e0so8mpu-fla6ma


https://wolfram.com/xid/0dc3e0so8mpu-uvnf7h

Vertex in-degree for a vertex:

https://wolfram.com/xid/0dc3e0so8mpu-hzoot6

Use rules to specify the graph:

https://wolfram.com/xid/0dc3e0so8mpu-bndh30

VertexInDegree works with large graphs:

https://wolfram.com/xid/0dc3e0so8mpu-pq9ae

https://wolfram.com/xid/0dc3e0so8mpu-dag496

Applications (4)Sample problems that can be solved with this function
Highlight the vertex in-degree for directed graphs including CycleGraph:

https://wolfram.com/xid/0dc3e0so8mpu-gzipus

https://wolfram.com/xid/0dc3e0so8mpu-baipzx

https://wolfram.com/xid/0dc3e0so8mpu-g2btke

https://wolfram.com/xid/0dc3e0so8mpu-h351s2


https://wolfram.com/xid/0dc3e0so8mpu-h7904

https://wolfram.com/xid/0dc3e0so8mpu-fod79c

https://wolfram.com/xid/0dc3e0so8mpu-yoa55


https://wolfram.com/xid/0dc3e0so8mpu-jbz7i6

https://wolfram.com/xid/0dc3e0so8mpu-j70q6

https://wolfram.com/xid/0dc3e0so8mpu-hp22t8


https://wolfram.com/xid/0dc3e0so8mpu-gca8u7

https://wolfram.com/xid/0dc3e0so8mpu-fxghik

https://wolfram.com/xid/0dc3e0so8mpu-o6y56


https://wolfram.com/xid/0dc3e0so8mpu-duj4e6

https://wolfram.com/xid/0dc3e0so8mpu-659hg

https://wolfram.com/xid/0dc3e0so8mpu-cpnmy0


https://wolfram.com/xid/0dc3e0so8mpu-fnxa4i

https://wolfram.com/xid/0dc3e0so8mpu-d5r4aw

https://wolfram.com/xid/0dc3e0so8mpu-f3cto8

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

https://wolfram.com/xid/0dc3e0so8mpu-h85tpk

https://wolfram.com/xid/0dc3e0so8mpu-kmwtyv

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

https://wolfram.com/xid/0dc3e0so8mpu-i06cd3

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

https://wolfram.com/xid/0dc3e0so8mpu-jroi74

https://wolfram.com/xid/0dc3e0so8mpu-b0tydj

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

https://wolfram.com/xid/0dc3e0so8mpu-fb5pb0

https://wolfram.com/xid/0dc3e0so8mpu-1ni0oa

https://wolfram.com/xid/0dc3e0so8mpu-bctffq
The in-degree corresponds to the number of prey and what an animal preys on:

https://wolfram.com/xid/0dc3e0so8mpu-kvcv66

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

https://wolfram.com/xid/0dc3e0so8mpu-cb6qpk


https://wolfram.com/xid/0dc3e0so8mpu-knn9tb

Properties & Relations (10)Properties of the function, and connections to other functions
The in-degree of an undirected graph is the number of edges incident to each vertex:

https://wolfram.com/xid/0dc3e0so8mpu-lotoz


https://wolfram.com/xid/0dc3e0so8mpu-iw9hke


https://wolfram.com/xid/0dc3e0so8mpu-fl4x40


https://wolfram.com/xid/0dc3e0so8mpu-52dw

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

https://wolfram.com/xid/0dc3e0so8mpu-do65mj


https://wolfram.com/xid/0dc3e0so8mpu-djkivd

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

https://wolfram.com/xid/0dc3e0so8mpu-nch4i7


https://wolfram.com/xid/0dc3e0so8mpu-boamnk

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

https://wolfram.com/xid/0dc3e0so8mpu-c7g75m
Put the vertex degree, in-degree, and out-degree before, above, and below the vertex, respectively:

https://wolfram.com/xid/0dc3e0so8mpu-bvebwh


https://wolfram.com/xid/0dc3e0so8mpu-jrbvj2

The sum of the in-degrees of all vertices of an undirected graph is twice the number of edges:

https://wolfram.com/xid/0dc3e0so8mpu-nc90z


https://wolfram.com/xid/0dc3e0so8mpu-co2r0o

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

https://wolfram.com/xid/0dc3e0so8mpu-lekv8x

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

https://wolfram.com/xid/0dc3e0so8mpu-0hfe3


https://wolfram.com/xid/0dc3e0so8mpu-cji5i


https://wolfram.com/xid/0dc3e0so8mpu-k903ls


https://wolfram.com/xid/0dc3e0so8mpu-ej029e

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

https://wolfram.com/xid/0dc3e0so8mpu-g2jqah

https://wolfram.com/xid/0dc3e0so8mpu-d068v1


https://wolfram.com/xid/0dc3e0so8mpu-d6r2qp


https://wolfram.com/xid/0dc3e0so8mpu-ez0fq2

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

https://wolfram.com/xid/0dc3e0so8mpu-dtruch


https://wolfram.com/xid/0dc3e0so8mpu-clt22t


https://wolfram.com/xid/0dc3e0so8mpu-gygas4


https://wolfram.com/xid/0dc3e0so8mpu-eanta7

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

https://wolfram.com/xid/0dc3e0so8mpu-hxkdvf

https://wolfram.com/xid/0dc3e0so8mpu-d36ld


https://wolfram.com/xid/0dc3e0so8mpu-cxziv7

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).
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.
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
Wolfram Language. (2010). VertexInDegree. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexInDegree.html
BibTeX
@misc{reference.wolfram_2025_vertexindegree, author="Wolfram Research", title="{VertexInDegree}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexInDegree.html}", note=[Accessed: 07-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_vertexindegree, organization={Wolfram Research}, title={VertexInDegree}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexInDegree.html}, note=[Accessed: 07-June-2025
]}