grinpy.invariants.dsi.annihilation_number

grinpy.invariants.dsi.annihilation_number(G)

Return the annihilation number of the graph.

The annihilation number of a graph G is defined as:

\[a(G) = \max{t : \sum_{i=0}^t d_i \leq m}\]

where

\[{d_1 \leq d_2 \leq \cdots \leq \d_n}\]

is the degree sequence of the graph ordered in non-decreasing order and m is the number of edges in G.

G : graph
A Networkx graph.
annihilationNumber : int
The annihilation number of the graph.