large_clique_size

large_clique_size#

graph_tool.structure.large_clique_size(g)[git][source]#

Return the size of a large clique found by a fast heuristic.

Parameters:
gGraph

Graph to be used. Edge directions are ignored.

Returns:
sizeint

The size of a clique, a lower bound on the clique number.

See also

clique_number

Exact size of a largest clique

approx_maximum_clique

Approximate maximum clique

Notes

From every vertex with degree at least the best size found so far, a clique is grown greedily [pattabiraman-fast-2015]: the candidates are the vertices adjacent to all the vertices of the clique whose degree is at least the best size found so far, and the candidate of largest degree is added, until there are no candidates left. The size returned is the largest of these cliques, and the degrees are those of the simple graph underlying g. The time is \(O(V\Delta^2)\) in the worst case, where \(\Delta\) is the largest degree.

References

[pattabiraman-fast-2015]

Bharath Pattabiraman, Md. Mostofa Ali Patwary, Assefaw H. Gebremedhin, Wei-keng Liao and Alok Choudhary, “Fast algorithms for the maximum clique problem on massive graphs with applications to overlapping community detection”, Internet Mathematics 11, 421-448 (2015), DOI: 10.1080/15427951.2014.986778 [sci-hub, @tor]

Examples

>>> g = gt.collection.data["karate"]
>>> print(gt.large_clique_size(g), gt.clique_number(g))
5 5