Graph Isomorphism variant

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?

• What do you mean by subgraph? – Yuval Filmus Jan 10 '16 at 9:26
• Look up subgraph isomorphism, an NP-complete problem that is similar to yours. – Yuval Filmus Jan 10 '16 at 10:54
• @YuvalFilmus "Subgraph" means "subgraph". This is such a standard concept that there is no need to define what it means. – David Richerby Jan 10 '16 at 21:18
• Hint: all graphs have very, very simple subgraphs. – David Richerby Jan 10 '16 at 21:20
• @DavidRicherby Subgraph depends on the context. Sometimes the vertex set stays the same, and sometimes it doesn't. – Yuval Filmus Jan 10 '16 at 23:48

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.

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.

• the induced subgraph given to is a subset of the vertices and all edges that are connected to this subset in the graph. The correct answer is NPC, but according to your second bullet this is trivially supposed to be in P(or even constant time). I believe we somehow need to find a reduction to an NPC language. What do you think about this reduction from Clique to L(our problem): Given (G,l) clique instance - output (G,$K_l$)- and by this we solve the clique problem by L - which implies NP completeness. – jreing Jan 10 '16 at 10:44
• If the problem is in P then (unless P=NP) it can't be NP-complete. If you believe that your problem should be NP-complete, then you must have misunderstood your problem. There is no point thinking about it any further before you ascertain the correct formulation of the problem. – Yuval Filmus Jan 10 '16 at 10:53