Returns True if some pseudograph can realize the sequence.
Every nonnegative integer sequence with an even sum is pseudographical (see [R224]).
Parameters : | sequence : list or iterable container
|
---|---|
Returns : | valid : bool
|
Notes
The worst-case run time is O(n) where n is the length of the sequence.
References
[R224] | (1, 2) F. Boesch and F. Harary. “Line removal algorithms for graphs and their degree lists”, IEEE Trans. Circuits and Systems, CAS-23(12), pp. 778-782 (1976). |