NetworkX

Previous topic

networkx.generators.degree_seq.degree_sequence_tree

Next topic

networkx.generators.degree_seq.is_valid_degree_sequence_erdos_gallai

networkx.generators.degree_seq.is_valid_degree_sequence_havel_hakimi

networkx.generators.degree_seq.is_valid_degree_sequence_havel_hakimi(deg_sequence)

Returns True if deg_sequence is a valid degree sequence.

A degree sequence is valid if some graph can realize it. Validation proceeds via the Havel-Hakimi algorithm.

Worst-case run time is: O( n**(log n) )

Parameters :

deg_sequence : list

A list of integers where each element specifies the degree of a node in a graph.

Returns :

valid : bool

True if deg_sequence is a valid degree sequence and False if not.

References

[havel1955], [hakimi1962], [CL1996]