NetworkX

Previous topic

is_valid_degree_sequence_havel_hakimi

Next topic

Hierarchy

is_valid_degree_sequence_erdos_gallai

is_valid_degree_sequence_erdos_gallai(sequence)[source]

Returns True if the sequence is a valid degree sequence.

A degree sequence is valid if some graph can realize it. Validation proceeds via the Erdős-Gallai algorithm.

Worst-case run time is: O(n^2)

Parameters :

sequence : list or iterable container

A sequence of integer node degrees

Returns :

valid : bool

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

References

[EG1960], [choudum1986]