I would like to find (all) cliques in a given graph with 8,568 vertices and 12,726,708 edges. The vertex with the lowes degree has 2000, the vertext with the highest degree has 4007. The cliques should have exactly 17 vertices.
The algorithm should be fast, because of the size of the graph.
I had the following idea:
- Delete all vertices with a degree of 16 or less.
- Iterate over every vertex
- try to add another vertex:
- If the clique has exactly 17 vertices: Add it to a list
- Else: Keep trying to add vertices
- If no more vertices can be added: go back to the latest point where you had the choice to add some vertices and add one of those that could not be added before.
- try to add another vertex:
I didn't implement this algorithm, because I think it will be quite slow. Do you know better ones?