Returns True if deg_sequence can be realized by a simple graph.
The validation proceeds using the Havel-Hakimi theorem. Worst-case run time is: O(s) where s is the sum of the sequence.
Parameters: deg_sequence (list) – A list of integers where each element specifies the degree of a node in a graph. Returns: valid – True if deg_sequence is graphical and False if not. Return type: bool
The ZZ condition says that for the sequence d if
then d is graphical. This was shown in Theorem 6 in .
 I.E. Zverovich and V.E. Zverovich. “Contributions to the theory of graphic sequences”, Discrete Mathematics, 105, pp. 292-303 (1992).