Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test whether a graph is chordal
ResourceFunction["ChordalGraphQ"][gr] test whether the graph gr is chordal. |
Complete graphs are chordal:
In[1]:= |
Out[1]= |
In[2]:= |
Out[2]= |
The HouseX graph is chordal:
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
But the house graph is not:
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
This simple cycle is not chordal:
In[7]:= |
Out[7]= |
In[8]:= |
Out[8]= |
This work is licensed under a Creative Commons Attribution 4.0 International License