Weekly Algorithm Questions (Seventeen) 8.15 Maximum Common Subgraph

Weekly Algorithm Questions (17)

Title: 8.15 Maximum Common Subgraph

It is known that G1 = (V1, E1), G2 = (V2, E2), the positive integers b, G1, and G2 respectively delete some nodes and the subgraphs formed by the remaining at least b nodes should be the same.

Prove that the maximum common subgraph problem is NP-complete.

proving process

First of all, this is a problem that can be tested for correctness in polynomial time, that is, an NP problem.

And the independent set problem is known to be NP-complete. If the independent set problem can be reduced to this problem, it is proved that the maximum common subgraph problem is NP-complete.

Let G1=(V, E), G2=(V, ∅), then there is no edge in G2, and any set of points can form an independent set.

If there is an independent set of size b in G1, then as long as the same set of points is taken from G2, a common subgraph of size b can be formed. That is, if the independent set problem has a solution, the maximum common subgraph problem also has a solution.

Conversely, if it is known that G1 and G2 have a common subgraph of size b, assuming that there is an edge in the common subgraph of G1, then the corresponding common subgraph in G2 will also have this edge, but because G2 does not have an edge edge, so the assumption does not hold, that is, there is no edge in the common subgraph, that is, the point sets of the common subgraph are all independent sets of G1 and G2.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325712349&siteId=291194637