I want to find all k-clique in undirected graph. Hence I need to exact algorithm based on ant colony for finding all k-clique in graph. For example, consider this adjacent matrix:
0 1 1 0 0
1 0 1 1 0
1 1 0 1 1
0 1 1 0 1
0 0 1 1 0
In this adjacent matrix we have three 3-clique: (1,2,3),(2,3,4),(3,4,5)
I want to find this k-clique in every graph. note=K is input in K-clique algorithm.
As long is
K
is arbitrary value being a problem input, the k-clique problem is NP-complete, which means there is nothing essentially better then just a brute force algorithm - take every subgraph ofK
nodes and check whether it represents a clique. Implementation details of this idea via backtracking can be found here.