[Dynamic Programming 20%] Answer two questions related to Longest Common
Subsequence (LCS).
(a) (10%) Find all the LCSs for two sequences 32457458 and 21436587 with the
following recurrence:
$c[i, j] = \begin{cases} 0 & \text{if } i = 0 \text{ or } j = 0, \\ \max(c[i-1, j-1] + (x_i == y_j), c[i, j-1], c[i-1, j]) & \text{if } i, j > 0, \end{cases}$
Note that $(x_i == y_j)$ is 1 if $x_i = y_j$ or 0 if not.
You may use the following table for your computation.
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
& 2 & 1 & 4 & 3 & 6 & 5 & 8 & 7 \\
\hline
3 & & & & & & & & \\
\hline
2 & & & & & & & & \\
\hline
4 & & & & & & & & \\
\hline
5 & & & & & & & & \\
\hline
7 & & & & & & & & \\
\hline
4 & & & & & & & & \\
\hline
5 & & & & & & & & \\
\hline
8 & & & & & & & & \\
\hline
\end{tabular}
(b) (10%) Can you suggest an algorithm to find the Longest Common
Monotonically Increasing Subsequence? No need to show the result by
ssketching your approach is good enough.