Degree sequences of graphs

These functions decide whether a sequence (or two, if the graph is directed) of integers can be realized as vertex degrees by a graph or simple graph.

Usage (out.deg, in.deg = NULL) (out.deg, in.deg = NULL)
Integer vector, the degree sequence for undirected graphs, or the out-degree sequence for directed graphs.
NULL or an integer vector. For undireted graphs, it should be NULL. For directed graphs it specifies the in-degrees.
Details checks whether the given vertex degrees (in- and out-degrees for directed graphs) can be realized by a graph. Note that the graph does not have to be simple, it may contain loop and multiple edges. For undirected graphs, it also checks whether the sum of degrees is even. For directed graphs, the function checks whether the lengths of the two degree vectors are equal and whether their sums are also equal. These are known sufficient and necessary conditions for a degree sequence to be valid. determines whether the given vertex degrees (in- and out-degrees for directed graphs) can be reliazed in a simple graph, i.e. a graph without multiple or loop edges.


  • A logical scalar.


Degree sequence


Hakimi SL: On the realizability of a set of integers as degrees of the vertices of a simple graph. J SIAM Appl Math 10:496-506, 1962. PL Erdos, I Miklos and Z Toroczkai: A simple Havel-Hakimi type algorithm to realize graphical degree sequences of directed graphs. The Electronic Journal of Combinatorics 17(1):R66, 2010.

g <-, 2/100)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.