Question 4
Recall the color coding algorithm to compute a -length path (connecting the regulators and receptors) with maximum weight. We had the following optimal substructure:
Consider a set of proteins . You are asked to compute the path with maximum weight such that there are at least and at most proteins from . To accommodate the same the DP matrix is modified as follows:
Instead of a 2-D matrix, we use a 3-D DP matrix such that stores the maximum weight of a path of length ending at containing a vertex of each color in and exactly proteins from . Which among the following is the correct optimal substructure for the algorithm?