Let G be a directed acyclic graph whose vertices have labelsover some fixed alphabet, and
let A[1 .. l`] be a string over the same alphabet. Any directedpath in G has a label, which
is a string obtained by concatenating the labels of itsvertices.
Describe and analyze a dynamic programming algorithm thatcorrectly determines if
there is a path in G whose label is A.
Describe and analyze a dynamic programming algorithm to find thenumber of paths
in G whose label is A. (Assume that you can add arbitrarily largeintegers in O(1)
time.)
Expert Answer
An answer will be send to you shortly. . . . .