

Show that this problem is in the class P. That is, show that there is a deterministic Turing machine that decides this problem in polynomial time in the size of the input.
Note that a simple path is one that doesn't visit a vertex more than once; and the cost of a path is the sum of the cost of each edge in the path.
Show that this problem is in the class P. That is, show that there is a deterministic Turing machine that decides this problem in polynomial time in the size of the input.