| maxClique {RBGL} | R Documentation |
Find all the cliques in a graph
maxClique(g)
g |
an instance of the graph class |
Notice the maximum clique problem is NP-complete, which means it cannot be solved by any known polynomial algorithm.
We implemented the algorithm by C. Bron and J. Kerbosch,
maxClique |
list of all cliques in g |
Li Long <li.long@isb-sib.ch>
Finding all cliques of an undirected graph, by C. Bron and J. Kerbosch, Communication of ACM, Sept 1973, Vol 16, No. 9.
con1 <- file(system.file("XML/conn.gxl",package="RBGL"), open="r")
coex <- fromGXL(con1)
close(con1)
maxClique(coex)
con2 <- file(system.file("XML/hcs.gxl",package="RBGL"), open="r")
coex <- fromGXL(con2)
close(con2)
maxClique(coex)