is_valid_degree_sequence_erdos_gallai
is_valid_degree_sequence_havel_hakimi
Enter search terms or a module, class or function name.
Returns True if deg_sequence is a valid degree sequence.
A degree sequence is valid if some graph can realize it.
deg_sequence : list
A list of integers where each element specifies the degree of a node in a graph.
method : “eg” | “hh”
The method used to validate the degree sequence. “eg” corresponds to the Erdős-Gallai algorithm, and “hh” to the Havel-Hakimi algorithm.
valid : bool
True if deg_sequence is a valid degree sequence and False if not.
References