Clique#

Functions for finding and manipulating cliques.

Finding the largest clique in a graph is NP-complete problem, so most of these algorithms have an exponential running time; for more information, see the Wikipedia article on the clique problem [1].

enumerate_all_cliques(G)

Returns all cliques in an undirected graph.

find_cliques(G[, nodes])

Returns all maximal cliques in an undirected graph.

find_cliques_recursive(G[, nodes])

Returns all maximal cliques in a graph.

make_max_clique_graph(G[, create_using])

Returns the maximal clique graph of the given graph.

make_clique_bipartite(G[, fpos, ...])

Returns the bipartite clique graph corresponding to G.

graph_clique_number(G[, cliques])

Returns the clique number of the graph.

graph_number_of_cliques(G[, cliques])

Returns the number of maximal cliques in the graph.

node_clique_number(G[, nodes, cliques, ...])

Returns the size of the largest maximal clique containing each given node.

number_of_cliques(G[, nodes, cliques])

Returns the number of maximal cliques for each node.

cliques_containing_node(G[, nodes, cliques])

Returns a list of cliques containing the given node.

max_weight_clique(G[, weight])

Find a maximum weight clique in G.