
- Q4 26 Points Dynamic Programming A 10 Points For A Matrix Chain Problem With 4 Matrices A1 A2 A3 And A4 Pleas 1 (50.36 KiB) Viewed 42 times

- Q4 26 Points Dynamic Programming A 10 Points For A Matrix Chain Problem With 4 Matrices A1 A2 A3 And A4 Pleas 2 (48.22 KiB) Viewed 42 times
• Q4(26 points): Dynamic programming (a) (10 points) For a Matrix-Chain problem with 4 matrices A1, A2, A3 and A4, please con- struct and draw the two tables as in the book if the dimension vector for these four matrices is <3, 5, 1, 4,2 >. (b)(3 points) Based on the tables in (a), what is the optimal parenthesization for the product A₁ A2 A3 A4 ?
(c) (10 points) For a LCS (longest common subsequence) problem with two input sequences X =< B, A, B, A, C, D, C> and Y =< C, B, A, B, D, A, C >, please draw the table(s) as in the book. (d) (3 points) Based on the table(s) in (c), what is the longest common subsequence for X and Y?