grinpy.invariants.zero_forcing.is_k_forcing_set

grinpy.invariants.zero_forcing.is_k_forcing_set(G, nodes, k)

Return whether or not the nodes in nodes comprise a k-forcing set in G.

Parameters:
  • G (NetworkX graph) – An undirected graph.
  • nodes (list, set) – An iterable container of nodes in G.
  • k (int) – A positive integer.
Returns:

True if the nodes in nodes comprise a k-forcing set in G. False otherwise.

Return type:

boolean