IsClique - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

IsClique

  

test if graph is a clique

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

IsClique(G)

IsClique(G,S)

Parameters

G

-

undirected graph

S

-

(optional) list or set of vertices

Description

• 

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.

Examples

> 

with⁡GraphTheory:

> 

K3≔CompleteGraph⁡3

K3≔Graph 1: an undirected graph with 3 vertices and 3 edges

(1)
> 

IsClique⁡K3

true

(2)
> 

C4≔CycleGraph⁡4

C4≔Graph 2: an undirected graph with 4 vertices and 4 edges

(3)
> 

IsClique⁡C4

false

(4)
> 

G≔AddEdge⁡C4,1,3,inplace=false

G≔Graph 3: an undirected graph with 4 vertices and 5 edges

(5)
> 

IsClique⁡G,1,2,3

true

(6)

See Also

CliqueNumber

InducedSubgraph

MaximumClique