Reducing Hamiltonian Path Problem to Green Path Problem

668 Views Asked by At

The Green Path Problem is as follows: given a graph $G$ with $n/2$ green vertices and $n/2$ red vertices, is there a simple path from $v_1$ to $v_n$ that contains every green vertex? The path can include any number of red vertices.

It is fairly obviously that if $G$ has a Hamiltonian path, then $G$ must also have a green path (if there's a simple path that hits all the vertices, then there's a simple path that hits all the green vertices).

But what about the other way around? $G$ having a green path, to me, does not necessarily imply that $G$ should also have a Hamiltonian path. This is where I am struggling to prove that the Green Path Problem is NP-complete.

My current train of thought it to somehow manipulate the edges of $G$ such that all Hamiltonian paths include all $n/2$ green vertices, but I am not sure how to go about doing this.

I would appreciate any insight into this reduction!

1

There are 1 best solutions below

5
On

You don't need to use the same graph in both problems. Try constructing a new graph $H$ that is somehow based on $G$, such that $G$ has a Hamiltonian path if and only if $H$ has a green path.