Goal: Find a simple path in G, that visits the maximum number of vertices in Z and prove it is NP-complete.
G = (V , E)
Z is a subset of V
How would I go about doing this?
Goal: Find a simple path in G, that visits the maximum number of vertices in Z and prove it is NP-complete.
G = (V , E)
Z is a subset of V
How would I go about doing this?
By thinking about what NP-complete problems you already know about that involve finding very long paths in graphs.
First, a nitpick about your question: "and prove it is NP-complete" sounds like the problem asks to prove that the simple path is NP-complete, which is of course nonsense. Instead, your problem should probably state simply to find the path. So, while this may sound like a nitpick, so that we are sure we are on the same page, I will restate the problem:
Input: A graph $G = (V, E)$ and a set $Z\subseteq V$.
Output: A simple path in $G$ that maximizes the number of visited vertices in $Z$.
The question is then to show that the above problem is NP-complete. It may or may not be useful to consider a decision version of this problem: $L = \{ \langle G, Z, k\rangle\mid G=(V,E)\text{ and }G\text{ contains a simple path visiting }k\text{ vertices of }Z\}$
Nitpicking aside, let's examine the problem. To avoid simply handing out a solution without you having shown an effort to solve it yourself, I will be somewhat vague.
Remember that to show a problem is NP-complete, we must show a reduction from a known NP-Hard problem to the given problem. Try to think about what NP-Hard problems are similar to this problem. Can you think of any other problems on graphs that ask for a simple path that visits a large number of vertices?
If you're still having trouble, consider an instance of the stated problem where $Z=V(G)$ (and, for the decision version, $k=|V|$). Does this seem similar to an NP-complete problem you have heard of?