矩阵链乘法问题描述(Matrix-chain multiplication)
来源:互联网 发布:单片机原理图怎么看 编辑:程序博客网 时间:2024/04/27 23:53
矩阵链乘法问题描述(Matrix-chain multiplication)
flyfish 2015-9-13
矩阵链乘法问题:给定n个要相乘的矩阵构成序列
Matrix-chain multiplication:We are given a sequence(chain)
product
n乘积
multiply
英 [‘mʌltɪplaɪ] 美 [‘mʌltɪplaɪ]
vt. 乘;使增加;使繁殖;使相乘
vi. 乘;繁殖;增加
过去式 multiplied
过去分词 multiplied
现在分词 multiplying
为了计算,可以将两个矩阵相乘的算法作为一个子程序,根据括号的次序做全部的矩阵乘法。
We can evaluate the express using the stand algorithm for multiplying paires of matrices as a subroutine once we have parenthesized it to resolve all ambiguities in how the matrices are multiplied together.
parenthesize
英 [pə’renθɪsaɪz] 美 [pə’rɛnθə,saɪz]
vt. 加插入语于…;将…加上括弧
过去式 parenthesized
过去分词 parenthesized
现在分词 parenthesizing
ambiguity
英 [æmbɪ’gjuːɪtɪ] 美 [,æmbɪ’ɡjuəti]
n. 含糊;不明确;暧昧;模棱两可的话
复数 ambiguities
如果矩阵链为
if the chain of matrices is
只有当矩阵A的列数与矩阵B的行数相等时A×B才有意义
如果A是p*q矩阵,B是q*r矩阵,那么结果的矩阵C就是p*r矩阵
We can multiple tow metrices A and B only if they are compatible:the number of colums of A must equal the number of rows of B.
if A is a p*q matrix and
B is a q*r matrix,
the resulting matrix C is a p*r matrix
考虑3个矩阵的链
如果按照(A1A2)A3次序计算,那么需要10x100x5 + 10x5x50 = 7500次乘法运算;
如果按照A1(A2A3)次序计算,那么需要100x5x50 + 10x100x50 = 75000次乘法运算;因此按照第一种次序计算要快10倍。
consider the problem of chain
respectively,If we multiply according to the parenthesization
respective
英 [rɪ’spektɪv] 美 [rɪ’spɛktɪv]
adj. 分别的,各自的
respectively
英 [rɪ’spektɪvlɪ] 美 [rɪ’spɛktɪvli]
adv. 分别地;各自地,独自地
If instead we multiply according to the parenthesization
假设矩阵 A B
A 2行3列
B 3行2列
乘积AB是
2*3*2 理解为2行 每行中一个元素需要3个乘,一共2列
所以是10x100x5 + 10x5x50 = 7500
矩阵链乘法问题可表述为:给定n个矩阵构成的一个链
We state the matrix-chain multiplication problem as follows: given a chain
注意在矩阵链相乘题目中,实际上并没有把矩阵相乘,目的仅是确定一个具有最小代价的矩阵相乘次序
Note that in the matrix-chain multiplication problem, we are not actually multiplying matrices. Our goal is only to determine an order for multiplying matrices that has the lowest cost。
- 矩阵链乘法问题描述(Matrix-chain multiplication)
- 矩阵链乘(Matrix Chain Multiplication)
- UVa442 Matrix Chain Multiplication(矩阵链乘)
- 动态规划 (Dynamic Programming) 之 矩阵链乘法(Matrix Chain Multiplication)
- DP8 矩阵链相乘 Matrix Chain Multiplication @geeksforgeeks
- UVa442 Matrix Chain Multiplication(矩阵链乘)
- UVa442 Matrix Chain Multiplication(矩阵链乘)java实现
- UVa 442 Matrix Chain Multiplication(矩阵链乘,模拟栈)
- Matrix Chain Multiplication 矩阵链乘 UVA 442
- UVA 442 Matrix Chain Multiplication (矩阵链乘)
- UVa OJ Matrix Chain Multiplication 矩阵链乘 442
- HDU 1082.Matrix Chain Multiplication【栈的应用+矩阵乘法规则】【1月4】
- poj2246 Matrix Chain Multiplication 矩阵连乘
- HDU 4920 Matrix multiplication(矩阵乘法)
- hdu 4920 Matrix multiplication(矩阵乘法)
- hdu4920 Matrix multiplication [矩阵乘法 压位 ]
- HDU 4920 Matrix multiplication(矩阵乘法)
- sgu196:Matrix Multiplication(矩阵乘法-->图)
- C++---multiset
- 浅析live555媒体库之自己实现文件流的读写
- 2015.9.13 关于数据结构
- 系统UIRefreshControl 的简单使用代码
- android如何用模拟的gps
- 矩阵链乘法问题描述(Matrix-chain multiplication)
- 布线问题 38 (最小生成树 prim)
- Android Studio系列-签名打包
- ACM比赛需知
- js面向对象的例子(私有/公有/特权方法)-2
- C语言,文件操作
- 菜单栏UITabBarController
- 代码篇C#网络编程之局域网聊天
- Leetcode: Simplify Path