grinpy.invariants.independence.k_independence_number¶

grinpy.invariants.independence.k_independence_number(G, k)

Return a the k-independence number of G.

The k-independence number of a graph is the cardinality of a largest k-independent set of nodes in the graph.

G : graph
A Networkx graph.
k : int
A positive integer.
kIndependenceNumber : int
The k-independence number of G.

independence_number