Find all complete sub-graphs within a graph

前端 未结 2 1841
盖世英雄少女心
盖世英雄少女心 2020-12-01 08:33

Is there a known algorithm or method to find all complete sub-graphs within a graph? I have an undirected, unweighted graph and I need to find all subgraphs within it where

2条回答
  •  孤城傲影
    2020-12-01 09:07

    Well the problem of finding a k-vertex subgraph in a graph of size n is of complexity

    O(n^k k^2)

    Since there are n^k subgraphs to check and each of them have k^2 edges.

    What you are asking for, finding all subgraphs in a graph is a NP-complete problem and is explained in the Bron-Kerbosch algorithm listed above.

提交回复
热议问题