rigraphclique

Calculate size of largest clique in a graph


The igraph package allows us to identify cliques within a graph fairly simply (https://igraph.org/r/doc/cliques.html). It returns lists of vertices. However, I need to simply calculate the size of the largest clique. In the documentation it mentions that the size of the largest clique can be calculated but no function is given for this task.

Other threads on the topic of cliques seem to be focused on identifying the largest clique, finding maximal cliques that meet certain criteria, counting non-overlapping cliques of a certain size, or etc. But I haven't found anything about simply reporting the size of the largest clique.

Does anyone know how to calculate the size (number of vertices) of the largest clique within a graph?


Solution

  • I found the function I was looking for. It's simply "clique_num"