演算法›Ch3 動態規劃
第 5 題/共 40 題
◀ AL 5/40
5. Matrix Chain Multiplication、Dynamic Programming、計算順序
#AL-03-005中Matrix Chain MultiplicationDynamic Programming計算順序

We want to multiply a sequence of matrices M1,…,MnM_1, \ldots, M_n with the minimum number of multiplications. Let mi,jm_{i,j} be the minimum number of multiplications to multiply Mi,…,MjM_i, \ldots, M_j. We can derive a recursion of mi,jm_{i,j}, where rir_i and cic_i are the numbers of rows and columns of the matrix MiM_i respectively.

mi,j=min⁡i≤k<j(mi,k+mk+1,j+rickcj)m_{i,j} = \min_{i \le k < j}\left(m_{i,k} + m_{k+1,j} + r_i c_k c_j\right)

(1)

When we compute all mi,jm_{i,j}'s with Equation 1, we must follow an order of ii and jj so that the mm's on the right-hand side are all known when we compute mi,jm_{i,j}. Please select all the correct orders in the following choices.

📄 台大113
跳轉到第題
▤完整推導請見《WH 資工筆記 · 演算法》Ch3 動態規劃
本章題號 · 1–20 / 40