grinpy.invariants.zero_forcing.k_forcing_number¶
-
grinpy.invariants.zero_forcing.
k_forcing_number
(G, k)¶ Return the k-forcing number of G.
The k-forcing number of a graph is the cardinality of a smallest k-forcing set in the graph.
Parameters: - G (NetworkX graph) – An undirected graph.
- k (int) – A positive integer.
Returns: The k-forcing number of G.
Return type: int