一.矩阵链复杂度计算(根据两两相乘计算次数):
假设有A1(10*100),A2(100*5),A3(5*50)三个矩阵
((A1A2)A3) 计算顺序使用到的乘法次数为:10*100*5 + 10*5*50=7500次
(A1(A2A3)) 计算顺序使用到的乘法次数为:100*5*50 + 10*100*50=75000次
二.矩阵链相乘组合方式的计算(括号组合的方式):
假设有矩阵链 A1A2A3...An ,组合方式一共有:

三.DP在矩阵链求解中的应用:
Our goal is only to determine an order for multiplying matrices that has the lowest cost. Typically, the time invested in determining this optimal order is more than paid for by the time saved later on when actually performing the matrix multiplications (such as performing only 7500 scalar multiplications instead of 75,000).
即:求出复杂度最低(相乘次数最少)的一种相乘顺序
四.求解步骤:
1.The structure of an optimal parenthesization(描述解的结构)
A(i..j) = A(i) A(i+1) ... A(j)

本文探讨了矩阵链相乘问题的复杂度计算,指出求解最优相乘顺序的重要性,以降低计算成本。介绍了动态规划在解决这一问题中的应用,包括解的结构描述和递归解决方案,旨在找到相乘次数最少的矩阵链顺序。
&spm=1001.2101.3001.5002&articleId=82288069&d=1&t=3&u=2a6a1d4d12c7427db843c80a95580ef6)
444

被折叠的 条评论
为什么被折叠?



