-
zoj1094
zoj094
Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
(Matrix multiplication problem is a typical example of dynamical programming.
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.
For example, let A be a 50*10 matrix, B a 10*20 matrix and C a 20*5 matrix.
There are two different strategies to compute A*B*C, namely (A*B)*C and A*(B*C).
The first one takes 15000 elementary multiplications, but the second one only 3500.
Your job is to write a program that determines the number of elementary multiplications needed for a given evaluation strategy.
)
- 2012-06-10 10:38:53下载
- 积分:1
-
coolbutton
按钮的编写,用MFC实现,具体实现为XP风格按钮(XP style button)
- 2009-04-12 18:39:31下载
- 积分:1
-
ADOkongjianshi
一个用c++写的ado数据库连接作品 对初学者有一定的参考作用 主要是应用了mfc类库的知识 希望对大家有参考作用(A with c++ to write the ado database connection works for beginners of some reference value is applied knowledge mfc class library reference for all of us hope that the role of)
- 2009-04-11 01:27:55下载
- 积分:1
-
rayinvr
用f语言编写的射线层析反演程序,里面有很详细的说明,应该很有用的。(X-ray tomographic inversion procedure using f language, which had a very detailed description, it should be very useful)
- 2020-12-07 15:59:20下载
- 积分:1
-
Function
介绍了C的常用函数, 介绍了C的常用函数, (Introduction of the commonly used C functions, the introduction of the commonly used C functions,)
- 2008-05-25 16:25:15下载
- 积分:1
-
CHATROOM
chat room using winsock in visual basic
- 2015-11-20 04:00:10下载
- 积分:1
-
zhangzhengyoucalibrate
张正友的摄像机标定源代码,基于vc++和opencv的结合(Zhang Zhengyou camera calibration source code, based on a combination of vc++ and opencv)
- 2014-04-16 12:05:19下载
- 积分:1
-
ActiveDoc
说明: 利用vc6.0提供的支持实现一个ActiveX文档服务器程序。这个程序可以从包容器中装入文件,可以编辑和保存文本以及嵌入对象,它还能够从Internet下载文本文件,每次一行。(vc6.0 use of the support provided to achieve an ActiveX file server. This procedure can pack containers loaded document, and can edit the text and to preserve embedded object, it can be downloaded from the Internet text files, one line at a time.)
- 2006-03-12 21:00:58下载
- 积分:1
-
houghinit
基于标准Hough变换的航迹起始,对采集的十帧数据进行分析,得到五条起始航迹(Standards-based Hough transform track initiation, the 10 data collected for analysis, the five initial track)
- 2021-04-14 20:28:55下载
- 积分:1
-
dplay
dplay.dll,D3D的动态链接库文件,你可以使用D3D动画编程
(Dplay.dll, D3D dynamic link library file, you can use the D3D animation programming
)
- 2013-05-25 07:45:37下载
- 积分:1