This function is a polynomial time algorithm for checking the morality of undirected graphs with maximum degree 3. The algorithm has been proved to be correct. It finds a simplicial clique (i.e., a simplicial node and its neighbours), and removes the entire clique.
1 |
G |
A given undirected graph stored in an adjacency matrix format. |
debug |
A boolean argument to show steps of the backtracking algorithm. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.