networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersRaisesReturns
large_clique_size(G)

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.

Notes

This implementation is from . 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.

Parameters

G : NetworkX graph

Raises

NetworkXNotImplemented

If the graph is directed or is a multigraph.

Returns

k: integer

The size of a large clique in the graph.

Find the size of a large clique in a graph.

See Also

networkx.algorithms.approximation.clique.max_clique

A function that returns an approximate maximum clique with a guarantee on the approximation ratio.

networkx.algorithms.clique

Functions for finding the exact maximum clique in a graph.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/approximation/clique.py#165
type: <class 'function'>
Commit: