I\'m faced with the following problem:
Given
This one reminded me this well known NP-hard problem http://en.wikipedia.org/wiki/Longest_path_problem
The problem you denoted must be NP-hard too.