-
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
-
CH7026
KEIL C 编译,运行于STC 4052 的 TTL 转VGA 输出的转换工具程序, 特别制作的CHROTEL 的 类IIC 读写子程序, 有不同分辨率的参数表。(KEIL C compiler, running on the STC 4052 to VGA output TTL conversion tools procedures, in particular the production of the IIC class CHROTEL subroutine to read and write, there are different forms parameter resolution.)
- 2021-01-27 21:38:40下载
- 积分:1
-
恒压供水图纸+PLC程序+组态程序
(恒压供水plc梯形图程序-接线图)
- 2019-04-05下载
- 积分:1
-
Dijkstra
迪特斯特拉算法,课程设计的作品,主要计算站点距离的吧,可以看看(Dieter Stella algorithm, distance course design work, the main computing sites can look)
- 2013-04-11 10:26:15下载
- 积分:1
-
onvif-discovery_cs
onvif协议 源代码 实例 vc++ discovery_cs(onvif protocol source code examples vc++ discovery_cs)
- 2014-04-11 19:51:38下载
- 积分:1
-
aPLib-1.01
this is the library to compress and decompress any file. I found it on Net
- 2010-09-10 19:25:46下载
- 积分:1
-
ReadFile
简单的把读的文件中的字母由小写改为大写
只需在程序写的相应目录建相应文件即可(Simple to read documents in lowercase letters changed to uppercase by the program just to write the corresponding directory to build the corresponding document can be)
- 2007-09-02 01:06:46下载
- 积分:1
-
MyGADlgToTSP_V1.4Release
直接计算TSP问题的小程序~非常好用,可以直接画出路径图来。(Direct calculation of the TSP ~ very handy little program, you can directly draw a path diagram.)
- 2013-06-22 11:08:11下载
- 积分:1
-
myExplorer
用MFC编写的一个类似于资源管理器系统,可以查看当前电脑下的资源,以树的形式显示。(MFC prepared with a similar resource management system, you can view the resources under the current computer display in the form of a tree.)
- 2014-01-19 22:24:16下载
- 积分:1
-
DS18B20datagdg
ds18b20的详细使用资料包括源代码和中文使用手册(DS18B20 detailed the use of information, including source code and Chinese user manual)
- 2008-03-31 07:32:46下载
- 积分:1