Longest path in a dag
a. Design an efficient algorithm for finding the length of the longest path in a dag. (This problem is important both as a prototype of many other dynamic programming applications and in its own right because it determines the minimal time needed for completing a project comprising precedenceconstrained tasks.)
b. Show how to reduce the coin-row problem discussed in this section to the problem of finding a longest path in a dag.