GraphTheory
IsDominatingSet
test whether set is dominating set for graph
IsIndependentSet
test whether set is independent set for graph
Calling Sequence
Parameters
Description
Definitions
Examples
Compatibility
IsDominatingSet(G,S)
IsIndependentSet(G, S)
G
-
undirected graph
S
(optional) list or set of vertices
IsDominatingSet(G, S) returns true if the collection of vertices S is a dominating set for G, and returns false otherwise.
IsIndependentSet(G, S) returns true if the collection of vertices S represents an independent set in G, and returns false otherwise.
To find a minimum dominating set or a maximum independent set for G, use MaximumIndependentSet.
A dominating set of a graph G is a subset S of the vertices of G, with the condition that every vertex in G must either be an element of S or the neighbor of an element of S.
An independent set of a graph G is a subset S of the vertices of G, with the condition that if any vertices v1 and v2 are both members of S, the graph G must not contain an edge between them. An independent set of G is a clique of the complement of G.
with⁡GraphTheory:
G≔PathGraph⁡5
G≔Graph 1: an undirected graph with 5 vertices and 4 edge(s)
S1≔1,2,3,4,5
IsDominatingSet⁡G,S1
true
IsIndependentSet⁡G,S1
false
S2≔1,3
IsDominatingSet⁡G,S2
IsIndependentSet⁡G,S2
S3≔1,3,5
IsDominatingSet⁡G,S3
IsIndependentSet⁡G,S3
The GraphTheory[IsDominatingSet] and GraphTheory[IsIndependentSet] commands were introduced in Maple 2024.
For more information on Maple 2024 changes, see Updates in Maple 2024.
See Also
IsClique
MaximumIndependentSet
Download Help Document