test if graph is triangle-free
(optional) equation of the form usecached=true or usecached=false
usecached : keyword option of the form usecached=true or usecached=false. This specifies whether a previously stored clique number should be used, if available. The default is true.
The IsTriangleFree(G) command returns true if G is a triangle-free graph and false otherwise.
An undirected graph G is triangle-free if it does not contain any cycle of length 3. This is equivalent to stating the clique number of G is less than 3.
G ≔ Graph⁡1,2,2,3,3,1,3,4
G≔Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)
P ≔ PetersenGraph⁡
P≔Graph 2: an undirected unweighted graph with 10 vertices and 15 edge(s)
C ≔ ClebschGraph⁡
C≔Graph 3: an undirected unweighted graph with 16 vertices and 40 edge(s)
The GraphTheory[IsTriangleFree] command was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
Download Help Document
What kind of issue would you like to report? (Optional)