is_k_dominating_set(G, nbunch, k)¶
Return whether or not the nodes in nbunch comprise a k-dominating set.
A k-dominating set is a set of nodes with the property that every node in the graph is either in the set or adjacent at least 1 and at most k nodes in the set.
This is a generalization of the well known concept of a dominating set (take k = 1).
- G : graph
- A Networkx graph.
nbunch: a single node or iterable container or nodes
- k : int
- A positive integer.
- isKDominating : bool
- True if the nodes in nbunch comprise a k-dominating set, and False otherwise.