GraphTheory
IsClique
test if graph is a clique
Calling Sequence
Parameters
Description
Examples
IsClique(G)
IsClique(G,S)
G
-
undirected graph
S
(optional) list or set of vertices
The IsClique(G) command returns true if the input graph is a clique (complete graph). It returns false otherwise.
The IsClique(G, S) command returns true if the collection of vertices S represents a clique in G, and returns false otherwise.
with⁡GraphTheory:
K3≔CompleteGraph⁡3
K3≔Graph 1: an undirected graph with 3 vertices and 3 edge(s)
IsClique⁡K3
true
C4≔CycleGraph⁡4
C4≔Graph 2: an undirected graph with 4 vertices and 4 edge(s)
IsClique⁡C4
false
G≔AddEdge⁡C4,1,3,inplace=false
G≔Graph 3: an undirected graph with 4 vertices and 5 edge(s)
IsClique⁡G,1,2,3
See Also
CliqueNumber
InducedSubgraph
MaximumClique
Download Help Document