美文网首页
21. Dynamic Programming 4

21. Dynamic Programming 4

作者: 何大炮 | 来源:发表于2017-10-10 08:12 被阅读0次

    Matrix-chain multiplication problem

    There are 2 matrix, A[m* n] and B[n* l], then we do multiplication A* B = C[m* l]
    there are m* l * n scalar multiplications existing.
    Let assume: A * B *C * D * E...... find a multiplying order so that the number of scalar multiplications is smallest.


    For this problem, we use s[i,j] as the a record of execution, and use the recursion to calculate from small to large.

    相关文章

      网友评论

          本文标题:21. Dynamic Programming 4

          本文链接:https://www.haomeiwen.com/subject/rvvqyxtx.html