-1

Question: Given 2 undirected graphs $G_1$, $G_2$, the problem whether exists a subgraph H1 of G1 which is isomorphic to a subgraph $H_2$ of $G_2$. What is the lowest complexity class for this problem: a. PSPACE b. NPC c. NP d. P

Thoughts We were thinking of this to be in NP because we can get a certificate of such two subgraphs and check the in polynomial time. But - we cannot determine whether this is complete or not. Is the only way to determine that is by trying to find a reduction to an NPC problem? Is there a specific way to prove that a language is NOT NPC but in NP?

jreing
  • 205
  • 1
  • 6

2 Answers2

3

Showing that a problem has a polynomial time algorithm is strong evidence it's not $NP$-complete, but unless you plan to prove $P\not =NP$ the only languages you're going to prove are not $NP$-complete are the empty language and $\Sigma^*$.

If you are interested in showing $NP$-completeness you may find our reference answer useful but I'd suggest looking at your problem definition carefully, thinking about what it means, and perhaps trying a few examples.

Tom van der Zanden
  • 13,493
  • 1
  • 39
  • 56
3

You haven't explained what you mean by subgraph. Here are a few possibilities:

  • A subgraph of $G$ is a graph on the same vertex set but with possibly fewer edges. In that case, consider what happens when $H_1,H_2$ are the empty graphs.

  • A subgraph of $G$ is a graph induced on a subset of the vertex set of $G$. In that case, consider what happens when $H_1,H_2$ are the graphs on one vertex.

  • A subgraph of $G$ can be obtained by deleting both vertices and edges. This case left to you.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514