g show that the hamiltonian-path problem from exercise 34.2-6 can be solved in polynomial time on directed acyclic graphs. give an efficient algorithm for the problem