Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

# networkx.algorithms.approximation.clique.large_clique_size¶

large_clique_size(G)[source]

Find the size of a large clique in a graph.

A clique is a subset of nodes in which each pair of nodes is adjacent. This function is a heuristic for finding the size of a large clique in the graph.

Parameters: G (NetworkX graph) The size of a large clique in the graph. int

Notes

This implementation is from [1]. Its worst case time complexity is $$O(n d^2)$$, where n is the number of nodes in the graph and d is the maximum degree.

This function is a heuristic, which means it may work well in practice, but there is no rigorous mathematical guarantee on the ratio between the returned number and the actual largest clique size in the graph.

References

 [1] Pattabiraman, Bharath, et al. “Fast Algorithms for the Maximum Clique Problem on Massive Graphs with Applications to Overlapping Community Detection.” Internet Mathematics 11.4-5 (2015): 421–448.

networkx.algorithms.approximation.clique.max_clique()
networkx.algorithms.clique