Hamiltonian Path with restrictions

106 Views Asked by At

I'm trying to solve the hamiltonian path problem but with restrictions. What sort of restrictions? Each vertex has a value, and if the value is i, than I want the hemiltonian path to include this vertex on it's i'th place on the path. For example, I want the vertex marked as $5$ to be the 5'th in the path. The vertex marked as $10$ to be the 10'th in the path.

I'm looking for an easy way to solve this, I couldn't find any algorithms or information about this.

Thanks, Tal