Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
is_pseudographical¶

is_pseudographical
(sequence)[source]¶ Returns True if some pseudograph can realize the sequence.
Every nonnegative integer sequence with an even sum is pseudographical (see [1]).
Parameters: sequence (list or iterable container) – A sequence of integer node degrees Returns: valid – True if the sequence is a pseudographic degree sequence and False if not. Return type: bool Notes
The worstcase run time is O(n) where n is the length of the sequence.
References
[1] F. Boesch and F. Harary. “Line removal algorithms for graphs and their degree lists”, IEEE Trans. Circuits and Systems, CAS23(12), pp. 778782 (1976).