networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersRaisesReturnsBackRef
max_clique(G)

Finds the $O(

<SubstitutionRef: 
   |value: '|V|'
   |>
/(log|V|)^2)$ apx of maximum clique/independent set in the worst case.

Notes

A clique in an undirected graph G = (V, E) is a subset of the vertex set :None:None:`C \subseteq V` such that for every two vertices in C there exists an edge connecting the two. This is equivalent to saying that the subgraph induced by C is complete (in some cases, the term clique may also refer to the subgraph).

A maximum clique is a clique of the largest possible size in a given graph. The clique number :None:None:`\omega(G)` of a graph G is the number of vertices in a maximum clique in G. The intersection number of G is the smallest number of cliques that together cover all edges of G.

https://en.wikipedia.org/wiki/Maximum_clique

Parameters

G : NetworkX graph

Undirected graph

Raises

NetworkXNotImplemented

If the graph is directed or is a multigraph.

Returns

clique : set

The apx-maximum clique of the graph

Find the Maximum Clique

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.algorithms.approximation.clique.large_clique_size

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#64
type: <class 'function'>
Commit: